aboutsummaryrefslogtreecommitdiffstats
path: root/MandrivaUpdate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-07-02 12:54:39 +0000
committerThierry Vignaud <tv@mandriva.org>2008-07-02 12:54:39 +0000
commitc768a5a0ececd77398ebfccf70844e892f4e753a (patch)
tree2c0a7a83705cb1dd7e17c1279ec6580431e748ae /MandrivaUpdate
parent200aceae344d06fb7f9aaa8164789fada94589f8 (diff)
downloadrpmdrake-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-xMandrivaUpdate11
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);