Support for xdg-list icon themes

Bernhard Rosenkraenzer bero at redhat.de
Tue May 28 10:27:55 BST 2002


Hi,
any objections to committing this patch?

It adds support for the xdg-list icon theme spec (which happens to be 
almost identical to the current one).

Index: kdecore/kicontheme.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kicontheme.cpp,v
retrieving revision 1.43
diff -u -u -r1.43 kicontheme.cpp
--- kdecore/kicontheme.cpp	2002/04/28 21:54:28	1.43
+++ kdecore/kicontheme.cpp	2002/05/28 09:26:14
@@ -120,8 +120,16 @@
         return;
     }
 
-    KSimpleConfig cfg(mDir + "index.desktop");
-    cfg.setGroup("KDE Icon Theme");
+    QString fileName, mainSection;
+    if(QFile::exists(mDir + "index.desktop")) {
+	fileName = mDir + "index.desktop";
+	mainSection="KDE Icon Theme";
+    } else {
+	fileName = mDir + "index.theme";
+	mainSection="Icon Theme";
+    }
+    KSimpleConfig cfg(fileName);
+    cfg.setGroup(mainSection);
     mName = cfg.readEntry("Name");
     mDesc = cfg.readEntry("Comment");
     mDepth = cfg.readNumEntry("DisplayDepth", 32);
@@ -164,7 +172,7 @@
     groups += "Small";
     groups += "Panel";
     const int defDefSizes[] = { 32, 22, 22, 16, 32 };
-    cfg.setGroup("KDE Icon Theme");
+    cfg.setGroup(mainSection);
     for (it=groups.begin(), i=0; it!=groups.end(); it++, i++)
     {
         mDefSize[i] = cfg.readNumEntry(*it + "Default", defDefSizes[i]);

LLaP
bero

-- 
This message is provided to you under the terms outlined at
http://www.bero.org/terms.html





More information about the kde-core-devel mailing list