diff options
author | Robert Tari <robert@tari.in> | 2020-08-11 12:07:23 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2020-08-11 12:07:23 +0200 |
commit | fab51b477ad295de8ae5e030ceef09104feea09b (patch) | |
tree | 3373fcba7d4755665fe2987116bc5fea114312cf /src | |
parent | 594bd0b5b81f4b46decc2d0bbebae5a94ab28b5a (diff) | |
download | ayatana-indicator-datetime-fab51b477ad295de8ae5e030ceef09104feea09b.tar.gz ayatana-indicator-datetime-fab51b477ad295de8ae5e030ceef09104feea09b.tar.bz2 ayatana-indicator-datetime-fab51b477ad295de8ae5e030ceef09104feea09b.zip |
Replace x-canonical attributes
Diffstat (limited to 'src')
-rw-r--r-- | src/engine-eds.cpp | 4 | ||||
-rw-r--r-- | src/menu.cpp | 22 | ||||
-rw-r--r-- | src/notifications.cpp | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index f8a4ce8..3120b3f 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -35,8 +35,8 @@ namespace ayatana { namespace indicator { namespace datetime { -static constexpr char const * TAG_ALARM {"x-canonical-alarm"}; -static constexpr char const * TAG_DISABLED {"x-canonical-disabled"}; +static constexpr char const * TAG_ALARM {"x-ayatana-alarm"}; +static constexpr char const * TAG_DISABLED {"x-ayatana-disabled"}; static constexpr char const * X_PROP_ACTIVATION_URL {"X-CANONICAL-ACTIVATION-URL"}; diff --git a/src/menu.cpp b/src/menu.cpp index b8e9728..5469dd1 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -88,7 +88,7 @@ protected: update_header(); }); m_formatter->header_format.changed().connect([this](const std::string&){ - update_section(Locations); // need to update x-canonical-time-format + update_section(Locations); // need to update x-ayatana-time-format }); m_formatter->relative_format_changed.connect([this](){ update_section(Appointments); // uses formatter.relative_format() @@ -219,7 +219,7 @@ private: // add submenu to the header const auto detailed_action = std::string("indicator.") + name() + "-header"; auto header = g_menu_item_new(nullptr, detailed_action.c_str()); - g_menu_item_set_attribute(header, "x-canonical-type", "s", + g_menu_item_set_attribute(header, "x-ayatana-type", "s", "org.ayatana.indicator.root"); g_menu_item_set_attribute(header, "submenu-action", "s", "indicator.calendar-active"); @@ -270,7 +270,7 @@ private: item = g_menu_item_new ("[calendar]", nullptr); v = g_variant_new_int64(0); g_menu_item_set_action_and_target_value (item, "indicator.calendar", v); - g_menu_item_set_attribute (item, "x-canonical-type", + g_menu_item_set_attribute (item, "x-ayatana-type", "s", "org.ayatana.indicator.calendar"); if (action_name != nullptr) g_menu_item_set_attribute (item, "activation-action", "s", action_name); @@ -313,21 +313,21 @@ private: auto unix_time = g_date_time_to_unix(begin); auto menu_item = g_menu_item_new (appt.summary.c_str(), nullptr); - 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()); + 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()) { - g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "org.ayatana.indicator.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()); } else { - g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "org.ayatana.indicator.appointment"); + g_menu_item_set_attribute (menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.appointment"); } if (!appt.color.empty()) - g_menu_item_set_attribute (menu_item, "x-canonical-color", "s", appt.color.c_str()); + g_menu_item_set_attribute (menu_item, "x-ayatana-color", "s", appt.color.c_str()); if (action_name != nullptr) g_menu_item_set_action_and_target_value (menu_item, action_name, @@ -386,9 +386,9 @@ private: const auto fmt = m_formatter->relative_format(zone_now.get()); auto detailed_action = g_strdup_printf("indicator.set-location::%s %s", zone.c_str(), name.c_str()); auto i = g_menu_item_new (name.c_str(), detailed_action); - g_menu_item_set_attribute(i, "x-canonical-type", "s", "org.ayatana.indicator.location"); - g_menu_item_set_attribute(i, "x-canonical-timezone", "s", zone.c_str()); - g_menu_item_set_attribute(i, "x-canonical-time-format", "s", fmt.c_str()); + g_menu_item_set_attribute(i, "x-ayatana-type", "s", "org.ayatana.indicator.location"); + g_menu_item_set_attribute(i, "x-ayatana-timezone", "s", zone.c_str()); + g_menu_item_set_attribute(i, "x-ayatana-time-format", "s", fmt.c_str()); g_menu_append_item (menu, i); g_object_unref(i); g_free(detailed_action); diff --git a/src/notifications.cpp b/src/notifications.cpp index 051653d..f8782de 100644 --- a/src/notifications.cpp +++ b/src/notifications.cpp @@ -314,7 +314,7 @@ private: // as the name indicates, don't use this directly: use server_caps() instead mutable std::set<std::string> m_lazy_caps; - static constexpr char const * HINT_TIMEOUT {"x-canonical-snap-decisions-timeout"}; + static constexpr char const * HINT_TIMEOUT {"x-ayatana-snap-decisions-timeout"}; }; /*** |