diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-01-12 12:26:20 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-01-12 12:26:20 +0000 |
commit | fff06f36c996e1b07fbdf0d52c2c950b8dcac189 (patch) | |
tree | 44a0b1824290dcfa9a96098d06ce4b68d0ab3fc5 | |
parent | 054a817511eeaacce007a7bb587db23af61f7504 (diff) | |
download | control-center-fff06f36c996e1b07fbdf0d52c2c950b8dcac189.tar control-center-fff06f36c996e1b07fbdf0d52c2c950b8dcac189.tar.gz control-center-fff06f36c996e1b07fbdf0d52c2c950b8dcac189.tar.bz2 control-center-fff06f36c996e1b07fbdf0d52c2c950b8dcac189.tar.xz control-center-fff06f36c996e1b07fbdf0d52c2c950b8dcac189.zip |
clean code: remove deprecated code that handle array instead of binary name
since it's now useless
-rwxr-xr-x | control-center | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/control-center b/control-center index 06cfe8e7..f52c2dda 100755 --- a/control-center +++ b/control-center @@ -121,7 +121,6 @@ my $isWebAdmin = -e "/usr/bin/mdkwebadmin"; my $isRfbDrake = -e "/usr/X11R6/bin/rfbdrake"; # { key => [ log_exp, binary, gtkplug?, description ] } -# { key => [ log_exp, [ binary, win_nb ], gtkplug?, description ] } # gtkplug meaning: -1 => not embedded, 0 => external x11 app, 1 => proper embedding my $exec_hash = { @@ -887,14 +886,13 @@ sub fork_ { } sub compute_exec_string { - my ($label, $box, $icon, $text, $_log_exp, $exec_, $gtkplug, undef, $alternate) = @_; #($_[0], @{$_[1]}); + my ($label, $box, $icon, $text, $_log_exp, $exec, $gtkplug) = @_; return if $tool_pids{$label}; - my $exec = ref($exec_) ? $exec_->[0] : $exec_; if (! -x first(split /\s+/, $exec)) { splash_warning(N("cannot fork and exec \"%s\" since it is not executable", $exec)); return; } - $exec .= " --summary" if $option_values{expert_wizard} && $exec_ =~ /drakwizard/; + $exec .= " --summary" if $option_values{expert_wizard} && $exec =~ /drakwizard/; my $embedded = $gtkplug != -1; # not "explicitely not embedded" if ($embedded) { foreach my $notebook ($notebook_global) { @@ -949,16 +947,15 @@ sub compute_exec_string { $emb_box->grab_focus; $emb_socket->grab_focus; $emb_socket->show; - $exec_->[0] = $exec; $SIG{CHLD} = undef; - $emb_socket->add_id(launch_xapp(@$exec_)); + $emb_socket->add_id(launch_xapp($exec)); $SIG{CHLD} = \&sig_child; } } else { # not embedded # fix #3415 when $gtkplug eq -1 my $old = $option_values{embedded}; $option_values{embedded} = 0; - $tool_pids{$label} = fork_($gtkplug == 0 ? $exec_->[0] : $alternate || $exec); + $tool_pids{$label} = fork_($exec); $option_values{embedded} = $old; } start_logdrake(); |