aboutsummaryrefslogtreecommitdiff
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-10-28 06:06:45 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-10-28 08:19:49 +0200
commit0492e95dbf6a1f6285a4701379adb6b7d8553d6b (patch)
treed35fc8583d82f4825a5da9fd0ebc4a7dc9e6bb70 /src/menu.cpp
parent2a52d61b410b9d294c479ad53a06fb6f830b9605 (diff)
downloadayatana-indicator-datetime-0492e95dbf6a1f6285a4701379adb6b7d8553d6b.tar.gz
ayatana-indicator-datetime-0492e95dbf6a1f6285a4701379adb6b7d8553d6b.tar.bz2
ayatana-indicator-datetime-0492e95dbf6a1f6285a4701379adb6b7d8553d6b.zip
Drop the 'ubuntu' prefix from the alarm types and functions
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index b1ac75c..ab0bd71 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -1,5 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
+ * Copyright 2021 Robert Tari
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -15,6 +16,7 @@
*
* Authors:
* Charles Kerr <charles.kerr@canonical.com>
+ * Robert Tari <robert@tari.in>
*/
#include <datetime/menu.h>
@@ -401,7 +403,7 @@ private:
g_menu_item_set_attribute (menu_item, "x-ayatana-time", "x", unix_time);
g_menu_item_set_attribute (menu_item, "x-ayatana-time-format", "s", fmt.c_str());
- if (appt.is_ubuntu_alarm())
+ if (appt.is_alarm())
{
g_menu_item_set_attribute (menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.alarm");
g_menu_item_set_attribute_value(menu_item, G_MENU_ATTRIBUTE_ICON, get_serialized_alarm_icon());
@@ -598,16 +600,16 @@ protected:
GVariant* create_header_state()
{
// are there alarms?
- bool has_ubuntu_alarms = false;
+ bool has_alarms = false;
for(const auto& appointment : m_upcoming)
- if((has_ubuntu_alarms = appointment.is_ubuntu_alarm()))
+ if((has_alarms = appointment.is_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 and Date")));
g_variant_builder_add(&b, "{sv}", "visible", g_variant_new_boolean (TRUE));
- if (has_ubuntu_alarms)
+ if (has_alarms)
{
auto label = m_formatter->header.get();
auto a11y = g_strdup_printf(_("%s (has alarms)"), label.c_str());