[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [PATCH] kdebase/kicker/ui APPLY OK Inconsistency
From: Willy De la Court <Willy.DelaCourt () pandora ! be>
Date: 2003-03-31 20:11:21
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Patch comments
- ------------------------------------------------------
UI Inconsistency OK APPLY buttons
Apply diabled when nothing is changed
Ok only saves when something is 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+iKDp/ghobDfHpokRAkkbAJoDdNqyyQ9vGm+SZ+3pEvZIfnMYbQCeJepC
+/8CWYTpZ9ryA0y91fZ6IWo=
=jvf+
-----END PGP SIGNATURE-----
["kicker_ui.applyok.patch" (text/x-diff)]
Index: customSize_dlg.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/ui/customSize_dlg.cpp,v
retrieving revision 1.1
diff -u -p -r1.1 customSize_dlg.cpp
--- customSize_dlg.cpp 12 Jun 2002 02:39:09 -0000 1.1
+++ customSize_dlg.cpp 31 Mar 2003 20:07:53 -0000
@@ -71,6 +71,9 @@ customSizeDialog::customSizeDialog(QWidg
setMinMax();
setCurrentSize();
+ dataChanged = false;
+ enableButton(Apply, false);
+ connect( sizeInput, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
}
customSizeDialog::~customSizeDialog()
@@ -85,6 +88,8 @@ void customSizeDialog::setMinMax(int min
void customSizeDialog::setCurrentSize(int currentSize)
{
sizeInput->setValue(currentSize);
+ dataChanged = false;
+ enableButton(Apply, false);
}
int customSizeDialog::size()
@@ -92,16 +97,24 @@ int customSizeDialog::size()
return sizeInput->value();
}
-void customSizeDialog::slotOk()
+void customSizeDialog::slotOk()
{
- slotApply();
+ if( dataChanged )
+ slotApply();
KDialogBase::slotOk();
}
void customSizeDialog::slotApply()
{
+ dataChanged = false;
+ enableButton(Apply, false);
emit newCustomSize(size());
}
+void customSizeDialog::slotChanged()
+{
+ dataChanged = true;
+ enableButton(Apply, true);
+}
#include "customSize_dlg.moc"
Index: customSize_dlg.h
===================================================================
RCS file: /home/kde/kdebase/kicker/ui/customSize_dlg.h,v
retrieving revision 1.1
diff -u -p -r1.1 customSize_dlg.h
--- customSize_dlg.h 12 Jun 2002 02:39:09 -0000 1.1
+++ customSize_dlg.h 31 Mar 2003 20:07:53 -0000
@@ -47,9 +47,13 @@ class customSizeDialog : public KDialogB
protected slots:
virtual void slotOk();
virtual void slotApply();
+ void slotChanged();
protected:
KIntNumInput* sizeInput;
+
+ private:
+ bool dataChanged;
};
#endif // FORM1_H
>> 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