[Xfce4-commits] [xfce/xfce4-panel] 01/01: Use an empty placeholder icon for launcher (Bug #15819)

noreply at xfce.org noreply at xfce.org
Sun Dec 29 14:02:36 CET 2019


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

a   n   d   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/xfce4-panel.

commit bb1d0ac0bef04c754365fb8572145ad0e81aa0a5
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Dec 8 18:52:54 2019 -0300

    Use an empty placeholder icon for launcher (Bug #15819)
---
 plugins/launcher/launcher.c | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 8736218..5731aca 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1651,25 +1651,29 @@ launcher_plugin_menu_construct (LauncherPlugin *plugin)
 
       /* set the icon if one is set */
       icon_name = garcon_menu_item_get_icon_name (item);
-      if (!panel_str_is_empty (icon_name))
+
+      if (panel_str_is_empty (icon_name))
         {
-          if (g_path_is_absolute (icon_name))
-            {
-              /* remember the icon name for recreating the pixbuf when panel
-                 size changes */
-              plugin->icon_name = g_strdup (icon_name);
-              plugin->pixbuf = gdk_pixbuf_new_from_file_at_size (icon_name, 16, 16, NULL);
-              image = gtk_image_new_from_pixbuf (plugin->pixbuf);
-            }
-          else
-            {
-              image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
-              gtk_image_set_pixel_size (GTK_IMAGE (image), 16);
-              plugin->icon_name = NULL;
-            }
-          gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 3);
-          gtk_widget_show (image);
+          /* use an empty placeholder icon */
+          image = gtk_image_new_from_icon_name ("", GTK_ICON_SIZE_MENU);
         }
+      else if (g_path_is_absolute (icon_name))
+        {
+          /* remember the icon name for recreating the pixbuf when panel
+              size changes */
+          plugin->icon_name = g_strdup (icon_name);
+          plugin->pixbuf = gdk_pixbuf_new_from_file_at_size (icon_name, 16, 16, NULL);
+          image = gtk_image_new_from_pixbuf (plugin->pixbuf);
+        }
+      else
+        {
+          image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+          gtk_image_set_pixel_size (GTK_IMAGE (image), 16);
+          plugin->icon_name = NULL;
+        }
+
+      gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 3);
+      gtk_widget_show (image);
     }
 }
 

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


More information about the Xfce4-commits mailing list