diff options
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | rpmdrake | 5 | ||||
-rw-r--r-- | rpmdrake.pm | 5 |
3 files changed, 11 insertions, 0 deletions
@@ -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 @@ -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() { |