[Xfce4-commits] [xfce/exo] 01/01: ExoIconView: Skip symbolic icons since they lead to double processing and are not very useful in the context of the ExoIconView widget (and clutter it up)

noreply at xfce.org noreply at xfce.org
Thu Jun 7 03:26:24 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/exo.

commit 94720e7460c57ea6cfdbbe49b948a587fb2d7180
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Jun 6 21:26:18 2018 -0400

    ExoIconView: Skip symbolic icons since they lead to double processing and are not very useful in the context of the ExoIconView widget (and clutter it up)
---
 exo/exo-icon-chooser-model.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/exo/exo-icon-chooser-model.c b/exo/exo-icon-chooser-model.c
index 5fc31e6..de8166d 100644
--- a/exo/exo-icon-chooser-model.c
+++ b/exo/exo-icon-chooser-model.c
@@ -464,6 +464,17 @@ exo_icon_chooser_model_merge_symlinks (gpointer key,
 
 
 
+static gboolean
+icon_name_is_symbolic (const gchar *icon_name)
+{
+  return g_str_has_suffix (icon_name, "-symbolic")
+      || g_str_has_suffix (icon_name, "-symbolic-ltr")
+      || g_str_has_suffix (icon_name, "-symbolic-rtl")
+      || g_str_has_suffix (icon_name, ".symbolic");
+}
+
+
+
 static void
 exo_icon_chooser_model_icon_theme_changed (GtkIconTheme        *icon_theme,
                                            ExoIconChooserModel *model)
@@ -502,6 +513,12 @@ exo_icon_chooser_model_icon_theme_changed (GtkIconTheme        *icon_theme,
   icons = gtk_icon_theme_list_icons (icon_theme, NULL);
   for (lp = icons; lp != NULL; lp = lp->next)
     {
+      /* Skip symbolic icons since they lead to double processing */
+      if (icon_name_is_symbolic (lp->data))
+      {
+        continue;
+      }
+
       item = g_slice_new0 (ExoIconChooserModelItem);
       item->icon_name = lp->data;
       item->context = EXO_ICON_CHOOSER_CONTEXT_OTHER;
@@ -534,6 +551,12 @@ exo_icon_chooser_model_icon_theme_changed (GtkIconTheme        *icon_theme,
       icons = gtk_icon_theme_list_icons (icon_theme, CONTEXT_NAMES[context]);
       for (lp = icons; lp != NULL; lp = lp->next)
         {
+          /* Skip symbolic icons since they lead to double processing */
+          if (icon_name_is_symbolic (lp->data))
+          {
+            continue;
+          }
+
           /* lookup the item in one of the hash tables */
           item = g_hash_table_lookup (items, lp->data);
           if (item == NULL)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list