From kde-devel Tue Jan 08 05:20:59 2002 From: "Lawrence E. Widman" Date: Tue, 08 Jan 2002 05:20:59 +0000 To: kde-devel Subject: IconLoader cannot find icons in 2.2.1 or 3.0 beta 1 X-MARC-Message: https://marc.info/?l=kde-devel&m=101046725916362 I am the new maintainer for kdat (tape backup utility) and am having trouble getting KIconLoader to find the icons. They are found without trouble in KDE 1.x, but not in 2.2.1 or in 3.0 beta 1. The same problem was reported by Jon Doud to this list on 21 Sep 2001 11:27:46 -0400. The code that looks for the icons is: KIconLoader *l = KGlobal::iconLoader(); _archive = new QPixmap(l->iconPath("package", KIcon::Toolbar)); _backup = new QPixmap(l->iconPath("kdat_backup", KIcon::Toolbar)); .... The icons as distributed with the utility are named as: hi32-app-kdat.png hi48-app-kdat.png lo16-app-closed.png lo16-app-kdat.png .... The kdeamin package comes with a script am_edit that is in ./kdeadmin/admin/am_edit that creates Makefile.in with code to install the icons in subdirectories of $(kdaticondir) according to the prefixes on the icon's name. For example, lo16-app-closed.png -> $(kdaticondir)/locolor/16x16/apps/closed.png The problem is that KIconLoader isn't looking there. It's looking in $KDEDIR/share/icons for the simple icon names (e.g., closed.png). I note that when I compiled konqueror, it put the icons in the application/color/size-specific subdirectory and the application finds it fine. However, KIconLoader isn't instantiated in konqueror or in libkonq. One solution is to change the Makefile to put the icons where KIconLoader is looking. The problem with that is that all the Makefiles are made by automake and aren't distributed directly. Another solution is to use a different argument to the _ICON macro. Currently, Makefile.am for the icons contains: kdaticondir = $(kde_datadir)/kdat/icons kdaticon_ICON = AUTO The am_edit perl script says that a list of files can be substituted for AUTO, but that doesn't work. Another solution is to use a different macro, but all the macros I see are content-specific, and I don't see a clean way to do that. So, my question is, is the KIconLoader behavior I'm seeing the way it's supposed to be (i.e., looking in $KDEDIR/share/icons rather than in an application-specific and color/size-specific directory)? 1. If so, how can I get automake to put the icons there? 2. If not, how do I fix it? Thanks! - Larry Widman >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<