[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    User defined iconpaths
From:       Michael Reiher <michael.reiher () gmx ! de>
Date:       1999-08-24 19:43:42
[Download RAW message or body]

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
["kfm_iconpath.diff" (text/plain)]

? 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);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic