~ubuntu-branches/ubuntu/hardy/kdeadmin/hardy-backports

« back to all changes in this revision

Viewing changes to debian/patches/kubuntu_04_enable_apply.diff

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-07-25 10:12:17 UTC
  • mfrom: (1.2.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725101217-96zqqeyi89kl8hxb
Tags: 4:3.5.4-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nur kdeadmin-3.5.2/knetworkconf/knetworkconf/knetworkconf.cpp kdeadmin-3.5.2.new/knetworkconf/knetworkconf/knetworkconf.cpp
2
 
--- kdeadmin-3.5.2/knetworkconf/knetworkconf/knetworkconf.cpp   2006-04-25 08:28:44.000000000 +0200
3
 
+++ kdeadmin-3.5.2.new/knetworkconf/knetworkconf/knetworkconf.cpp       2006-04-25 08:31:17.000000000 +0200
4
 
@@ -824,6 +824,16 @@
5
 
 
6
 
 void KNetworkConf::enableInterfaceSlot()
7
 
 {
8
 
+  if (modified) {
9
 
+    if (KMessageBox::warningContinueCancel(this,
10
 
+                     i18n("The new configuration has not been saved.\nApply changes?"),
11
 
+                     i18n("New Configuration Not Saved"),
12
 
+                     KStdGuiItem::apply()) == KMessageBox::Continue)
13
 
+      saveInfoSlot();
14
 
+    else    
15
 
+      return;
16
 
+  }
17
 
+
18
 
   KNetworkInterface *dev = getDeviceInfo(klvCardList->currentItem()->text(0));
19
 
   if (dev->isActive())
20
 
     changeDeviceState(dev->getDeviceName(),DEVICE_DOWN);
21
 
@@ -833,6 +843,16 @@
22
 
 
23
 
 void KNetworkConf::disableInterfaceSlot()
24
 
 {
25
 
+  if (modified) {
26
 
+    if (KMessageBox::warningContinueCancel(this,
27
 
+                     i18n("The new configuration has not been saved.\nApply changes?"),
28
 
+                     i18n("New Configuration Not Saved"),
29
 
+                     KStdGuiItem::apply()) == KMessageBox::Continue)
30
 
+      saveInfoSlot();
31
 
+    else    
32
 
+      return;
33
 
+  }
34
 
+
35
 
   KNetworkInterface *dev = getDeviceInfo(klvCardList->currentItem()->text(0));
36
 
   if (dev->isActive())
37
 
     changeDeviceState(dev->getDeviceName(),DEVICE_DOWN);