summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-08-06 11:42:20 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-08-06 11:42:20 +0000
commit0a23970f34e708ce57555dd3c2623f0de5e2c757 (patch)
tree3eda3bc78a38709045d13a812038f89c57cb7a72
parent24b0266da17e1f9a2353652f34a7f56f846b83b0 (diff)
downloadcontrol-center-0a23970f34e708ce57555dd3c2623f0de5e2c757.tar
control-center-0a23970f34e708ce57555dd3c2623f0de5e2c757.tar.gz
control-center-0a23970f34e708ce57555dd3c2623f0de5e2c757.tar.bz2
control-center-0a23970f34e708ce57555dd3c2623f0de5e2c757.tar.xz
control-center-0a23970f34e708ce57555dd3c2623f0de5e2c757.zip
- use gtk as other modules
- small cleanups
-rwxr-xr-xcontrol-center14
1 files changed, 5 insertions, 9 deletions
diff --git a/control-center b/control-center
index 4c501fc9..ff2ad5c7 100755
--- a/control-center
+++ b/control-center
@@ -24,9 +24,9 @@ my $_sbindir = "/usr/sbin";
my $mcc_dir = "/usr/share/mcc";
my $_wizdir = "/usr/share/wizards";
-!$ENV{DISPLAY} and exec ("$_sbindir/drakxconf; reset");
+BEGIN { !$ENV{DISPLAY} and exec ("$_sbindir/drakxconf; reset") }
-require Gtk;
+use Gtk;
use lib qw(/usr/lib/libDrakX);
use common;
use interactive;
@@ -42,17 +42,13 @@ use POSIX;
my $in = 'interactive'->vnew('su', 'default');
-my $_version = "9.0";
-my $conffile = "/root/.mcc";
+my ($_version, $conffile) = ("9.0", "/etc/mcc");
my %h = getVarsFromSh($conffile);
-my $embedded;
-my $logs;
-my $theme;
defined $h{THEME} or $h{THEME} = 'default';
defined $h{EMBEDDED} or $h{EMBEDDED} = bool2text(1);
defined $h{LOGS} or $h{LOGS} = bool2text(0);
-($embedded, $logs) = (text2bool($h{EMBEDDED}), text2bool($h{LOGS}));
-$theme = $h{THEME};
+my ($embedded, $logs) = (text2bool($h{EMBEDDED}), text2bool($h{LOGS}));
+my $theme = $h{THEME};
if ("@ARGV" =~ /--theme (\w+)/) { $theme = $1 }
-d "$mcc_dir/$theme" or $theme = 'default';
"@ARGV" =~ /--safe/ and $theme = 'default';