aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-22 09:57:52 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-22 09:57:52 -0600
commit47ab9adad438b137b5e7e9b33ce503e184e019f8 (patch)
tree7e9f8d6a0d4e5ca43c029883003416f57df7210e
parentb4a6c506a38e5e9d364a3909eb4aeeed91ed36c8 (diff)
downloadayatana-indicator-datetime-47ab9adad438b137b5e7e9b33ce503e184e019f8.tar.gz
ayatana-indicator-datetime-47ab9adad438b137b5e7e9b33ce503e184e019f8.tar.bz2
ayatana-indicator-datetime-47ab9adad438b137b5e7e9b33ce503e184e019f8.zip
follow-up to r326, if we can't get the alarm icon from click, use a sane fallback icon
-rw-r--r--src/menu.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index 503d47c..9e76d4b 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -35,7 +35,7 @@ namespace datetime {
*****
****/
-#define ALARM_CLOCK_ICON_NAME "alarm-clock"
+#define FALLBACK_ALARM_CLOCK_ICON_NAME "clock"
#define CALENDAR_ICON_NAME "calendar"
class MenuImpl: public Menu
@@ -163,8 +163,15 @@ private:
g_free(icon_filename);
}
+ if (serialized == nullptr)
+ {
+ auto i = g_themed_icon_new_with_default_fallbacks(FALLBACK_ALARM_CLOCK_ICON_NAME);
+ serialized = g_icon_serialize(i);
+ g_object_unref(i);
+ }
+
return serialized;
- }
+ }
GVariant* get_serialized_calendar_icon()
{