summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center20
1 files changed, 19 insertions, 1 deletions
diff --git a/control-center b/control-center
index 454def7c..8a5a2d75 100755
--- a/control-center
+++ b/control-center
@@ -64,6 +64,17 @@ my %option_values;
$option_values{show_log} = text2bool($h{LOGS});
my $theme = $h{THEME};
$theme = $1 if "@ARGV" =~ /--theme (\w+)/;
+
+my ($i, $geometry);
+foreach (@ARGV) {
+ $i++;
+ if (/^--geometry$/) {
+ $geometry = splice @ARGV, $i, 1;
+ print "geometry is $geometry\n";
+ last;
+ }
+}
+
-d "$themes_dir/$theme" or $theme = 'default';
add_icon_path("$themes_dir/$theme/");
add_icon_path("$themes_dir/default") if $theme ne 'default'; # fall back if theme miss some icons
@@ -307,7 +318,14 @@ my @tree =
my ($timeout, %check_boxes, $emb_socket, $page_id);
my $window_global = gtkset_size_request(Gtk2::Window->new('toplevel'), 620, 460);
-$window_global->resize(max($default_width, $h{WIDTH}), max($h{HEIGTH}, $default_heigth));
+if ($geometry) {
+ my ($w, $h) = $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->set_icon(gtkcreate_pixbuf("/usr/share/icons/drakconf.png"));
my $pending_app = 0;