Bug 20522 - kedittoolbar.c not using actions with iconset
Summary: kedittoolbar.c not using actions with iconset
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Other
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-15 22:18 UTC by Rafi Yanai
Modified: 2003-03-12 20:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafi Yanai 2001-02-15 22:05:15 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: kdelibs
Version: 2.1 Beta 2
Severity: wishlist
Installed from: Source

when using the XML toolbars editor - the editor won't show
icons for action that were created with iconset ( not icon filename ) and will show them as available item.

i made a small patch thats works for me but i'm not a diff person so i'll just attach the functions i changed from kedittoolbar.cpp:

void KEditToolbarWidget::loadActionList(QDomElement& elem)
{
    .
    .
    // if iconset exist - use the small icon !
    if (!action->icon().isEmpty())
          act->setPixmap(0 BarIcon(action->icon() 16));
        else if(action->hasIconSet())
          act->setPixmap(0 action->iconSet().pixmap(QIconSet::SmallQIconSet::Normal));
    .
    .
    .
    // insert this into the inactive list
    // for now only deal with buttons with icons.. later we'll need
    // to look into actions a LOT more carefully
    // Hmm we also accept non-basic-KActions that have no icon
    // (e.g. konqueror's location bar)
    if ( action->icon().isEmpty() && !action->hasIconSet() && action->isA("KAction") )
      continue;

    ToolbarItem *act = new ToolbarItem(m_inactiveList action->name() action->statusText());
    act->setText(1 action->plainText());
    if (!action->icon().isEmpty())
        act->setPixmap(0 BarIcon(action->icon() 16));
    else if(action->hasIconSet())
        act->setPixmap(0 action->iconSet().pixmap(QIconSet::SmallQIconSet::Normal));
   .
   .
   .

}

i hope someone will be able to understand that - else
i'll mail you the whole file...



(submitted via bugs.kde.org)
Comment 1 Rafi Yanai 2001-02-17 12:42:11 UTC
it was late when a i submitted the bug and i made a mistake in
the bug description:

when using the XML toolbars editor - the editor won't show
icons for action that were created with iconset ( not icon filename ) and
will /***NOT***/  show  them as available items.

the result is that the editor will show the current actions on
the toolbar (without icons) but if you'll remove them -
you have no way to add them again...
Comment 2 Ravikiran Rajagopal 2003-03-12 20:30:19 UTC
Subject: Re:

Thank you for your bug report.
The bug that you reported has been identified and has been fixed in the
latest development (CVS) version of KDE. The bug report will be closed.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+b4rDbI8Y8y0oVXcRAqYmAJ9B0yAeReSi/qdcbMtXl9YnJ/fwfwCfZdWV
xOYnSaKvtZfhV2hubp7rHqM=
=kPJX
-----END PGP SIGNATURE-----