diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-07-02 12:47:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-07-02 12:47:36 +0000 |
commit | 200aceae344d06fb7f9aaa8164789fada94589f8 (patch) | |
tree | 64b1bcf8bcc756b27d848b85fa6ccd4204e2600f | |
parent | bae8d4e75bcf20d519c6962968a0bb56408e7773 (diff) | |
download | rpmdrake-200aceae344d06fb7f9aaa8164789fada94589f8.tar rpmdrake-200aceae344d06fb7f9aaa8164789fada94589f8.tar.gz rpmdrake-200aceae344d06fb7f9aaa8164789fada94589f8.tar.bz2 rpmdrake-200aceae344d06fb7f9aaa8164789fada94589f8.tar.xz rpmdrake-200aceae344d06fb7f9aaa8164789fada94589f8.zip |
save & restore window size (#25932)
-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() { |