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 | |
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')
-rw-r--r-- | src/indicator-messages.c | 15 | ||||
-rw-r--r-- | src/messages-service.c | 4 |
2 files changed, 16 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 diff --git a/src/messages-service.c b/src/messages-service.c index 73f3d35..b36a0a2 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -70,6 +70,10 @@ indicator_messages_get_icon_name () g_string_append (name, "-new"); icon = g_themed_icon_new (name->str); + g_themed_icon_append_name (G_THEMED_ICON (icon), + draws_attention ? "indicator-messages-new" + : "indicator-messages"); + iconstr = g_icon_to_string (icon); g_object_unref (icon); |