aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xrpmdrake5
-rw-r--r--rpmdrake.pm5
3 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d83691af..f036c6a1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- 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 b/rpmdrake
index 7870c595..65985664 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -208,6 +208,7 @@ sub do_search($$$$$$$) {
}
sub quit() {
+ ($rpmdrake_width->[0], $rpmdrake_height->[0]) = $::w->{real_window}->get_size();
Gtk2->main_quit
}
@@ -677,6 +678,10 @@ sub run_treeview_dialog {
$w->{rwindow}->set_default_size($typical_width*2.7, 500) if !$::isEmbedded;
$find_entry->set_text($rpmdrake_options{search}[0]) if $rpmdrake_options{search};
+ if ($rpmdrake_width->[0] && $rpmdrake_height->[0]) {
+ # so that we can shrink back:
+ $w->{real_window}->set_default_size($rpmdrake_width->[0], $rpmdrake_height->[0]);
+ }
$w->{rwindow}->show_all;
$w->{rwindow}->set_sensitive(0);
diff --git a/rpmdrake.pm b/rpmdrake.pm
index f030963c..14ead6cf 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -53,6 +53,8 @@ our @EXPORT = qw(
$max_info_in_descr
$mode
$offered_to_add_sources
+ $rpmdrake_height
+ $rpmdrake_width
$tree_flat
$tree_mode
$typical_width
@@ -151,6 +153,7 @@ $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 %config = (
mandrakeupdate_wanted_categories => { var => \$mandrakeupdate_wanted_categories, default => [ qw(security) ] },
already_splashed => { var => \$already_splashed, default => [] },
@@ -163,6 +166,8 @@ our %config = (
'no-confirmation' => { var => \$no_confirmation, default => [ 0 ] },
filter => { var => \$filter, default => [ 'all' ] },
mode => { var => \$mode, default => [ 'by_group' ] },
+ rpmdrake_width => { var => \$rpmdrake_width, default => [ 0 ] },
+ rpmdrake_height => { var => \$rpmdrake_height, default => [ 0 ] },
);
sub readconf() {