[gtk+] gtk-demo: Only show non-symbolic icons in toolpalette



commit d800203b883a9cdf0eb340d96d7cfa3c964e963e
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jun 30 13:28:46 2014 -0400

    gtk-demo: Only show non-symbolic icons in toolpalette
    
    Otherwise, we get every icon twice. To switch between symbolic
    and non-symbolic icons, this css fragment comes in handy:
    * { -gtk-icon-style: symbolic; }

 demos/gtk-demo/toolpalette.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c
index 1f5bf9b..f8d9573 100644
--- a/demos/gtk-demo/toolpalette.c
+++ b/demos/gtk-demo/toolpalette.c
@@ -668,7 +668,10 @@ load_icon_items (GtkToolPalette *palette)
           GtkToolItem *item;
           gchar *id = ll->data;
 
-          if (g_strcmp0 (id, "emblem-desktop") == 0)
+          if (g_str_equal (id, "emblem-desktop"))
+            continue;
+
+          if (g_str_has_suffix (id, "-symbolic"))
             continue;
 
           g_message ("Got id '%s'", id);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]