On Thu, Nov 21, 2013 at 10:40:42AM -0500, Jasper St. Pierre wrote:
> On Thu, Nov 21, 2013 at 10:35 AM, Patrick Welche <[email protected]> wrote:
> 
> > On Thu, Nov 21, 2013 at 10:07:55AM -0500, Jasper St. Pierre wrote:
> > > On Thu, Nov 21, 2013 at 9:38 AM, Patrick Welche <[email protected]> wrote:

> > > > (gtk-update-icon-cache --validate returns 0 for those two directories
> > > >  so validates OK.
> > > >  Is there an easy way of dumping the contents of the cache?)

Is there a way of validating

   gnome/icon-theme.cache    gnome/index.theme

further?

> I'd put a print statement inside the for loop near that if statement that
> prints the theme name, e.g.
> 
>     g_print ("searching theme %s\n", theme->name);
> 
> It sounds to me like the gnome icon theme isn't being properly added. Maybe
> also put lots of print statements in insert_theme. Is that being called
> with "gnome" as a theme name? Is it bailing out at some point before it's
> supposed to?

At least g_key_file_load_from_file() is not giving an error with
icons/gnome/index.theme

Probably why icons/gnome cache was found in earlier post? If there
were a problem, "found cache for ...icons/gnome" wouldn't have been
printed?

gtk_icon_theme_lookup_icon dialog-password
theme_lookup_icon: searching theme hicolor for dialog-password
...
theme_lookup_icon found dialog-password in dir (null)

I don't see "searching theme gnome for dialog-password" yet it is found.

gtk_icon_theme_lookup_icon go-up-symbolic
theme_lookup_icon: searching theme hicolor for go-up-symbolic
...
theme_lookup_icon: searching theme gnome for go-up-symbolic
...
theme_lookup_icon look for go-up-symbolic in dir .../hicolor/48x48/actions
theme_lookup_icon look for go-up-symbolic in dir .../gnome/48x48/actions
...

BUT not in icons/gnome/scalable/actions


Cheers,

Patrick
--- gtk/gtkicontheme.c.orig     2013-11-11 13:53:39.000000000 +0000
+++ gtk/gtkicontheme.c
@@ -1098,6 +1098,8 @@ insert_theme (GtkIconTheme *icon_theme, 
   
   priv = icon_theme->priv;
 
+  GTK_NOTE (ICONTHEME, g_print ("insert_theme %s\n", theme_name));
+
   for (l = priv->themes; l != NULL; l = l->next)
     {
       theme = l->data;
@@ -1136,11 +1138,15 @@ insert_theme (GtkIconTheme *icon_theme, 
          g_key_file_load_from_file (theme_file, path, 0, &error);
          if (error)
            {
+              GTK_NOTE (ICONTHEME, 
+                g_print ("Error loading %s: %s\n", path, error->message));
              g_key_file_free (theme_file);
              theme_file = NULL;
              g_error_free (error);
              error = NULL;
            }
+          else
+            GTK_NOTE (ICONTHEME, g_print ("Loaded %s successfully\n", path));
        }
       g_free (path);
     }
@@ -1634,6 +1640,10 @@ choose_icon (GtkIconTheme       *icon_th
       icon_info = g_object_ref (icon_info);
       remove_from_lru_cache (icon_theme, icon_info);
 
+      GTK_NOTE (ICONTHEME, 
+               g_print ("choose_icon: found %s in cache\n", 
+                     g_strjoinv (",", icon_info->key.icon_names)));
+
       return icon_info;
     }
 
@@ -2813,6 +2823,10 @@ theme_lookup_icon (IconTheme          *t
   min_difference = G_MAXINT;
   min_dir = NULL;
 
+  GTK_NOTE (ICONTHEME, 
+            g_print ("theme_lookup_icon: searching theme %s for %s\n",
+                     theme->name, icon_name));
+
   /* Builtin icons are logically part of the default theme and
    * are searched before other subdirectories of the default theme.
    */
@@ -2822,8 +2836,13 @@ theme_lookup_icon (IconTheme          *t
                                           size, scale,
                                           &min_difference);
 
+
       if (min_difference == 0)
-       return icon_info_new_builtin (closest_builtin);
+        {
+          GTK_NOTE (ICONTHEME,
+                    g_print ("theme_lookup_icon found %s in builtins\n", 
icon_name));
+          return icon_info_new_builtin (closest_builtin);
+        }
 
       dirs = builtin_dirs;
     }
@@ -2836,7 +2855,7 @@ theme_lookup_icon (IconTheme          *t
       dir = l->data;
 
       GTK_NOTE (ICONTHEME,
-               g_print ("theme_lookup_icon dir %s\n", dir->dir));
+               g_print ("theme_lookup_icon look for %s in dir %s\n", 
icon_name, dir->dir));
       suffix = theme_dir_get_icon_suffix (dir, icon_name, NULL);
       if (best_suffix (suffix, allow_svg) != ICON_SUFFIX_NONE)
        {
@@ -2926,11 +2945,18 @@ theme_lookup_icon (IconTheme          *t
                                                              
min_dir->subdir_index);
        }
 
+      GTK_NOTE (ICONTHEME,
+               g_print ("theme_lookup_icon found %s in dir %s\n", icon_name, 
min_dir->dir));
+
       return icon_info;
     }
 
   if (closest_builtin)
-    return icon_info_new_builtin (closest_builtin);
+    {
+      GTK_NOTE (ICONTHEME,
+                g_print ("theme_lookup_icon found (close to) %s in 
builtins\n", icon_name));
+      return icon_info_new_builtin (closest_builtin);
+    }
   
   return NULL;
 }
_______________________________________________
gtk-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to