From 3255a2638d8e75f86ebff313a485357f8e45e1c1 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 8 Jan 2004 11:35:22 +0000 Subject: do not abuse global namespace (and enable to do stricter static checking on these variables) --- control-center | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/control-center b/control-center index 74f5212f..2cafe75c 100755 --- a/control-center +++ b/control-center @@ -92,9 +92,9 @@ gtkflush(); #------------------------------------------------------------- # Data structures -$::isWiz = -e "/usr/sbin/drakwizard"; -$::isRpmDrake = -e "/usr/sbin/rpmdrake"; -$::isWebAdmin = -e "/usr/bin/mdkwebadmin"; +my $isWiz = -e "/usr/sbin/drakwizard"; +my $isRpmDrake = -e "/usr/sbin/rpmdrake"; +my $isWebAdmin = -e "/usr/bin/mdkwebadmin"; # { key => [ log_exp, binary, gtkplug?, description ] } # { key => [ log_exp, [ binary, win_nb ], gtkplug?, description ] } @@ -231,7 +231,7 @@ my @tree = # [ "RFBDrake", 'unknown-mdk' ], ] ], - if_($::isRpmDrake, + if_($isRpmDrake, [ N("Software Management"), 'software', [ [ "Install Software", 'rpmdrake' ], @@ -240,7 +240,7 @@ my @tree = [ "Software Media Manager", 'source-manager' ], ] ]), - if_($::isWiz, + if_($isWiz, [ N("Server wizards"), 'wizard-mdk', [ (map { @@ -261,7 +261,7 @@ my @tree = ) ] ]), - if_($::isWebAdmin, + if_($isWebAdmin, [ N("Online Administration"), 'net-mdk', [ (map { @@ -327,7 +327,7 @@ my @menu_items = ( }, undef, '' ], - if_(0 && $::isWiz, + if_(0 && $isWiz, [ join('', @{$options{wiz_expert}}), undef, sub { $option_values{expert_wizard} = $check_boxes{wiz_expert}->get_active }, undef, '', @@ -488,7 +488,7 @@ update_profiles(); %check_boxes = map { $_ => $factory->get_widget("
" . get_path(@{$options{$_}})) -} ("show_log", if_(0 && $::isWiz, "wiz_expert")); +} ("show_log", if_(0 && $isWiz, "wiz_expert")); gtkadd($window_global, -- cgit v1.2.1