summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-12-18 11:09:25 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-12-18 11:09:25 +0000
commitef8dfe8bec2889e9d8a3be2fff0bfef229aef1f4 (patch)
tree15dd98b7af3dcccb3193e5a0c2b400d7bc6ccc26
parentcd7a5e87456a2909151b8938b75ec02e1240de47 (diff)
downloadcontrol-center-ef8dfe8bec2889e9d8a3be2fff0bfef229aef1f4.tar
control-center-ef8dfe8bec2889e9d8a3be2fff0bfef229aef1f4.tar.gz
control-center-ef8dfe8bec2889e9d8a3be2fff0bfef229aef1f4.tar.bz2
control-center-ef8dfe8bec2889e9d8a3be2fff0bfef229aef1f4.tar.xz
control-center-ef8dfe8bec2889e9d8a3be2fff0bfef229aef1f4.zip
- save geometry on exit
- restore geometry on startup
-rwxr-xr-xcontrol-center10
1 files changed, 7 insertions, 3 deletions
diff --git a/control-center b/control-center
index a68fdf3a..7f196dfe 100755
--- a/control-center
+++ b/control-center
@@ -55,6 +55,9 @@ $h{THEME} ||= 'default';
$h{EMBEDDED} ||= bool2text(1);
$h{LOGS} ||= bool2text($class{CLASS} eq 'expert' ? 1 : 0);
$h{EXPERT_WIZARD} ||= 0;
+$h{HEIGTH} ||= 720;
+$h{WIDTH} ||= 523;
+
my %option_values;
@option_values{qw(embedded_mode show_log wiz_expert)} = (text2bool($h{EMBEDDED}), text2bool($h{LOGS}), text2bool($h{EXPERT_WIZARD}));
my $theme = $h{THEME};
@@ -279,11 +282,9 @@ my @tree =
# main window :
-my ($global_width, $global_height) = (720, 523);
-
my ($timeout, %check_boxes, $exp_frame, $emb_socket);
-my $window_global = gtkset_size_request(Gtk2::Window->new('toplevel'), $global_width, $global_height);
+my $window_global = gtkset_size_request(Gtk2::Window->new('toplevel'), $h{WIDTH}, $h{HEIGTH});
$window_global->set_icon(gtkcreate_pixbuf("/usr/share/icons/drakconf.png"));
my $pending_app = 0;
@@ -949,10 +950,13 @@ sub kill_logdrake() {
sub quit_global() {
&kill_children();
&kill_logdrake();
+ my ($x, $y) = $window_global->get_size;
setVarsInSh($conffile, {
EMBEDDED => bool2text($option_values{embedded}),
LOGS => bool2text($option_values{show_log}),
EXPERT_WIZARD => bool2text($option_values{expert_wizard}),
+ HEIGTH => $y,
+ WIDTH => $x,
THEME => $theme,
});
gtkset_mousecursor_normal();