summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-12-18 18:27:32 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-12-18 18:27:32 +0000
commitf2d4e6ad2134449e98c844bd1131f0a1e7b3add0 (patch)
tree442f51439be261f7d27ba9a206ea274f4cdfd2ce
parent277cd8a875ba73ffdb5aa6302f43ccb14b95a14c (diff)
downloadcontrol-center-f2d4e6ad2134449e98c844bd1131f0a1e7b3add0.tar
control-center-f2d4e6ad2134449e98c844bd1131f0a1e7b3add0.tar.gz
control-center-f2d4e6ad2134449e98c844bd1131f0a1e7b3add0.tar.bz2
control-center-f2d4e6ad2134449e98c844bd1131f0a1e7b3add0.tar.xz
control-center-f2d4e6ad2134449e98c844bd1131f0a1e7b3add0.zip
- do not do anything when try to switch to current profile
- minor cleanups
-rwxr-xr-xcontrol-center10
1 files changed, 8 insertions, 2 deletions
diff --git a/control-center b/control-center
index 76e10c72..3c74ab91 100755
--- a/control-center
+++ b/control-center
@@ -441,12 +441,18 @@ sub update_profiles {
foreach my $prof (@profiles) {
$factory->create_item([ $shared_translations{profiles} . profile2menu($prof), undef, sub {
return unless $done;
+ if ($netcnx->{PROFILE} eq $prof) {
+ $done = 0;
+ enable_profile_entry($prof, 1);
+ $done = 1;
+ return
+ }
if (!warn_dialog(N("Warning"),
- N("We are about to switch from the \"%s\" profile to the \"%s\" profile
+ N("We are about to switch from the \"%s\" profile to the \"%s\" profile.
Are you sure you want to do the switch.", $netcnx->{PROFILE}, $prof), { transient => $window_global })) {
$done = 0;
- $factory->get_widget(get_path("<main>", $shared_translations{profiles} . profile2menu($prof)))->set_active(0);
+ enable_profile_entry($prof, 0);
$done = 1;
return;
}