From kde-core-devel Mon Jan 10 23:50:14 2005 From: Albert Astals Cid Date: Mon, 10 Jan 2005 23:50:14 +0000 To: kde-core-devel Subject: Re: Small kdelibs patch Message-Id: <200501110050.14495.astals11 () terra ! es> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110540102830221 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_2Sx4BE6K+v8I5jC" --Boundary-00=_2Sx4BE6K+v8I5jC Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Here comes the new patch with the KGuiItem as Stephan suggested, looks better now :-) As for the KConfig *c = KGlobal::config(); i am removing it because nobody uses c in that funcion and i don't think it is needed to have a KGlobal::config(); call to do something, but if the KGlobal::config(); is really needed it should be commeted properly. Agree to commit now? Albert A Dilluns 10 Gener 2005 20:24, Stephan Binner va escriure: > On Monday 10 January 2005 19:55, Albert Astals Cid wrote: > > Have not checked, but if they don't have a similar behaviour then > > Use setButtonOk() instead. > > setButtonOk() is the right one but your implicitely created text-only > KGuiItem are not. Use KStdGuiItem::open() and > KGuiItem(i18n("C&reate"),"filenew") and the dialog will look even better > than before. > > Bye, > Steve --Boundary-00=_2Sx4BE6K+v8I5jC Content-Type: text/x-diff; charset="utf-8"; name="kdelibs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs.patch" ? kdelibs.patch ? kdecore/stamp-h3 ? kio/kssl/stamp-h4 Index: kdecore/kglobalsettings.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/kglobalsettings.cpp,v retrieving revision 1.84 diff -u -r1.84 kglobalsettings.cpp --- kdecore/kglobalsettings.cpp 26 Oct 2004 17:30:49 -0000 1.84 +++ kdecore/kglobalsettings.cpp 10 Jan 2005 23:48:15 -0000 @@ -374,7 +374,6 @@ _taskbarFont->setPointSize(11); _taskbarFont->setStyleHint(QFont::SansSerif); - KConfig *c = KGlobal::config(); KConfigGroup g( KGlobal::config(), "General" ); *_taskbarFont = g.readFontEntry("taskbarFont", _taskbarFont); Index: kio/misc/kwalletd/kwalletd.cpp =================================================================== RCS file: /home/kde/kdelibs/kio/misc/kwalletd/kwalletd.cpp,v retrieving revision 1.85 diff -u -r1.85 kwalletd.cpp --- kio/misc/kwalletd/kwalletd.cpp 21 Nov 2004 22:51:59 -0000 1.85 +++ kio/misc/kwalletd/kwalletd.cpp 10 Jan 2005 23:48:35 -0000 @@ -379,7 +379,7 @@ kpd->setPrompt(i18n("The application '%1' has requested to open the wallet '%2'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet))); } brandNew = false; - kpd->setButtonOKText(i18n("&Open")); + kpd->setButtonOK(KStdGuiItem::open()); } else { emptyPass = true; } @@ -393,7 +393,7 @@ kpd->setPrompt(i18n("The application '%1' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(QStyleSheet::escape(appid))); } brandNew = true; - kpd->setButtonOKText(i18n("&Open")); + kpd->setButtonOK(KStdGuiItem::open()); } else { kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0); if (appid.length() == 0) { @@ -402,7 +402,7 @@ kpd->setPrompt(i18n("The application '%1' has requested to create a new wallet named '%2'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet))); } brandNew = true; - kpd->setButtonOKText(i18n("&Create")); + kpd->setButtonOK(KGuiItem(i18n("&Create"),"filenew")); } if (kpd) { --Boundary-00=_2Sx4BE6K+v8I5jC--