aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-session.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-15 10:03:56 -0500
committerTed Gould <ted@gould.cx>2010-03-15 10:03:56 -0500
commit39e00ebbbf5a23620a3e8b7a46d759913cc7fcd2 (patch)
treef85fe17c59f71266cd3528a1387cfa8ceb0f70fb /src/indicator-session.c
parent32e57df9ecf74f6fb99b34fc47ff8cfbc7ec431d (diff)
parent70a0dc7cf431dd2c7d4faa7081cbd7ea637a825f (diff)
downloadayatana-indicator-session-39e00ebbbf5a23620a3e8b7a46d759913cc7fcd2.tar.gz
ayatana-indicator-session-39e00ebbbf5a23620a3e8b7a46d759913cc7fcd2.tar.bz2
ayatana-indicator-session-39e00ebbbf5a23620a3e8b7a46d759913cc7fcd2.zip
Switching the names of the restart icons.
Diffstat (limited to 'src/indicator-session.c')
-rw-r--r--src/indicator-session.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 4ae9c66..c21579a 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -168,6 +168,14 @@ indicator_session_finalize (GObject *object)
static void
icon_name_get_cb (DBusGProxy *proxy, char * OUT_name, GError *error, gpointer userdata)
{
+ if (error != NULL) {
+ return;
+ }
+
+ if (OUT_name == NULL || OUT_name[0] == '\0') {
+ return;
+ }
+
IndicatorSession * self = INDICATOR_SESSION(userdata);
indicator_image_helper_update(self->status_image, OUT_name);
return;
@@ -327,12 +335,14 @@ restart_property_change (DbusmenuMenuitem * item, const gchar * property, const
} else if (g_strcmp0(property, RESTART_ITEM_ICON) == 0) {
GtkWidget * image = gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(gmi));
+ GIcon * gicon = g_themed_icon_new_with_default_fallbacks(g_value_get_string(value));
if (image == NULL) {
- image = gtk_image_new_from_icon_name(g_value_get_string(value), GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_gicon(gicon, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(gmi), image);
} else {
- gtk_image_set_from_icon_name(GTK_IMAGE(image), g_value_get_string(value), GTK_ICON_SIZE_MENU);
+ gtk_image_set_from_gicon(GTK_IMAGE(image), gicon, GTK_ICON_SIZE_MENU);
}
+ g_object_unref(G_OBJECT(gicon));
}
return;