From 560a960e663e43f319e703fb9c8e394829066a42 Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Sun, 19 Nov 2017 22:01:32 +0100 Subject: panel-plugin: Set ac-adapter icon for desktop systems (Bug #13959) Unfortunately UPower does not differentiate between desktop and laptop systems so we decide that it's a desktop if it: * is not a UPS * does not have a battery * does not have a lid In this case we show the "ac-adapter" icon for the systray and the "ac-adapter-symbolic" icon for the Xfce Panel Plugin. Before the "battery-missing" icon was shown, which is what UPower reports for the display device. --- .../power-manager-plugin/power-manager-button.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'panel-plugins') diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c index 9518dc1d..2075aa3d 100644 --- a/panel-plugins/power-manager-plugin/power-manager-button.c +++ b/panel-plugins/power-manager-plugin/power-manager-button.c @@ -491,21 +491,10 @@ power_manager_button_update_device_icon_and_details (PowerManagerButton *button, /* update the icon */ g_free (button->priv->panel_icon_name); #ifdef XFCE_PLUGIN - g_object_get (device, - "icon-name", &icon_name, - NULL); - - /* ignore empty icon names */ - if (g_strcmp0(icon_name, "") == 0) - { - g_free (icon_name); - icon_name = NULL; - } - - if (icon_name == NULL) - icon_name = g_strdup (PANEL_DEFAULT_ICON_SYMBOLIC); -#endif + button->priv->panel_icon_name = g_strdup_printf ("%s-%s", icon_name, "symbolic"); +#else button->priv->panel_icon_name = g_strdup (icon_name); +#endif power_manager_button_set_icon (button); /* update the tooltip */ power_manager_button_set_tooltip (button); -- cgit v1.2.1