[PATCH] Using iconSet instead of icon names in KToolBarPopupAction
Tobias Koenig
tokoe at kde.org
Fri Nov 21 18:02:15 GMT 2003
On Fri, Nov 21, 2003 at 06:15:10PM +0100, David Faure wrote:
> On Friday 21 November 2003 17:53, Tobias Koenig wrote:
Hi David,
> Other actions use hasIconSet() before using iconSet(). I think the same
> should be done here - and still use icon() otherwise.
> See e.g. KActionMenu::plug
Ahh, thanks for this hint... new patch attatched, ok?
Ciao,
Tobias
--
Can a government that shoots at reporters be democratic?
Separate politics from religion and economy!
-------------- next part --------------
Index: kactionclasses.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kactionclasses.cpp,v
retrieving revision 1.331
diff -p -u -b -r1.331 kactionclasses.cpp
--- kactionclasses.cpp 17 Nov 2003 16:08:38 -0000 1.331
+++ kactionclasses.cpp 21 Nov 2003 18:01:06 -0000
@@ -1811,6 +1811,11 @@ int KToolBarPopupAction::plug( QWidget *
int id_ = KAction::getToolButtonID();
+ if ( !iconSet().isNull() ) {
+ bar->insertButton( iconSet().pixmap(), id_, SIGNAL( clicked() ), this,
+ SLOT( slotActivated() ), isEnabled(), plainText(),
+ index );
+ } else {
KInstance * instance;
if ( m_parentCollection )
instance = m_parentCollection->instance();
@@ -1820,6 +1825,7 @@ int KToolBarPopupAction::plug( QWidget *
bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
+ }
addContainer( bar, id_ );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031121/ef993c62/attachment.sig>
More information about the kde-core-devel
mailing list