From kde-core-devel Tue Jul 22 19:57:32 2003 From: Andras Mantia Date: Tue, 22 Jul 2003 19:57:32 +0000 To: kde-core-devel Subject: kdebugdialog addition X-MARC-Message: https://marc.info/?l=kde-core-devel&m=105890417831808 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_scZH/Z9oVEWJD+h" --Boundary-00=_scZH/Z9oVEWJD+h Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I've got tired of start/close/start/close cycle with kdebugdialog, as if y= ou=20 use the instant search feature and you try to change the debug output for t= wo=20 apps (eg. kdevelop and quanta) you must do: kdev -> check/uncheck -> OK -> restart -> q -> check/uncheck -> OK. If you don't press OK, you will lose your modifications. So how about an OK= =20 that doesn't close the dialog, AKA Apply? Andras PS: The second "QPushButton *pApplyButton;" remained in the diff by mistake= =2E.. =2D --=20 Quanta Plus developer - http://quanta.sourceforge.net K Desktop Environment - http://www.kde.org =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/HZctTQdfac6L/08RAlnVAJ0QX4qClxiEB5t4Fy5DaEuEFW46HQCgl5QJ sNfgvoHQJQDoHGiNgo0pT0M=3D =3DqbX9 =2D----END PGP SIGNATURE----- --Boundary-00=_scZH/Z9oVEWJD+h Content-Type: text/x-diff; charset="us-ascii"; name="kdebugdialog.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebugdialog.diff" Index: kabstractdebugdialog.cpp =================================================================== RCS file: /home/kde/kdebase/kdebugdialog/kabstractdebugdialog.cpp,v retrieving revision 1.3 diff -u -r1.3 kabstractdebugdialog.cpp --- kabstractdebugdialog.cpp 29 Dec 2001 17:09:52 -0000 1.3 +++ kabstractdebugdialog.cpp 22 Jul 2003 19:51:49 -0000 @@ -42,8 +42,12 @@ pHelpButton = new QPushButton( i18n("&Help"), this ); hbox->addWidget( pHelpButton ); hbox->addStretch(10); + QSpacerItem *spacer = new QSpacerItem(40, 0); + hbox->addItem(spacer); pOKButton = new QPushButton( i18n("&OK"), this ); hbox->addWidget( pOKButton ); + pApplyButton = new QPushButton( i18n("&Apply"), this ); + hbox->addWidget( pApplyButton ); pCancelButton = new QPushButton( i18n("&Cancel"), this ); hbox->addWidget( pCancelButton ); @@ -51,13 +55,17 @@ int w2 = pOKButton->sizeHint().width(); int w3 = pCancelButton->sizeHint().width(); int w4 = QMAX( w1, QMAX( w2, w3 ) ); + int w5 = pApplyButton->sizeHint().width(); + w4 = QMAX(w4, w5); pHelpButton->setFixedWidth( w4 ); pOKButton->setFixedWidth( w4 ); + pApplyButton->setFixedWidth( w4 ); pCancelButton->setFixedWidth( w4 ); connect( pHelpButton, SIGNAL( clicked() ), SLOT( slotShowHelp() ) ); connect( pOKButton, SIGNAL( clicked() ), SLOT( accept() ) ); + connect( pApplyButton, SIGNAL( clicked() ), SLOT( slotApply() ) ); connect( pCancelButton, SIGNAL( clicked() ), SLOT( reject() ) ); } @@ -65,6 +73,12 @@ { if (kapp) kapp->invokeHTMLHelp( "kdelibs/kdebug/index.html" ); +} + +void KAbstractDebugDialog::slotApply() +{ + save(); + pConfig->sync(); } #include "kabstractdebugdialog.moc" Index: kabstractdebugdialog.h =================================================================== RCS file: /home/kde/kdebase/kdebugdialog/kabstractdebugdialog.h,v retrieving revision 1.2 diff -u -r1.2 kabstractdebugdialog.h --- kabstractdebugdialog.h 10 May 2000 19:24:48 -0000 1.2 +++ kabstractdebugdialog.h 22 Jul 2003 19:51:49 -0000 @@ -40,11 +40,14 @@ protected slots: void slotShowHelp(); + void slotApply(); + protected: KConfig* pConfig; QPushButton* pOKButton; QPushButton* pCancelButton; QPushButton* pHelpButton; + QPushButton* pApplyButton; }; #endif Index: klistdebugdialog.h =================================================================== RCS file: /home/kde/kdebase/kdebugdialog/klistdebugdialog.h,v retrieving revision 1.6 diff -u -r1.6 klistdebugdialog.h --- klistdebugdialog.h 16 Apr 2003 13:16:55 -0000 1.6 +++ klistdebugdialog.h 22 Jul 2003 19:51:49 -0000 @@ -58,6 +58,7 @@ QPtrList boxes; QStringList m_areaList; QVBox *m_box; + QPushButton *pApplyButton; }; #endif --Boundary-00=_scZH/Z9oVEWJD+h--