diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-07-02 12:54:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-07-02 12:54:39 +0000 |
commit | c768a5a0ececd77398ebfccf70844e892f4e753a (patch) | |
tree | 2c0a7a83705cb1dd7e17c1279ec6580431e748ae /MandrivaUpdate | |
parent | 200aceae344d06fb7f9aaa8164789fada94589f8 (diff) | |
download | rpmdrake-c768a5a0ececd77398ebfccf70844e892f4e753a.tar rpmdrake-c768a5a0ececd77398ebfccf70844e892f4e753a.tar.gz rpmdrake-c768a5a0ececd77398ebfccf70844e892f4e753a.tar.bz2 rpmdrake-c768a5a0ececd77398ebfccf70844e892f4e753a.tar.xz rpmdrake-c768a5a0ececd77398ebfccf70844e892f4e753a.zip |
save & restore window size in MandrivaUpdate too (#25932)
Diffstat (limited to 'MandrivaUpdate')
-rwxr-xr-x | MandrivaUpdate | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate index 78892bde..5a117eb2 100755 --- a/MandrivaUpdate +++ b/MandrivaUpdate @@ -127,6 +127,11 @@ $w = ugtk2->new(N("Software Management")); $w->{rwindow}->show_all if $::isEmbedded; $::main_window = $w->{real_window}; +sub quit() { + ($mandrivaupdate_width->[0], $mandrivaupdate_height->[0]) = $::w->{real_window}->get_size(); + Gtk2->main_quit +} + sub run_treeview_dialog { my ($callback_action) = @_; @@ -192,7 +197,7 @@ sub run_treeview_dialog { ), 0, gtksignal_connect( Gtk2::Button->new(but_(N("Quit"))), - clicked => sub { Gtk2->main_quit }, + clicked => \&quit, ), ), #0, $statusbar = Gtk2::Statusbar->new, @@ -228,6 +233,10 @@ sub run_treeview_dialog { $w->{rwindow}->set_default_size(-1, 500) if !$::isEmbedded; + if ($mandrivaupdate_width->[0] && $mandrivaupdate_height->[0]) { + # so that we can shrink back: + $w->{real_window}->set_default_size($mandrivaupdate_width->[0], $mandrivaupdate_height->[0]); + } $w->{rwindow}->show_all; $w->{rwindow}->set_sensitive(0); |