diff options
author | Robert Tari <robert@tari.in> | 2021-10-28 06:48:17 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-28 08:21:05 +0200 |
commit | 99bd6787eb3d099f196f8e696be23a6dbac82909 (patch) | |
tree | 67b3bf9e4498a73ef85d39aeea2520b057666f45 | |
parent | 97cc3bfbcba9cbbf612f4c7e04b974816adae3e2 (diff) | |
download | ayatana-indicator-datetime-99bd6787eb3d099f196f8e696be23a6dbac82909.tar.gz ayatana-indicator-datetime-99bd6787eb3d099f196f8e696be23a6dbac82909.tar.bz2 ayatana-indicator-datetime-99bd6787eb3d099f196f8e696be23a6dbac82909.zip |
Remove the activation_url from the Appointment class
-rw-r--r-- | include/datetime/appointment.h | 1 | ||||
-rw-r--r-- | src/actions-live.cpp | 7 | ||||
-rw-r--r-- | src/engine-eds.cpp | 16 | ||||
-rw-r--r-- | tests/print-to.h | 5 |
4 files changed, 5 insertions, 24 deletions
diff --git a/include/datetime/appointment.h b/include/datetime/appointment.h index c563f33..ac2b2c3 100644 --- a/include/datetime/appointment.h +++ b/include/datetime/appointment.h @@ -61,7 +61,6 @@ public: std::string source_uid; std::string color; std::string summary; - std::string activation_url; DateTime begin; DateTime end; diff --git a/src/actions-live.cpp b/src/actions-live.cpp index 81bdb70..b2de976 100644 --- a/src/actions-live.cpp +++ b/src/actions-live.cpp @@ -150,12 +150,7 @@ std::string LiveActions::open_appointment(const Appointment& appt, const DateTim { std::string sReturn = ""; - if (!appt.activation_url.empty()) - { - sReturn = appt.activation_url; - ayatana_common_utils_open_url(sReturn.c_str()); - } - else switch (appt.type) + switch (appt.type) { case Appointment::ALARM: sReturn = open_alarm_app(); diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index b0a1a0d..54fafc0 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -40,8 +40,6 @@ namespace datetime { 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"}; - /**** ***** ****/ @@ -1062,21 +1060,9 @@ private: } g_clear_pointer (&eccdt_tmp, e_cal_component_datetime_free); - // get appointment.activation_url from x-props - auto icc = e_cal_component_get_icalcomponent(component); // icc owned by component - auto icalprop = i_cal_component_get_first_property(icc, I_CAL_X_PROPERTY); - while (icalprop != nullptr) { - const char * x_name = i_cal_property_get_x_name(icalprop); - if ((x_name != nullptr) && !g_ascii_strcasecmp(x_name, X_PROP_ACTIVATION_URL)) { - const char * url = i_cal_property_get_value_as_string(icalprop); - if ((url != nullptr) && baseline.activation_url.empty()) - baseline.activation_url = url; - } - icalprop = i_cal_component_get_next_property(icc, I_CAL_X_PROPERTY); - } - // get appointment.type baseline.type = Appointment::EVENT; + auto icc = e_cal_component_get_icalcomponent(component); // icc owned by component auto categ_list = e_cal_component_get_categories_list (component); for (GSList * l=categ_list; l!=nullptr; l=l->next) { auto tag = static_cast<const char*>(l->data); diff --git a/tests/print-to.h b/tests/print-to.h index 652da52..7cd6c2a 100644 --- a/tests/print-to.h +++ b/tests/print-to.h @@ -1,5 +1,6 @@ /* * Copyright 2015 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> */ #ifndef INDICATOR_DATETIME_TESTS_PRINT_TO @@ -55,8 +57,7 @@ PrintTo(const Appointment& appointment, std::ostream* os) *os << "{uid:'" << appointment.uid << "'}" << "{color:'" << appointment.color << "'}" - << "{summary:'" << appointment.summary << "'}" - << "{activation_url:'" << appointment.activation_url << "'}"; + << "{summary:'" << appointment.summary << "'}"; *os << "{begin:"; PrintTo(appointment.begin, os); |