"hicolor" algorithm clarification in Icon Theme Spec

Octavio Alvarez Piza alvarezp at alvarezp.ods.org
Mon Dec 25 00:10:33 EET 2006


Sorry for the long lines in my initial message.

Here is a proposed patch to fix the hicolor lookup in the pseudocode.

Octavio.

Index: default-icon-theme/spec/icon-theme-spec.xml
===================================================================
RCS file: /cvs/icon-theme/default-icon-theme/spec/icon-theme-spec.xml,v
retrieving revision 1.7
diff -u -r1.7 icon-theme-spec.xml
--- default-icon-theme/spec/icon-theme-spec.xml	7 Feb 2006 15:34:03 -0000	1.7
+++ default-icon-theme/spec/icon-theme-spec.xml	24 Dec 2006 22:06:52 -0000
@@ -477,6 +477,11 @@
   filename = FindIconHelper(icon, size, user selected theme);
   if filename != none
     return filename
+
+  filename = FindIconHelper(icon, size, "hicolor");
+  if filename != none
+    return filename
+
   return LookupFallbackIcon (icon)
 }
 FindIconHelper(icon, size, theme) {
@@ -486,8 +491,6 @@
 
   if theme has parents
     parents = theme.parents
-  else if theme != hicolor
-    parents = [hicolor]
 
   for parent in parents {
     filename = FindIconHelper (icon, size, parent)
@@ -579,6 +582,11 @@
   filename = FindBestIconHelper(iconList, size, user selected theme);
   if filename != none
     return filename
+
+  filename = FindBestIconHelper(iconList, size, "hicolor");
+  if filename != none
+    return filename
+
   for icon in iconList {
     filename = LookupFallbackIcon (icon)
     if filename != none
@@ -595,8 +603,6 @@
 
   if theme has parents
     parents = theme.parents
-  else if theme != hicolor
-    parents = [hicolor]
 
   for parent in parents {
     filename = FindBestIconHelper (iconList, size, parent)
@@ -736,6 +742,19 @@
   <appendix id="changes">
     <title>Change history</title>
     <formalpara>
+      <title>Version 0.12, 24 December 2006, Octavio Alvarez</title>    
+      <para>
+	<itemizedlist>
+	  <listitem>
+	    <para>
+            Fixed "hicolor" lookup in the pseudocode, so it works with multiple
+            parents.
+	    </para>
+	  </listitem>
+	</itemizedlist>
+      </para>
+    </formalpara>
+    <formalpara>
       <title>Version 0.11, 7 February 2006, Alexander Larsson</title>    
       <para>
 	<itemizedlist>




More information about the xdg mailing list