diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-01 08:18:15 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-01 08:18:15 +0000 |
commit | 975e077871d5d275566c96c312b10c314aab3418 (patch) | |
tree | 947d98136f9647b59a29f8969dfc5a7456264be2 /perl-install/ugtk2.pm | |
parent | 5438a724ca092fcc3a1a7fa89197eb42bb38e12c (diff) | |
download | drakx-975e077871d5d275566c96c312b10c314aab3418.tar drakx-975e077871d5d275566c96c312b10c314aab3418.tar.gz drakx-975e077871d5d275566c96c312b10c314aab3418.tar.bz2 drakx-975e077871d5d275566c96c312b10c314aab3418.tar.xz drakx-975e077871d5d275566c96c312b10c314aab3418.zip |
(Gtk2::ComboBox->get_text, Gtk2::OptionMenu->get_text) fix non selected case
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 02eebba2c..f04f0e882 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -835,13 +835,13 @@ sub new { my ($type, $title, %opts) = @_; my $o = bless { %opts }, $type; - while (my $e = shift @tempory::objects) { $e->destroy } + while (my $e = shift @tempory::objects) { $e->destroy } #- uh ? my $window = gtknew( 'MagicWindow', title => $title || '', pop_it => $o->{pop_it}, - child => $o->{window} = gtknew('VBox'), + child => gtknew('VBox'), modal => $grab || $o->{grab} || $o->{modal}, if_(!$::isInstall, icon_no_error => wm_icon()), if_($o->{transient} && $o->{transient} =~ /Gtk2::Window/, transient_for => $o->{transient}), @@ -1439,7 +1439,7 @@ sub entry { sub get_text { my ($w) = @_; - $w->{strings}[$w->get_history]; + $w->get_history == -1 ? '' : $w->{strings}[$w->get_history]; } sub set_text { @@ -1483,7 +1483,7 @@ sub entry { sub get_text { my ($w) = @_; - $w->{strings}[$w->get_active]; + $w->get_active == -1 ? '' : $w->{strings}[$w->get_active]; } sub set_text { |