[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdeadmin/knetworkconf/knetworkconf
From: Jonathan Riddell <jr () jriddell ! org>
Date: 2006-05-30 0:26:12
Message-ID: 1148948772.436052.11230.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 546418 by jriddell:
before enable/disable interface
check if settings have been changed and ask user to apply
https://launchpad.net/distros/ubuntu/+source/kdeadmin/+bug/35509
Patch by Luka Renko
M +20 -0 knetworkconf.cpp
--- branches/KDE/3.5/kdeadmin/knetworkconf/knetworkconf/knetworkconf.cpp #546417:546418
@@ -824,6 +824,16 @@
void KNetworkConf::enableInterfaceSlot()
{
+ if (modified) {
+ if (KMessageBox::warningContinueCancel(this,
+ i18n("The new configuration has not been saved.\nApply changes?"),
+ i18n("New Configuration Not Saved"),
+ KStdGuiItem::apply()) == KMessageBox::Continue)
+ saveInfoSlot();
+ else
+ return;
+ }
+
KNetworkInterface *dev = getDeviceInfo(klvCardList->currentItem()->text(0));
if (dev->isActive())
changeDeviceState(dev->getDeviceName(),DEVICE_DOWN);
@@ -833,6 +843,16 @@
void KNetworkConf::disableInterfaceSlot()
{
+ if (modified) {
+ if (KMessageBox::warningContinueCancel(this,
+ i18n("The new configuration has not been saved.\nApply changes?"),
+ i18n("New Configuration Not Saved"),
+ KStdGuiItem::apply()) == KMessageBox::Continue)
+ saveInfoSlot();
+ else
+ return;
+ }
+
KNetworkInterface *dev = getDeviceInfo(klvCardList->currentItem()->text(0));
if (dev->isActive())
changeDeviceState(dev->getDeviceName(),DEVICE_DOWN);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic