[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATH] kdebase/kcontrol/kcontrol
From:       Willy De la Court <Willy.DelaCourt () pandora ! be>
Date:       2003-03-31 16:24:35
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The first patch in many to get APPLY OK consistency

Patch comments
- ------------------------------------------------------
When clicking OK only saves when something has changed.
- ------------------------------------------------------

I'll wait 2 days for comments on this before commiting
- -- 
Simple things make people happy.
Willy De la Court
PGP Public Key at http://www.linux-lovers.be/download/public_key.asc
PGP Key fingerprint = 784E E18F 7F85 9C7C AC1A D5FB FE08 686C 37C7 A689
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+iGvD/ghobDfHpokRAtyUAKD+lMZZWG1ymAlTp05D2Pe0fNezDACgjSNV
fjoid/k3zKk0to3NfN06siw=
=JhTK
-----END PGP SIGNATURE-----

["kcmshell.applyok.patch" (text/x-diff)]

? .directory
Index: kcdialog.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kcontrol/kcdialog.cpp,v
retrieving revision 1.18
diff -u -p -r1.18 kcdialog.cpp
--- kcdialog.cpp	9 Jan 2003 01:54:22 -0000	1.18
+++ kcdialog.cpp	31 Mar 2003 16:14:11 -0000
@@ -43,6 +43,7 @@ KCDialog::KCDialog(KCModule *client, int
     setMainWidget(client);
     connect(client, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool)));
     enableButton(Apply, false);
+    clientChanged(false);
 
     KCGlobal::repairAccels( topLevelWidget() );
 }
@@ -55,13 +56,15 @@ void KCDialog::slotDefault()
 
 void KCDialog::slotOk()
 {
-    _client->save();
+    if( _clientChanged )
+        _client->save();
     accept();
 }
 
 void KCDialog::clientChanged(bool state)
 {
     enableButton(Apply, state);
+    _clientChanged = state;
 }
 
 void KCDialog::slotApply()
Index: kcdialog.h
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kcontrol/kcdialog.h,v
retrieving revision 1.7
diff -u -p -r1.7 kcdialog.h
--- kcdialog.h	10 Jul 2002 21:26:29 -0000	1.7
+++ kcdialog.h	31 Mar 2003 16:14:11 -0000
@@ -48,6 +48,7 @@ protected slots:
 private:
   KCModule    *_client;
   QString     _docPath;
+  bool        _clientChanged;
 };
 
 #endif

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic