diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-12-08 23:08:41 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2014-12-08 23:08:41 +0000 |
commit | 13688fe9fffc1d9dad3bf5918efcc8221846c82b (patch) | |
tree | e6c54b125ac8689581d32678163c57514e8a0c96 /src/menu.cpp | |
parent | 5186d1c20416dd4726de863b638a49b885ef7b9a (diff) | |
parent | 95bc85d108e3564d98f26b7ad17fcc72b2966371 (diff) | |
download | ayatana-indicator-datetime-13688fe9fffc1d9dad3bf5918efcc8221846c82b.tar.gz ayatana-indicator-datetime-13688fe9fffc1d9dad3bf5918efcc8221846c82b.tar.bz2 ayatana-indicator-datetime-13688fe9fffc1d9dad3bf5918efcc8221846c82b.zip |
Add support for x-canonical-alarm and x-canonical-disabled tags in VTODO categories so that disabled alarms will not be displayed. Fixes: #1387231
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'src/menu.cpp')
-rw-r--r-- | src/menu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index 6dcac27..f11de77 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -316,7 +316,7 @@ private: g_menu_item_set_attribute (menu_item, "x-canonical-time", "x", unix_time); g_menu_item_set_attribute (menu_item, "x-canonical-time-format", "s", fmt.c_str()); - if (appt.has_alarms) + if (appt.is_ubuntu_alarm()) { g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "com.canonical.indicator.alarm"); g_menu_item_set_attribute_value(menu_item, G_MENU_ATTRIBUTE_ICON, get_serialized_alarm_icon()); @@ -509,16 +509,16 @@ protected: GVariant* create_header_state() { // are there alarms? - bool has_alarms = false; + bool has_ubuntu_alarms = false; for(const auto& appointment : m_upcoming) - if((has_alarms = appointment.has_alarms)) + if((has_ubuntu_alarms = appointment.is_ubuntu_alarm())) break; GVariantBuilder b; g_variant_builder_init(&b, G_VARIANT_TYPE_VARDICT); g_variant_builder_add(&b, "{sv}", "title", g_variant_new_string (_("Time & Date"))); g_variant_builder_add(&b, "{sv}", "visible", g_variant_new_boolean (TRUE)); - if (has_alarms) + if (has_ubuntu_alarms) { auto label = m_formatter->header.get(); auto a11y = g_strdup_printf(_("%s (has alarms)"), label.c_str()); |