From kde-core-devel Tue Aug 24 19:43:42 1999 From: Michael Reiher Date: Tue, 24 Aug 1999 19:43:42 +0000 To: kde-core-devel Subject: User defined iconpaths X-MARC-Message: https://marc.info/?l=kde-core-devel&m=93552360101719 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------433C1BF7686DCDD655C71397" This is a multi-part message in MIME format. --------------433C1BF7686DCDD655C71397 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all, Problem: I was told that that a thing missed by many people is that you canīt define own iconpaths that are added to the iconloader dialog which is displayed when changing an icon on the desktop. This way people canīt easily add own icon collections. A candidate is for instance /opt/kde/share/apps/kappfinder/pics (which should IMHO be installed by default to /share/icons/.. anyway) I know there is IconPath in .kderc. But kfm cleans kiconloaders icon path list(which contains also various large icons and toolbar icons dirs). Further itīs AFAIK not possible to add global paths in parallel(except a [KDE Setup] section in kfmrc, which OTOH covers the entries .kderc). Solution: Reading of .kderc/[KDE Setup]/IconPath. And in addition (.)kfmrc/Settings/IconPath to make global settings possible. Couldnīt find a more appropriate place for this. Patch attached. Do we need a GUI config for that? Comments, flames, critics? Greets Michael -- Michael Reiher Student at Dresden University of Technology Department of Computer Science email: michael.reiher@gmx.de --------------433C1BF7686DCDD655C71397 Content-Type: text/plain; charset=us-ascii; name="kfm_iconpath.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kfm_iconpath.diff" ? kfm_iconpath.diff Index: kfmw.cpp =================================================================== RCS file: /home/kde/kdebase/kfm/Attic/kfmw.cpp,v retrieving revision 1.1.2.3 diff -u -r1.1.2.3 kfmw.cpp --- kfmw.cpp 1999/04/07 11:34:34 1.1.2.3 +++ kfmw.cpp 1999/08/24 19:16:10 @@ -53,6 +53,28 @@ tmp += "/share/icons"; list->append( tmp.data() ); + KConfig *config = kapp->getConfig(); + QStrList dirList; + config->setGroup("KDE Setup"); + config->readListEntry( "IconPath", dirList, ':' ); + + for (const char *it=dirList.first(); it; it = dirList.next()) { + QDir dir( it ); + + if (dir.exists()) + list->append( it ); + } + + config->setGroup("Settings"); + config->readListEntry( "IconPath", dirList, ':' ); + + for (const char *it=dirList.first(); it; it = dirList.next()) { + QDir dir( it ); + + if (dir.exists()) + list->append( it ); + } + if ( KfmGui::rooticons ) { kapp->enableSessionManagement( TRUE ); @@ -62,7 +84,6 @@ connect( kapp, SIGNAL( shutDown() ), this, SLOT( slotShutDown() ) ); // Global configuration - KConfig *config = kapp->getConfig(); config->setGroup("KFM Misc Defaults"); bAllowURLProps = config->readBoolEntry( "EnablePerURLProps", false ); bTreeViewFollowMode = config->readBoolEntry( "TreeFollowsView", false); --------------433C1BF7686DCDD655C71397--