[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Small kdelibs patch
From:       Albert Astals Cid <astals11 () terra ! es>
Date:       2005-01-10 23:50:14
Message-ID: 200501110050.14495.astals11 () terra ! es
[Download RAW message or body]

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

["kdelibs.patch" (text/x-diff)]

? 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("<qt>The application '<b>%1</b>' has requested to open the \
wallet '<b>%2</b>'. 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("<qt>The application '<b>%1</b>' 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("<qt>The application '<b>%1</b>' has requested to create a \
new wallet named '<b>%2</b>'. 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) {



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic