Fwd: kmessagebox patch

thorsten at staerk.de thorsten at staerk.de
Sat Apr 15 13:11:00 BST 2006


Olivier,

you are right - I did not see the possibility to pass over a KGuiItem. It
works perfect with KDE 3.5, thanks!
However, for KDE 4 I had to open bug 125639.

have a nice day

Thorsten

> Hi
>
> What function is this ?
>
> It is not really consistant with others function, that use KGuiItem for
> whatsthis
>
>
> Le Samedi 15 Avril 2006 08:21, Waldo Bastian a écrit :
>> ----------  Forwarded Message  ----------
>>
>> Subject: kmessagebox patch
>> Date: Friday 14 April 2006 09:40
>> From: thorsten at staerk.de
>> To: bastian at kde.org
>>
>> Hallo Waldo,
>>
>> ich habe da mal einen kleinen patch für kmessagebox geschrieben, den ich
>> für meine Apps brauche:
>>
>> Index: kdeui/kmessagebox.cpp
>> ==================================================================> ---
>> kdeui/kmessagebox.cpp       (revision 529556)
>> +++ kdeui/kmessagebox.cpp       (working copy)
>> @@ -631,7 +631,9 @@
>>                               const QString &caption,
>>                               const KGuiItem &buttonContinue,
>>                               const QString &dontAskAgainName,
>> -                             Options options)
>> +                             Options options,
>> +                            const QString yeswhatsthis,
>> +                            const QString nowhatsthis )
>>  {
>>      if ( !shouldBeShownContinue(dontAskAgainName) )
>>          return Continue;
>> @@ -646,6 +648,8 @@
>>      dialog->setButtonText( KDialog::No, KStdGuiItem::cancel().text() );
>>      dialog->setDefaultButton( KDialog::Yes );
>>      dialog->setEscapeButton( KDialog::No );
>> +    dialog->setButtonWhatsThis(KDialog::Yes, yeswhatsthis );
>> +    dialog->setButtonWhatsThis(KDialog::No, nowhatsthis);
>>      if( options & PlainCaption )
>>          dialog->setPlainCaption( caption );
>>  #ifdef Q_WS_X11
>> Index: kdeui/kmessagebox.h
>> ==================================================================> ---
>> kdeui/kmessagebox.h (revision 529556)
>> +++ kdeui/kmessagebox.h (working copy)
>> @@ -439,7 +439,9 @@
>>                           const QString &caption = QString(),
>>                           const KGuiItem &buttonContinue >
>> KStdGuiItem::cont(),
>>                           const QString &dontAskAgainName = QString(),
>> -                         Options options = Notify);
>> +                         Options options = Notify,
>> +                        const QString yeswhatsthis = QString(),
>> +                        const QString nowhatsthis = QString() );
>>
>>   /**
>>    * Display a Yes/No/Cancel "warning" dialog.
>>
>>
>>
>> den und ähnliche kann ich doch einchecken, oder ?
>>
>> danke
>>
>> Thorsten
>>
>> -------------------------------------------------------
>





More information about the kde-core-devel mailing list