From 47ab9adad438b137b5e7e9b33ce503e184e019f8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 22 Jan 2014 09:57:52 -0600 Subject: follow-up to r326, if we can't get the alarm icon from click, use a sane fallback icon --- src/menu.cpp | 11 +++++++++-- 1 file 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() { -- cgit v1.2.3