summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-12-18 18:23:17 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-12-18 18:23:17 +0000
commit277cd8a875ba73ffdb5aa6302f43ccb14b95a14c (patch)
treefa3e586d44c14d0fed647715dd8bb20fd908d616
parent84b0448215ac33f2aff2cb0d10d3f6e9eba7546b (diff)
downloadcontrol-center-277cd8a875ba73ffdb5aa6302f43ccb14b95a14c.tar
control-center-277cd8a875ba73ffdb5aa6302f43ccb14b95a14c.tar.gz
control-center-277cd8a875ba73ffdb5aa6302f43ccb14b95a14c.tar.bz2
control-center-277cd8a875ba73ffdb5aa6302f43ccb14b95a14c.tar.xz
control-center-277cd8a875ba73ffdb5aa6302f43ccb14b95a14c.zip
ask confirmation before switching between profiles
-rwxr-xr-xcontrol-center9
1 files changed, 9 insertions, 0 deletions
diff --git a/control-center b/control-center
index 4b93c751..76e10c72 100755
--- a/control-center
+++ b/control-center
@@ -441,6 +441,15 @@ sub update_profiles {
foreach my $prof (@profiles) {
$factory->create_item([ $shared_translations{profiles} . profile2menu($prof), undef, sub {
return unless $done;
+ 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.", $netcnx->{PROFILE}, $prof), { transient => $window_global })) {
+ $done = 0;
+ $factory->get_widget(get_path("<main>", $shared_translations{profiles} . profile2menu($prof)))->set_active(0);
+ $done = 1;
+ return;
+ }
# wait message is needed
$done = 0;
enable_profile_entry($netcnx->{PROFILE}, 0);