From 1562d1976e293211aaa59801f4dddf96fde6fc00 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 8 Aug 2007 13:32:35 +0000 Subject: factorize ARGV managment (and btw correct handling of "--theme t1 --theme t2" by using t2 instead of t1) --- control-center | 7 ++----- 1 file 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; -- cgit v1.2.1