aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/indicator-messages.c15
-rw-r--r--src/messages-service.c4
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);