aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-06-30 12:11:30 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-06-30 12:11:30 +0100
commit7df88064c07d42c4a8abb6b14af1d9907b3934c3 (patch)
tree063e1a80bae2f78c810d94d926cd76280610cf8e /src
parent950c5a0f4f296cd7586200e9f81e6fe926ba36dc (diff)
downloadayatana-indicator-power-7df88064c07d42c4a8abb6b14af1d9907b3934c3.tar.gz
ayatana-indicator-power-7df88064c07d42c4a8abb6b14af1d9907b3934c3.tar.bz2
ayatana-indicator-power-7df88064c07d42c4a8abb6b14af1d9907b3934c3.zip
Specify what icon we want to show
Seems that indicator_image_helper_update() is not smarter enough to handle the string retrieved from the g-p-m interface
Diffstat (limited to 'src')
-rw-r--r--src/indicator-power.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 2235828..96222ac 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -169,6 +169,7 @@ get_primary_device_cb (GObject *source_object,
GError *error = NULL;
const gchar *title = NULL;
gchar *details = NULL;
+ gchar **device_icons;
gchar *device_icon = NULL;
gchar *object_path = NULL;
gdouble percentage;
@@ -197,8 +198,10 @@ get_primary_device_cb (GObject *source_object,
g_debug ("got data from object %s", object_path);
/* set icon */
+ device_icons = g_strsplit (device_icon, " ", -1);
indicator_image_helper_update (priv->status_image,
- device_icon);
+ device_icons[3]);
+ g_strfreev (device_icons);
gtk_widget_show (GTK_WIDGET (priv->status_image));
/* get the title