[Xfce4-commits] [xfce/xfce4-power-manager] 01/02: Fix panel plugin icon loading

noreply at xfce.org noreply at xfce.org
Wed May 27 18:15:37 CEST 2015


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

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 53fdf5ccc0d3195c410adf894d9f89f48e48ec5c
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Wed May 27 18:43:53 2015 +0300

    Fix panel plugin icon loading
    
    This reverts 0dd1196b8fc5c8634f858c4f68e5ff7360a4da01
    and adds an additional check for UPower returning "" for the icon
    name.
---
 panel-plugins/power-manager-plugin/power-manager-button.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c
index 15e2689..c012230 100644
--- a/panel-plugins/power-manager-plugin/power-manager-button.c
+++ b/panel-plugins/power-manager-plugin/power-manager-button.c
@@ -407,7 +407,13 @@ power_manager_button_update_device_icon_and_details (PowerManagerButton *button,
         DBG("this is the display device, updating");
         /* it is! update the panel button */
         g_free (button->priv->panel_icon_name);
-
+#ifdef XFCE_PLUGIN
+        g_object_get (device,
+                      "icon-name", &icon_name,
+                      NULL);
+        if (icon_name == NULL || g_strcmp0(icon_name, "") == 0)
+            icon_name = g_strdup (PANEL_DEFAULT_ICON);
+#endif
         button->priv->panel_icon_name = g_strdup (icon_name);
         power_manager_button_set_icon (button);
         /* update tooltip */

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


More information about the Xfce4-commits mailing list