Show icons for actions with iconsets. Fix bug 20522.
author Ravikiran Rajagopal
()
committer Ravikiran Rajagopal
()
commit 58ad65784348fe4c7e61a3fa2ee3bf038abcc66a
tree f48051372ae37a4ad846802d38855bb6182da1c1
parent 9267208fbe090d7f28fb298f890e12ca16ac1c0d
Show icons for actions with iconsets. Fix bug 20522.

--- kedittoolbar.cpp 6 Mar 2003 18:02:08 -0000 1.74
+++ kedittoolbar.cpp 12 Mar 2003 19:28:46 -0000
@@ -707,7 +707,10 @@ void KEditToolbarWidget::loadActionList(
ToolbarItem *act = new ToolbarItem(m_activeList, it.tagName(), action->name(), action->toolTip());
act->setText(1, action->plainText());
if (action->hasIcon())
- act->setPixmap(0, BarIcon(action->icon(), 16));
+ if (!action->icon().isEmpty())
+ act->setPixmap(0, BarIcon(action->icon(), 16));
+ else // Has iconset
+ act->setPixmap(0, action->iconSet(KIcon::Toolbar).pixmap());

active_list.insert(action->name(), true);
break;
@@ -726,8 +729,11 @@ void KEditToolbarWidget::loadActionList(

ToolbarItem *act = new ToolbarItem(m_inactiveList, tagActionList, action->name(), action->toolTip());
act->setText(1, action->plainText());
- if (!action->icon().isEmpty())
+ if (action->hasIcon())
+ if (!action->icon().isEmpty())
act->setPixmap(0, BarIcon(action->icon(), 16));
+ else // Has iconset
+ act->setPixmap(0, action->iconSet(KIcon::Toolbar).pixmap());
}

// finally, add a default separator to the inactive list

svn path=/trunk/kdelibs/; revision=213448
kdeui/kedittoolbar.cpp