aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMandrivaUpdate11
-rw-r--r--NEWS3
-rw-r--r--rpmdrake.pm6
3 files changed, 17 insertions, 3 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);
diff --git a/NEWS b/NEWS
index f036c6a1..730805a0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
+- MandrivaUpdate, rpmdrake:
+ o save & restore window size (#25932)
- rpmdrake:
o make sure searches with no results clear package list (#34898)
- o save & restore window size (#25932)
o show 'Group' in details (usefull for search results, #39244)
o stop packaging rpmdrake-remove (#39485)
o update GUI package list
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 14ead6cf..01036055 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -50,6 +50,8 @@ our @EXPORT = qw(
$filter
$dont_show_selections
$mandrakeupdate_wanted_categories
+ $mandrivaupdate_height
+ $mandrivaupdate_width
$max_info_in_descr
$mode
$offered_to_add_sources
@@ -153,11 +155,13 @@ $ENV{HOME} = $> == 0 ? $root->[7] : $ENV{HOME} || '/root';
our $configfile = "$ENV{HOME}/.rpmdrake";
our ($already_splashed, $changelog_first_config, $filter, $max_info_in_descr, $mode, $tree_flat, $tree_mode);
our ($mandrakeupdate_wanted_categories, $offered_to_add_sources, $no_confirmation);
-our ($rpmdrake_height, $rpmdrake_width);
+our ($rpmdrake_height, $rpmdrake_width, $mandrivaupdate_height, $mandrivaupdate_width);
our %config = (
mandrakeupdate_wanted_categories => { var => \$mandrakeupdate_wanted_categories, default => [ qw(security) ] },
already_splashed => { var => \$already_splashed, default => [] },
dont_show_selections => { var => \$dont_show_selections, default => [ $> ? 1 : 0 ] },
+ mandrivaupdate_width => { var => \$mandrivaupdate_width, default => [ 0 ] },
+ mandrivaupdate_height => { var => \$mandrivaupdate_height, default => [ 0 ] },
max_info_in_descr => { var => \$max_info_in_descr, default => [] },
offered_to_add_sources => { var => \$offered_to_add_sources, default => [ 0 ] },
tree_mode => { var => \$tree_mode, default => [ qw(gui_pkgs) ] },