From aacf83242de670741014a4b9efcea89940188e97 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 25 Mar 2009 12:05:57 +0000 Subject: (_gtk__Entry) entries now support most Sexy::IconEntry API --- perl-install/mygtk2.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'perl-install/mygtk2.pm') diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index 3ff3f0f72..71fe3f7eb 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -513,6 +513,18 @@ sub _gtk__Entry { $w->set_editable(delete $opts->{editable}) if exists $opts->{editable}; } + if (my $icon = delete $opts->{primary_icon}) { + $w->set_icon_from_stock('primary', $icon); + #$w->set_icon_highlight('primary', $icon); + } + if (my $icon = delete $opts->{secondary_icon}) { + $w->set_icon_from_stock('secondary', $icon); + #$w->set_icon_highlight('secondary', $icon); + } + + $w->signal_connect('icon-release' => delete $opts->{'icon-release'}) if exists $opts->{'icon-release'}; + $w->signal_connect('icon-press' => delete $opts->{'icon-press'}) if exists $opts->{'icon-press'}; + $w->set_text(delete $opts->{text}) if exists $opts->{text}; $w->signal_connect(key_press_event => delete $opts->{key_press_event}) if exists $opts->{key_press_event}; -- cgit v1.2.1