summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center20
1 files changed, 10 insertions, 10 deletions
diff --git a/control-center b/control-center
index c29cbff5..e9df3e4e 100755
--- a/control-center
+++ b/control-center
@@ -1011,7 +1011,7 @@ my %shared_translations = (
);
# for profiles:
-my ($netc);
+my $net = {};
my @profiles;
my $mdk_rel = common::mandrake_release();
@@ -1093,7 +1093,7 @@ my @menu_items = (
{ transient => $dialog });
return 1;
}
- network::network::netprofile_add($netc, $prof);
+ network::network::netprofile_add($net, $prof);
update_profiles();
$dialog->destroy;
}),
@@ -1106,7 +1106,7 @@ my @menu_items = (
}, undef, '<Item>' ],
[ $shared_translations{profiles} . $shared_translations{delete}, undef, sub {
- return if !$window_global->realized && $netc->{PROFILE} ne "default";
+ return if !$window_global->realized && $net->{PROFILE} ne "default";
my $dialog = _create_dialog(N("Delete profile"), { stock => 'gtk-dialog-warning' });
gtkpack($dialog->vbox,
Gtk2::Label->new(N("Profile to delete:")),
@@ -1117,7 +1117,7 @@ my @menu_items = (
gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $dialog->destroy }),
gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub {
my $profile2delete = $combo_dialog->entry->get_text;
- if ($profile2delete eq $netc->{PROFILE}) {
+ if ($profile2delete eq $net->{PROFILE}) {
err_dialog(N("Warning"), N("You can not delete the current profile"));
return 1;
}
@@ -1165,12 +1165,12 @@ sub update_profiles {
my ($removing) = @_;
my $done;
$factory->delete_item(get_path("<main>", $shared_translations{profiles} . profile2menu($_))) foreach @profiles;
- network::network::netprofile_read($netc);
+ network::network::netprofile_read($net);
@profiles = network::network::netprofile_list();
foreach my $prof (@profiles) {
$factory->create_item([ $shared_translations{profiles} . profile2menu($prof), undef, sub {
return unless $done;
- if ($netcnx->{PROFILE} eq $prof) {
+ if ($net->{PROFILE} eq $prof) {
$done = 0;
enable_profile_entry($prof, 1);
$done = 1;
@@ -1179,7 +1179,7 @@ sub update_profiles {
if (!warn_dialog(N("Warning"),
N("We are about to switch from the \"%s\" profile to the \"%s\" profile.
-Are you sure you want to do the switch?", $netc->{PROFILE}, $prof), { transient => $window_global })) {
+Are you sure you want to do the switch?", $net->{PROFILE}, $prof), { transient => $window_global })) {
$done = 0;
enable_profile_entry($prof, 0);
$done = 1;
@@ -1187,14 +1187,14 @@ Are you sure you want to do the switch?", $netc->{PROFILE}, $prof), { transient
}
# wait message is needed
$done = 0;
- enable_profile_entry($netc->{PROFILE}, 0);
- network::network::netprofile_set($netcnx, $prof);
+ enable_profile_entry($net->{PROFILE}, 0);
+ network::network::netprofile_set($net, $prof);
enable_profile_entry($prof, 1) if !$removing;
$done = 1;
}, undef, '<CheckItem>' ]); # Radio
}
$factory->get_widget(get_path("<main>", $shared_translations{profiles}, $shared_translations{delete}))->set_sensitive(@profiles > 1);
- eval { $factory->get_widget(get_path("<main>", $shared_translations{profiles} . profile2menu($netcnx->{PROFILE})))->set_active(1) };
+ eval { $factory->get_widget(get_path("<main>", $shared_translations{profiles} . profile2menu($net->{PROFILE})))->set_active(1) };
print "error is «$@»\n" if $@;
$done = 1;
}