summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-01-27 20:23:11 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-01-27 20:23:11 +0000
commit14809cfb0e73c7b2276f4c5985172a1cc7c7bfa2 (patch)
treed011aedcba5b22a9f6caec86629045e34757799c
parent9d18b6d1054f2a57c33596cb5900d6d1434d4739 (diff)
downloadcontrol-center-14809cfb0e73c7b2276f4c5985172a1cc7c7bfa2.tar
control-center-14809cfb0e73c7b2276f4c5985172a1cc7c7bfa2.tar.gz
control-center-14809cfb0e73c7b2276f4c5985172a1cc7c7bfa2.tar.bz2
control-center-14809cfb0e73c7b2276f4c5985172a1cc7c7bfa2.tar.xz
control-center-14809cfb0e73c7b2276f4c5985172a1cc7c7bfa2.zip
comment and factorize sizing code
-rwxr-xr-xcontrol-center7
1 files changed, 4 insertions, 3 deletions
diff --git a/control-center b/control-center
index bd270836..50256343 100755
--- a/control-center
+++ b/control-center
@@ -1021,17 +1021,18 @@ if (scalar glob_("$more_wizard_dir/*.conf")) {
my ($timeout, %check_boxes, $emb_socket);
+# set default size:
my $window_global = gtkset_size_request(Gtk2::Window->new('toplevel'), 620, 460);
$::main_window = $window_global;
if ($geometry) {
- my ($w, $h) = $geometry =~ /(\d+)x(\d+)/;
+ @h{qw(HEIGTH WIDTH)} = $geometry =~ /(\d+)x(\d+)/;
my ($x, $y) = $geometry =~ /([+-]\d+)([+-]\d+)/;
- $window_global->resize(max($w, $default_width), max($default_heigth, $h));
$window_global->set_uposition($x, $y) if $x || $y;
} else {
- $window_global->resize(max($default_width, $h{WIDTH}), max($h{HEIGTH}, $default_heigth));
}
+$window_global->resize(max($default_width, $h{WIDTH}), max($h{HEIGTH}, $default_heigth));
+
$window_global->set_icon(gtkcreate_pixbuf("/usr/share/icons/drakconf.png"));
my $pending_app = 0;