From 3e65062b5bb0957b5bb683ff04cb658d9d530477 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Wed, 7 Jun 2023 01:29:26 +0700 Subject: tests/run-eds-ics-test: don't eat away test's result Well, not exiting with the return code as the last step means that tests has been failing silently for a while now. This commit reveals that, but doesn't fix any test that fails. --- tests/run-eds-ics-test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/run-eds-ics-test.sh b/tests/run-eds-ics-test.sh index 5654034..4cbc0d3 100755 --- a/tests/run-eds-ics-test.sh +++ b/tests/run-eds-ics-test.sh @@ -72,3 +72,6 @@ if [ $rv -eq 0 ]; then sleep 5 rm -rf $TEST_TMP_DIR fi + +# pass the test's return code to the caller. +exit "$rv" -- cgit v1.2.3 From bfc2e3654b3eb4bd4d8fd336e489fe8840d7db9b Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Tue, 6 Jun 2023 15:54:11 +0700 Subject: engine-eds: fix retrieving custom alarm sound path ECal 2.0 returns the list of attachments as a GSList (a singly linked list). I'm not sure why, but the logic for iterating the list is completely incorrect. Fixing that fixes custom alarm sound. A test is added to catch this case. Bug-UBports: https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/issues/183 --- src/engine-eds.cpp | 13 ++-- tests/CMakeLists.txt | 1 + tests/test-eds-ics-alarm-custom-sound.cpp | 92 ++++++++++++++++++++++++++++ tests/test-eds-ics-alarm-custom-sound.ics.in | 32 ++++++++++ 4 files changed, 131 insertions(+), 7 deletions(-) create mode 100644 tests/test-eds-ics-alarm-custom-sound.cpp create mode 100644 tests/test-eds-ics-alarm-custom-sound.ics.in diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index b7f4682..2748fc1 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -635,19 +635,18 @@ private: auto action = e_cal_component_alarm_get_action(alarm); if (action == E_CAL_COMPONENT_ALARM_AUDIO) { - ICalAttach *attach = nullptr; auto attachments = e_cal_component_alarm_get_attachments(alarm); - if (attachments != nullptr && attachments->next != nullptr) - attach = I_CAL_ATTACH (attachments->data); + for (; attachments != nullptr; attachments = attachments->next) { + ICalAttach *attach = I_CAL_ATTACH (attachments->data); - if (attach != nullptr) - { - if (i_cal_attach_get_is_url (attach)) + if (attach != nullptr && i_cal_attach_get_is_url (attach)) { const char* url = i_cal_attach_get_url(attach); - if (url != nullptr) + if (url != nullptr) { ret = url; + break; + } } } if (ret.empty()) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4b9b1d7..81eeb5d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -108,6 +108,7 @@ add_eds_ics_test_by_name(test-eds-ics-tzids-2) add_eds_ics_test_by_name(test-eds-ics-tzids-utc) add_eds_ics_test_by_name(test-eds-ics-non-attending-alarms) add_eds_ics_test_by_name(test-eds-ics-repeating-events-with-individual-change) +add_eds_ics_test_by_name(test-eds-ics-alarm-custom-sound) function(add_dbusmock_test_by_name name) set (TEST_NAME ${name}) diff --git a/tests/test-eds-ics-alarm-custom-sound.cpp b/tests/test-eds-ics-alarm-custom-sound.cpp new file mode 100644 index 0000000..9f63c29 --- /dev/null +++ b/tests/test-eds-ics-alarm-custom-sound.cpp @@ -0,0 +1,92 @@ +/* + * Copyright 2015 Canonical Ltd. + * Copyright 2021 Robert Tari + * Copyright 2023 UBports Foundation. + * + * 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 + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Charles Kerr + * Robert Tari + * Ratchanan Srirattanamet + */ + +#include + +#include +#include +#include +#include +#include + +#include + +#include "glib-fixture.h" +#include "timezone-mock.h" +#include "wakeup-timer-mock.h" + +using namespace ayatana::indicator::datetime; +using VAlarmFixture = GlibFixture; + +/*** +**** +***/ + +TEST_F(VAlarmFixture, AlarmCustomSound) +{ + // start the EDS engine + auto engine = std::make_shared(std::make_shared()); + + // we need a consistent timezone for the planner and our local DateTimes + constexpr char const * zone_str {"America/Recife"}; + auto tz = std::make_shared(zone_str); + + #if GLIB_CHECK_VERSION(2, 68, 0) + auto gtz = g_time_zone_new_identifier(zone_str); + + if (gtz == NULL) + { + gtz = g_time_zone_new_utc(); + } + #else + auto gtz = g_time_zone_new(zone_str); + #endif + + // make a planner that looks at the first half of 2023 in EDS + auto planner = std::make_shared(engine, tz); + const DateTime range_begin {gtz, 2023,1, 1, 0, 0, 0.0}; + const DateTime range_end {gtz, 2023,6,30,23,59,59.5}; + planner->range().set(std::make_pair(range_begin, range_end)); + + // give EDS a moment to load + if (planner->appointments().get().empty()) { + g_message("waiting a moment for EDS to load..."); + auto on_appointments_changed = [this](const std::vector& appointments){ + g_message("ah, they loaded"); + if (!appointments.empty()) + g_main_loop_quit(loop); + }; + core::ScopedConnection conn(planner->appointments().changed().connect(on_appointments_changed)); + constexpr int max_wait_sec = 10; + wait_msec(max_wait_sec * G_TIME_SPAN_MILLISECOND); + } + + // the planner should match what we've got in the calendar.ics file + const auto appts = planner->appointments().get(); + EXPECT_EQ(1, appts.size()); + EXPECT_EQ(1, appts[0].alarms.size()); + EXPECT_EQ(appts[0].alarms[0].audio_url, "file:///usr/share/sounds/lomiri/ringtones/Entropy.ogg"); + + // cleanup + g_time_zone_unref(gtz); +} diff --git a/tests/test-eds-ics-alarm-custom-sound.ics.in b/tests/test-eds-ics-alarm-custom-sound.ics.in new file mode 100644 index 0000000..5354a71 --- /dev/null +++ b/tests/test-eds-ics-alarm-custom-sound.ics.in @@ -0,0 +1,32 @@ +BEGIN:VCALENDAR +CALSCALE:GREGORIAN +PRODID:-//Ximian//NONSGML Evolution Calendar//EN +VERSION:2.0 +X-EVOLUTION-DATA-REVISION:2023-06-06T17:25:48.265942Z(42) +BEGIN:VTODO +UID:882a6a702f87a3afde203e5609d2626ba144a3c2 +DTSTAMP:20230606T172548Z +DTSTART:20230607T165701 +PRIORITY:0 +SUMMARY:Alarm +CATEGORIES:x-lomiri-alarm +SEQUENCE:1 +LAST-MODIFIED:20230606T172548Z +BEGIN:VALARM +X-EVOLUTION-ALARM-UID:eceda45c7493b76e41cdb2369ce8160b75e53f98 +ACTION:AUDIO +TRIGGER;RELATED=START:PT0S +REPEAT:0 +DURATION:PT0S +ATTACH:file:///usr/share/sounds/lomiri/ringtones/Entropy.ogg +END:VALARM +BEGIN:VALARM +X-EVOLUTION-ALARM-UID:8eec04befc2876fb13a6726181fed33b9f7810c8 +ACTION:DISPLAY +DESCRIPTION:Alarm +TRIGGER;RELATED=START:PT0S +REPEAT:0 +DURATION:PT0S +END:VALARM +END:VTODO +END:VCALENDAR -- cgit v1.2.3 From c91b376f5066e5086cf0d44749af673e8d1d79fa Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 9 Jun 2023 08:41:02 +0200 Subject: release 23.6.0 --- AUTHORS | 4 ++++ CMakeLists.txt | 2 +- ChangeLog | 46 +++++++++++++++++++++++++++++++++++++++++++++- NEWS | 5 +++++ debian/changelog | 7 +++++++ 5 files changed, 62 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index f53e2a1..4facebc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -42,12 +42,14 @@ Eugen Wesseloh Evgeni Golov farkasdvd <30418389+farkasdvd@users.noreply.github.com> Gabor Kelemen +gallegonovato Gediminas Murauskas geni giorgio.saragnese gökhan barış göbet Grace Guo György Balló +Heimen Stoffels Heimen Stoffels Henrik Dankvardt Hosted Weblate @@ -119,6 +121,7 @@ Pavel Borecki Phil Clifford phlostically Quentin PAGÈS +Ratchanan Srirattanamet Renato Araujo Oliveira Filho Reza Almanda Ricardo Salveti de Araujo @@ -141,6 +144,7 @@ Simon Quigley sock-et ssantos Swann Martinet +taoky Ted Gould THANOS SIOURDAKIS thebylito diff --git a/CMakeLists.txt b/CMakeLists.txt index 41e99c0..5190055 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -set (PROJECT_VERSION "22.9.1") +set (PROJECT_VERSION "23.6.0") set (PACKAGE ${CMAKE_PROJECT_NAME}) # Options diff --git a/ChangeLog b/ChangeLog index 1349561..cd26b7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,50 @@ +2023-06-09 Mike Gabriel + + * release 23.6.0 (HEAD -> main, tag: 23.6.0) + +2023-06-08 Robert Tari + + * Merge branch + 'ubports-personal/peat-psuwit/for-upstream_alarm-sound' + (ed6a9a21) + +2023-06-06 Ratchanan Srirattanamet + + * engine-eds: fix retrieving custom alarm sound path (e089a84b) + +2023-04-06 ssantos + + * Translated using Weblate (Portuguese) (254bd7f7) + +2023-03-16 Heimen Stoffels + + * Translated using Weblate (Dutch) (607f0185) + * Translated using Weblate (Dutch) (bc64f2d0) + +2023-03-03 gallegonovato + + * Translated using Weblate (Spanish) (c18c1c8b) + * Translated using Weblate (Spanish) (eddb5c6c) + +2023-02-12 Anders Jonsson + + * Translated using Weblate (Swedish) (6074d9ad) + +2023-02-10 Luna Jernberg + + * Translated using Weblate (Swedish) (b80f23b5) + +2022-12-30 Milo Ivir + + * Translated using Weblate (Croatian) (29608576) + +2022-12-09 taoky + + * Translated using Weblate (Chinese (Simplified)) (73944bb1) + 2022-11-23 Mike Gabriel - * release 22.9.1 (HEAD -> main, tag: 22.9.1) + * release 22.9.1 (25143e60) (tag: 22.9.1) * Merge branch 'tari01-pr/fix-lomiri-schemas-name' (d7c2ce7f) 2022-11-14 Robert Tari diff --git a/NEWS b/NEWS index 4c6c1a2..55f8296 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Overview of changes in ayatana-indicator-datetime 22.9.1 + + - engine-eds: fix retrieving custom alarm sound path. + - Translation updates. + Overview of changes in ayatana-indicator-datetime 22.9.1 - src/haptic.cpp: Fix data type sent to hfd-service diff --git a/debian/changelog b/debian/changelog index 4f31906..a974aff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ayatana-indicator-datetime (23.6.0-0) unstable; urgency=medium + + * Upstream-provided Debian package for ayatana-indicator-datetime. + See upstream ChangeLog for recent changes. + + -- Mike Gabriel Fri, 09 Jun 2023 08:39:33 +0200 + ayatana-indicator-datetime (22.9.1-0) unstable; urgency=medium * Upstream-provided Debian package for ayatana-indicator-datetime. -- cgit v1.2.3 From 6ecb125abee150e0b3f3daf9dcc91e9e3e7c255b Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Thu, 22 Jun 2023 17:36:39 +0000 Subject: Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (16 of 16 strings) Translation: Ayatana Indicators/DateTime Indicator Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/datetime-applet/pt_BR/ --- po/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/pt_BR.po b/po/pt_BR.po index de0b9e5..cb3215e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: indicator-datetime\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-09-14 08:37+0200\n" -"PO-Revision-Date: 2022-09-15 22:17+0000\n" +"PO-Revision-Date: 2023-06-23 22:48+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: Portuguese (Brazil) \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.14.1-dev\n" +"X-Generator: Weblate 4.18.1\n" #: data/org.ayatana.indicator.datetime.gschema.xml.in.in.h:1 msgid "The calendar's default sound file." @@ -74,7 +74,7 @@ msgstr "%s (há alarme)" #. hours, minutes in a 12h locale; e.g. Wed, 2:00 PM #: src/snap.cpp:147 msgid "%a, %l:%M %p" -msgstr "%a, %H:%M" +msgstr "%a, %l:%M %p" #. * A strftime(3) format for abbreviated weekday, #. hours, minutes in a 24h locale; e.g. Wed, 14:00 -- cgit v1.2.3 From 765578e9c8d3d91a004efc9c18db4a8b16f56788 Mon Sep 17 00:00:00 2001 From: Joan CiberSheep Date: Thu, 22 Jun 2023 22:03:43 +0000 Subject: Translated using Weblate (Catalan) Currently translated at 100.0% (16 of 16 strings) Translation: Ayatana Indicators/DateTime Indicator Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/datetime-applet/ca/ --- po/ca.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/po/ca.po b/po/ca.po index ef21946..9584bca 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-09-14 08:37+0200\n" -"PO-Revision-Date: 2020-11-03 01:26+0000\n" +"PO-Revision-Date: 2023-06-23 22:48+0000\n" "Last-Translator: Joan CiberSheep \n" -"Language-Team: Catalan \n" +"Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2-dev\n" +"X-Generator: Weblate 4.18.1\n" #: data/org.ayatana.indicator.datetime.gschema.xml.in.in.h:1 msgid "The calendar's default sound file." @@ -59,7 +59,7 @@ msgstr "Data i hora" #: src/menu.cpp:564 msgid "Time & date settings, quick calendar access" -msgstr "" +msgstr "Paràmetres d'hora i data, accés ràpid al calendari" #: src/menu.cpp:613 msgid "Time and Date" @@ -90,7 +90,7 @@ msgstr "Alarma %s" #: src/snap.cpp:159 #, c-format msgid "Event %s" -msgstr "" +msgstr "Esdeveniment %s" #: src/snap.cpp:168 src/snap.cpp:172 msgid "OK" -- cgit v1.2.3 From b5d43ad206c4e91a72a0097d911ee92ac5e59ce7 Mon Sep 17 00:00:00 2001 From: Sylke Vicious Date: Tue, 27 Jun 2023 10:41:55 +0000 Subject: Translated using Weblate (Italian) Currently translated at 100.0% (16 of 16 strings) Translation: Ayatana Indicators/DateTime Indicator Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/datetime-applet/it/ --- po/it.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/po/it.po b/po/it.po index a995c60..0e92edd 100644 --- a/po/it.po +++ b/po/it.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: indicator-datetime\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-09-14 08:37+0200\n" -"PO-Revision-Date: 2021-11-05 20:35+0000\n" -"Last-Translator: Michele \n" -"Language-Team: Italian \n" +"PO-Revision-Date: 2023-06-28 10:51+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.9-dev\n" +"X-Generator: Weblate 4.18.1\n" #: data/org.ayatana.indicator.datetime.gschema.xml.in.in.h:1 msgid "The calendar's default sound file." @@ -59,7 +59,7 @@ msgstr "Data e ora" #: src/menu.cpp:564 msgid "Time & date settings, quick calendar access" -msgstr "" +msgstr "Impostazioni data e ora, accesso rapido al calendario" #: src/menu.cpp:613 msgid "Time and Date" @@ -90,7 +90,7 @@ msgstr "Allarme %s" #: src/snap.cpp:159 #, c-format msgid "Event %s" -msgstr "" +msgstr "Evento %s" #: src/snap.cpp:168 src/snap.cpp:172 msgid "OK" -- cgit v1.2.3 From 4044d28267af99f27c6ac57fa80bdc455d3273d4 Mon Sep 17 00:00:00 2001 From: spnux Date: Sat, 1 Jul 2023 17:35:07 +0000 Subject: Translated using Weblate (French) Currently translated at 100.0% (16 of 16 strings) Translation: Ayatana Indicators/DateTime Indicator Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/datetime-applet/fr/ --- po/fr.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/po/fr.po b/po/fr.po index 97bcb24..2ec90a6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-09-14 08:37+0200\n" -"PO-Revision-Date: 2020-12-31 03:29+0000\n" -"Last-Translator: J. Lavoie \n" -"Language-Team: French \n" +"PO-Revision-Date: 2023-07-02 17:50+0000\n" +"Last-Translator: spnux \n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.4.1-dev\n" +"X-Generator: Weblate 5.0-dev\n" #: data/org.ayatana.indicator.datetime.gschema.xml.in.in.h:1 msgid "The calendar's default sound file." @@ -59,7 +59,7 @@ msgstr "Date et heure" #: src/menu.cpp:564 msgid "Time & date settings, quick calendar access" -msgstr "" +msgstr "Réglage de l'heure et de la date, accès rapide au calendrier" #: src/menu.cpp:613 msgid "Time and Date" @@ -90,7 +90,7 @@ msgstr "Alarme %s" #: src/snap.cpp:159 #, c-format msgid "Event %s" -msgstr "" +msgstr "Evénements" #: src/snap.cpp:168 src/snap.cpp:172 msgid "OK" -- cgit v1.2.3