diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-10-02 19:18:09 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-10-02 19:18:09 +0200 |
commit | 6db7184a6aeb9a455f4e92285c80eeb26e58a10c (patch) | |
tree | de54749ff92645cd9fe6895f15088a73117ffc72 /src/indicator-messages.c | |
parent | ae13eca41e451c2516f9a534969b0c35fcf9e719 (diff) | |
parent | 22a6fdb518be4189a13f4d8a7f0b07122cc87cdd (diff) | |
download | ayatana-indicator-messages-6db7184a6aeb9a455f4e92285c80eeb26e58a10c.tar.gz ayatana-indicator-messages-6db7184a6aeb9a455f4e92285c80eeb26e58a10c.tar.bz2 ayatana-indicator-messages-6db7184a6aeb9a455f4e92285c80eeb26e58a10c.zip |
Merge lp:~larsu/indicator-messages/lp1056595
Use fallback icon names (without status emblems).
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 13b3409..5c5df31 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -340,11 +340,20 @@ static void indicator_messages_update_icon (IndicatorMessages *self, GVariant *state) { + GIcon *icon; + GError *error = NULL; + g_return_if_fail (g_variant_is_of_type (state, G_VARIANT_TYPE_STRING)); - gtk_image_set_from_icon_name (GTK_IMAGE (self->image), - g_variant_get_string (state, NULL), - GTK_ICON_SIZE_LARGE_TOOLBAR); + icon = g_icon_new_for_string (g_variant_get_string (state, NULL), &error); + if (icon == NULL) { + g_warning ("unable to load icon: %s", error->message); + g_error_free (error); + } + else { + gtk_image_set_from_gicon (GTK_IMAGE (self->image), icon, GTK_ICON_SIZE_LARGE_TOOLBAR); + g_object_unref (icon); + } } static void |