aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-14 20:49:53 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-10-14 20:49:53 -0500
commitb702e8346b7337859f700a935b89046392be4ba9 (patch)
treec15cbeafad77cd22fcc5934a3d2ef3e8f2625f5b /src
parent1293e7fe8e13a6cae1798038e2511b0bc652be41 (diff)
downloadayatana-indicator-datetime-b702e8346b7337859f700a935b89046392be4ba9.tar.gz
ayatana-indicator-datetime-b702e8346b7337859f700a935b89046392be4ba9.tar.bz2
ayatana-indicator-datetime-b702e8346b7337859f700a935b89046392be4ba9.zip
add an icon for alarm appointment menuitems
Diffstat (limited to 'src')
-rw-r--r--src/service.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 480b4ce..6601914 100644
--- a/src/service.c
+++ b/src/service.c
@@ -36,6 +36,7 @@
#define SKEW_CHECK_INTERVAL_SEC 10
#define SKEW_DIFF_THRESHOLD_USEC ((SKEW_CHECK_INTERVAL_SEC+5) * G_USEC_PER_SEC)
+#define ALARM_CLOCK_ICON_NAME "alarm-clock"
G_DEFINE_TYPE (IndicatorDatetimeService,
indicator_datetime_service,
@@ -505,7 +506,7 @@ create_phone_header_state (IndicatorDatetimeService * self)
if ((has_alarms = service_has_alarms (self)))
{
GIcon * icon;
- icon = g_themed_icon_new_with_default_fallbacks ("alarm-clock");
+ icon = g_themed_icon_new_with_default_fallbacks (ALARM_CLOCK_ICON_NAME);
g_variant_builder_add (&b, "{sv}", "icon", g_icon_serialize (icon));
g_object_unref (icon);
}
@@ -735,7 +736,10 @@ add_appointments (IndicatorDatetimeService * self, GMenu * menu, gboolean terse)
menu_item = g_menu_item_new (appt->summary, NULL);
- if (appt->color && !appt->has_alarms)
+ if (appt->has_alarms)
+ g_menu_item_set_attribute (menu_item, G_MENU_ATTRIBUTE_ICON,
+ "s", ALARM_CLOCK_ICON_NAME);
+ else if (appt->color != NULL)
g_menu_item_set_attribute (menu_item, "x-canonical-color",
"s", appt->color);