--Boundary-03=_8mFo9/yNZ8IfoeT Content-Type: multipart/mixed; boundary="Boundary-01=_0mFo9GHajxS6l2X" Content-Transfer-Encoding: 7bit Content-Description: signed data Content-Disposition: inline --Boundary-01=_0mFo9GHajxS6l2X Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Description: body text Content-Disposition: inline Hi, is it possible to add the dontAskAgain parameter to=20 KMessageBox::queuedMessageBox(...) (and KMessageBox::messageBox(...))=20 as in the attached patch? I wouldn't ask for such at thing now if it wouldn't be necessary in=20 order to fix a crash (Bug 48688) in KMail. Currently we use a normal=20 message box (with "Don't show again" check box). But this message box=20 blocks the initialization of some objects in KMail which are then=20 accessed by other code that is executed due to the running event loop.=20 This problem could easily be solved by using a queued message box. But=20 we really need a "Don't show again" checkbox because the message box=20 might be shown very often for users of NFS mounted home directories. If=20 possible the options parameter should also be added to make it possible=20 to show links in the message with KMessageBox::AllowLink. Regards, Ingo --Boundary-01=_0mFo9GHajxS6l2X Content-Type: text/x-diff; charset="us-ascii"; name="kmessagebox.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kmessagebox.diff" ? kmessagebox.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 13:45:42 @@ -754,27 +754,27 @@ KMessageBox::about(QWidget *parent, cons return; } -int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, int options ) +int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, int options, const QString &dontAskAgainName = QString::null ) { switch (type) { case QuestionYesNo: return KMessageBox::questionYesNo( parent, - text, caption, buttonYes, buttonNo, QString::null, options ); + text, caption, buttonYes, buttonNo, dontAskAgainName, options ); case QuestionYesNoCancel: return KMessageBox::questionYesNoCancel( parent, - text, caption, buttonYes, buttonNo, QString::null, options ); + text, caption, buttonYes, buttonNo, dontAskAgainName, options ); case WarningYesNo: return KMessageBox::warningYesNo( parent, - text, caption, buttonYes, buttonNo, QString::null, options ); + text, caption, buttonYes, buttonNo, dontAskAgainName, options ); case WarningContinueCancel: return KMessageBox::warningContinueCancel( parent, - text, caption, buttonYes.text(), QString::null, options ); + text, caption, buttonYes.text(), dontAskAgainName, options ); case WarningYesNoCancel: return KMessageBox::warningYesNoCancel( parent, - text, caption, buttonYes, buttonNo, QString::null, options ); + text, caption, buttonYes, buttonNo, dontAskAgainName, options ); case Information: KMessageBox::information( parent, - text, caption, QString::null, options ); + text, caption, dontAskAgainName, options ); return KMessageBox::Ok; case Error: @@ -788,9 +788,10 @@ int KMessageBox::messageBox( QWidget *pa return KMessageBox::Cancel; } -void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption ) +void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption, const QString &dontAskAgainName ) { KMessageBox_queue = true; - (void) messageBox(parent, type, text, caption); + (void) messageBox(parent, type, text, caption, KStdGuiItem::yes(), + KStdGuiItem::no(), Notify, dontAskAgainName); KMessageBox_queue = false; } 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 13:45:42 @@ -594,7 +594,8 @@ public: const QString &caption = QString::null, const KGuiItem &buttonYes = KStdGuiItem::yes(), const KGuiItem &buttonNo = KStdGuiItem::no(), - int options = Notify); + int options = Notify, + const QString &dontAskAgainName = QString::null ); /* * Like @ref messageBox @@ -610,7 +611,8 @@ public: */ static void queuedMessageBox( QWidget *parent, DialogType type, const QString &text, - const QString &caption = QString::null ); + const QString &caption = QString::null, + const QString &dontAskAgainName = QString::null ); }; --Boundary-01=_0mFo9GHajxS6l2X-- --Boundary-03=_8mFo9/yNZ8IfoeT Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) iD8DBQA9oFm8GnR+RTDgudgRAhmDAJ4vcm2pHmbQfHSJUepoXneFqHWkkwCfTBGQ sIagGuRKmXEvW7bPD4Xl5XY= =czno -----END PGP SIGNATURE----- --Boundary-03=_8mFo9/yNZ8IfoeT--