summaryrefslogtreecommitdiffstats
path: root/control-center
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-08 13:32:35 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-08 13:32:35 +0000
commit1562d1976e293211aaa59801f4dddf96fde6fc00 (patch)
tree7424950cf30b7a4b795c31f2316520bcc041cb09 /control-center
parent4717d08cf3787691596d5ee3cfac0bd16574a529 (diff)
downloadcontrol-center-1562d1976e293211aaa59801f4dddf96fde6fc00.tar
control-center-1562d1976e293211aaa59801f4dddf96fde6fc00.tar.gz
control-center-1562d1976e293211aaa59801f4dddf96fde6fc00.tar.bz2
control-center-1562d1976e293211aaa59801f4dddf96fde6fc00.tar.xz
control-center-1562d1976e293211aaa59801f4dddf96fde6fc00.zip
factorize ARGV managment (and btw correct handling of "--theme t1
--theme t2" by using t2 instead of t1)
Diffstat (limited to 'control-center')
-rwxr-xr-xcontrol-center7
1 files changed, 2 insertions, 5 deletions
diff --git a/control-center b/control-center
index 1b4f0109..423252ff 100755
--- a/control-center
+++ b/control-center
@@ -68,15 +68,12 @@ my %option_values;
$option_values{use_long_dscr} = text2bool($h{USE_LONG_DESCRIPTIONS});
$option_values{show_log} = text2bool($h{LOGS});
my $theme = $h{THEME};
-$theme = $1 if "@ARGV" =~ /--theme (\w+)/;
my $program;
-foreach (@ARGV) {
- $program = $1 if /--start-with=(.*)/;
-}
-
my ($i, $geometry);
foreach (@ARGV) {
$i++;
+ $theme = $1 if /--theme (\w+)/;
+ $program = $1 if /--start-with=(.*)/;
if (/^--geometry$/) {
$geometry = splice @ARGV, $i, 1;
last;