summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-06-20 11:55:19 +0000
committerYves Duret <yduret@mandriva.com>2001-06-20 11:55:19 +0000
commit570abb94b78febc2cb55452dbcb14b69680f1114 (patch)
tree83dc1bbeecd0b6f4f4981492549aaa74682a6bd7
parentdf5dc35f5754d1e1b349770763da02d6c2ce5832 (diff)
downloadcontrol-center-570abb94b78febc2cb55452dbcb14b69680f1114.tar
control-center-570abb94b78febc2cb55452dbcb14b69680f1114.tar.gz
control-center-570abb94b78febc2cb55452dbcb14b69680f1114.tar.bz2
control-center-570abb94b78febc2cb55452dbcb14b69680f1114.tar.xz
control-center-570abb94b78febc2cb55452dbcb14b69680f1114.zip
yvounetification
-rwxr-xr-xcontrol-center43
1 files changed, 13 insertions, 30 deletions
diff --git a/control-center b/control-center
index 59b0a271..19b4a2d4 100755
--- a/control-center
+++ b/control-center
@@ -269,7 +269,7 @@ sub about_mdk_cc {
}
sub splash_warning {
- my ($label) = @_;
+ my $label = @_;
my $win_about = new Gtk::Dialog();
$win_about->set_position(1);
@@ -293,32 +293,15 @@ sub connect_to_site {
my $browser=$ENV{'BROWSER'};
my $initial_user=$ENV{'INITIAL_USER'};
my $user_current=$ENV{'USER'};
- if ($help)
- {
- if ($browser)
- {
- print ("»$browser«\n»$link«\n");
- system("$browser $link &");
- }
- else
- {
- splash_warning(" "._("Warning: No browser specified")." ");
- }
- }
- else
- {
- if($initial_user ne "root" && $initial_user ne undef)
- {
- if ($browser)
- {
- system("su -m -l $initial_user -c \"$browser $link &\"");
- }
- else
- {
- splash_warning(" "._("Warning: No browser specified")." ");
- }
- }
- else {
+
+ if (!$browser) {splash_warning(" "._("Warning: No browser specified")." "); return;}
+
+ if ($help) {
+ system("$browser $link &");
+ } else {
+ if ($initial_user ne "root" && $initial_user ne undef) {
+ system("su -m -l $initial_user -c \"$browser $link &\"");
+ } else {
splash_warning(" "._("Security Warning: I'm not allowed to connect to the internet as root user")." ");
}
}
@@ -335,10 +318,10 @@ sub create_tree_item {
$treeitem->add($treebox);
if ($tree_depth_max == 0) {
$tree_launched{$label}->[1]=\$treeitem;
- $treeitem->signal_connect('select', sub { exec_treeitem($label, $tree_exec{$label}, -e $tree_exec{$label} ) });
+ $treeitem->signal_connect(select => sub { exec_treeitem($label, $tree_exec{$label}, -e $tree_exec{$label} ) });
} else {
- $treeitem->signal_connect('button_press_event', sub { $expanded ? $treeitem->collapse : $treeitem->expand; $expanded = !$expanded });
- $treeitem->signal_connect('select', sub { $treeitem_old and $$treeitem_old->collapse(); $treeitem->expand(); $treeitem_old=\$treeitem;
+ $treeitem->signal_connect(button_press_event => sub { $expanded ? $treeitem->collapse : $treeitem->expand; $expanded = !$expanded });
+ $treeitem->signal_connect(select => sub { $treeitem_old and $$treeitem_old->collapse(); $treeitem->expand(); $treeitem_old=\$treeitem;
$expanded=1;
});
}