[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] Add dontAskAgainName parameter to queuedMessageBox()
From: Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date: 2002-10-06 20:56:48
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
Hi,
I realized why a queuedMessageBox doesn't have dontAskAgainName
parameter. The reason is that the state of this checkbox will be
checked directly after the dialog is put in the dialog queue and not
when the dialog is closed by the user. In order to make a "Don't ask
again" checkbox work in a queuedMessageBox we would have to derive a
class from KDialogBase which saves the state of the checkbox in it's
d'tor. That should be done sometime but probably not now.
Therefore please consider the attached patch which only adds the options
parameter to KMessageBox::queuedMessageBox() (by overloading this
member function). This makes it possible to display links also in
queued message boxes.
Regards,
Ingo
["kmessagebox-add-options-param-to-queuedMessageBox.diff" (text/x-diff)]
Index: kmessagebox.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kmessagebox.cpp,v
retrieving revision 1.61
diff -u -3 -p -r1.61 kmessagebox.cpp
--- kmessagebox.cpp 2002/08/26 20:33:03 1.61
+++ kmessagebox.cpp 2002/10/06 20:47:20
@@ -788,6 +788,14 @@ int KMessageBox::messageBox( QWidget *pa
return KMessageBox::Cancel;
}
+void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString \
&text, const QString &caption, int options ) +{
+ KMessageBox_queue = true;
+ (void) messageBox(parent, type, text, caption, KStdGuiItem::yes(),
+ KStdGuiItem::no(), options);
+ KMessageBox_queue = false;
+}
+
void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString \
&text, const QString &caption ) {
KMessageBox_queue = true;
Index: kmessagebox.h
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kmessagebox.h,v
retrieving revision 1.40
diff -u -3 -p -r1.40 kmessagebox.h
--- kmessagebox.h 2002/09/28 15:16:22 1.40
+++ kmessagebox.h 2002/10/06 20:47:21
@@ -607,6 +607,17 @@ public:
*
* Note that if the parent gets deleted, the messagebox will not be
* shown.
+ */
+ static void queuedMessageBox( QWidget *parent,
+ DialogType type, const QString &text,
+ const QString &caption,
+ int options = Notify);
+
+ /**
+ * @overload
+ *
+ * This is an overloaded member function, provided for convenience.
+ * It behaves essentially like the above function.
*/
static void queuedMessageBox( QWidget *parent,
DialogType type, const QString &text,
[Attachment #6 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic