Werner Trobin wrote: > Can someone please tell me what happened to our funky > "icons" directory? All normal apps I've seen find their > toolbar icons (kmail, konquerer,...) but all KOffice > apps fail. Mighty strange. KOffice used to work ever since the new iconloader was introduced. Currently, I don't have the time to compile koffice because on wednesday I'm going on Interrail for 1 month. Let's hope we can clear this up before wednesday. > I looked in $KDEDIR/share/apps and found out that most > of the "normal" apps put all their icons into pics, but > all KOffice apps create a weird directory structure > (.../share/apps/kword/icons/hicolor/22x22/actions/ :) ) > The reason for that is, that they simply use > KDE_ICON=AUTO in the Makefile.am and name the icons > hi22-action-blah.png and so on. The weird directory structure is for themed icons. It allows for the drop-in replacement of the entire KDE icon set. I didn't hear of any drop in icon set yet, but it is certainly cool for themes etc. An overview of the entire icon loader can be found at: http://developer.kde.org/kde2arch/iconloader.html Please read it, it will explain everything :) > Konqueror, for example, uses KDE_ICON only for the app > icons and installs all the toolbar icons "by hand" to > ../share/apps/konqueror/pics. This latter directory is for "unthemed" icons. I don't know why konqy is using these, though. I think it should install the icons in the theme directories, so they can be replaced by a (3rd party) icon theme. I compiled a small test app (attached) and it works for me. This will illustrate how the iconloader works. Can you try it and see if it works? It will find the kword icon installed in $KDEDIR/share/apps/kword/icons/locolor/22x22/actions/sl_addentry.png PS: It is important that you add the right dirs with "addAppDir". This is done automatically for the instance name. Kword adds "koffice" itself. This way, for example, Kword should find the icons in share/apps/kword/icons/* ands hare/apps/koffice/icons/*. (and of course the "global" icons in share/icons/*) Greetings, Geert #include #include #include #include int main(int argc, char **argv) { KApplication app(argc, argv, "load_test"); KIconLoader *loader = KGlobal::iconLoader(); loader->addAppDir("koffice"); // find "koffice" icons loader->addAppDir("kword"); // find "kword" icons QPixmap pm = loader->loadIcon("sl_addentry", KIcon::Desktop); if (pm.isNull()) printf("NOT found\n"); else printf("found\n"); return 0; }