aboutsummaryrefslogtreecommitdiff
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-12-07 20:38:44 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-12-07 20:38:44 -0600
commit95bc85d108e3564d98f26b7ad17fcc72b2966371 (patch)
treead0d9724caab0b7badf49cd668ff22fce342b4ae /src/menu.cpp
parent56e88207113e57eae7b24a718fa1ab177c6c9367 (diff)
downloadayatana-indicator-datetime-95bc85d108e3564d98f26b7ad17fcc72b2966371.tar.gz
ayatana-indicator-datetime-95bc85d108e3564d98f26b7ad17fcc72b2966371.tar.bz2
ayatana-indicator-datetime-95bc85d108e3564d98f26b7ad17fcc72b2966371.zip
ensure that disabled alarms aren't shown in indicator-datetime and that notifications aren't shown for them.
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp8
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());