aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-09-02 20:05:04 +0200
committerRobert Tari <robert@tari.in>2021-09-02 20:05:04 +0200
commit941de24ca680e6844d874dc49288dd05340a6b60 (patch)
tree6085a76de8f3c22341872feef28537df9d083684
parent2748fa58a285684b2c51aee1db543f585d57abd0 (diff)
parent458218b1920bd92638d324a239dfc486013c0ddc (diff)
downloadayatana-indicator-datetime-941de24ca680e6844d874dc49288dd05340a6b60.tar.gz
ayatana-indicator-datetime-941de24ca680e6844d874dc49288dd05340a6b60.tar.bz2
ayatana-indicator-datetime-941de24ca680e6844d874dc49288dd05340a6b60.zip
Merge branch 'pr/fix-unit-tests'
Attributes GH PR #53: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/53
-rw-r--r--include/datetime/settings-shared.h6
-rw-r--r--src/settings-live.cpp10
-rw-r--r--src/snap.cpp2
-rw-r--r--tests/notification-fixture.h4
-rwxr-xr-xtests/run-eds-ics-test.sh2
-rw-r--r--tests/test-eds-ics-non-selected-source.ics.in2
6 files changed, 12 insertions, 14 deletions
diff --git a/include/datetime/settings-shared.h b/include/datetime/settings-shared.h
index 7280c16..c59be14 100644
--- a/include/datetime/settings-shared.h
+++ b/include/datetime/settings-shared.h
@@ -51,10 +51,10 @@ TimeFormatMode;
#define SETTINGS_ALARM_HAPTIC_S "alarm-haptic-feedback"
#define SETTINGS_SNOOZE_DURATION_S "snooze-duration-minutes"
-#define SETTINGS_NOTIFY_APPS_SCHEMA_ID "com.lomiri.notifications.settings.applications"
+#define SETTINGS_NOTIFY_APPS_SCHEMA_ID "com.ubuntu.notifications.settings.applications"
#define SETTINGS_VIBRATE_SILENT_KEY "vibrate-silent-mode"
-#define SETTINGS_NOTIFY_SCHEMA_ID "com.lomiri.notifications.settings"
-#define SETTINGS_NOTIFY_CALENDAR_PATH "/com/lomiri/NotificationSettings/com.lomiri.calendar/calendar/"
+#define SETTINGS_NOTIFY_SCHEMA_ID "com.ubuntu.notifications.settings"
+#define SETTINGS_NOTIFY_CALENDAR_PATH "/com/ubuntu/NotificationSettings/com.ubuntu.calendar/calendar/"
#define SETTINGS_NOTIFY_ENABLED_KEY "enable-notifications"
#define SETTINGS_NOTIFY_SOUNDS_KEY "use-sounds-notifications"
#define SETTINGS_NOTIFY_VIBRATIONS_KEY "use-vibrations-notifications"
diff --git a/src/settings-live.cpp b/src/settings-live.cpp
index dc90d0e..cf18739 100644
--- a/src/settings-live.cpp
+++ b/src/settings-live.cpp
@@ -19,11 +19,6 @@
#include <datetime/settings-live.h>
-extern "C"
-{
- #include <ayatana/common/utils.h>
-}
-
namespace ayatana {
namespace indicator {
namespace datetime {
@@ -65,7 +60,10 @@ LiveSettings::LiveSettings():
update_alarm_haptic();
update_snooze_duration();
- if (ayatana_common_utils_is_lomiri())
+ GSettingsSchemaSource *pSource = g_settings_schema_source_get_default();
+ GSettingsSchema *pSchema = g_settings_schema_source_lookup(pSource, SETTINGS_NOTIFY_SCHEMA_ID, TRUE);
+
+ if (pSchema != NULL)
{
m_settings_cal_notification = g_settings_new_with_path(SETTINGS_NOTIFY_SCHEMA_ID, SETTINGS_NOTIFY_CALENDAR_PATH);
m_settings_general_notification = g_settings_new(SETTINGS_NOTIFY_APPS_SCHEMA_ID);
diff --git a/src/snap.cpp b/src/snap.cpp
index 0ef6a94..0507cc7 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -116,7 +116,7 @@ public:
const auto uri = get_alarm_uri(appointment, alarm, m_settings);
const auto volume = m_settings->alarm_volume.get();
const bool loop = interactive;
- sound = std::make_shared<ain::Sound>(role, uri, volume, loop);
+ sound = m_sound_builder->create(role, uri, volume, loop);
}
// create the haptic feedback...
diff --git a/tests/notification-fixture.h b/tests/notification-fixture.h
index 23329aa..301c53c 100644
--- a/tests/notification-fixture.h
+++ b/tests/notification-fixture.h
@@ -78,7 +78,7 @@ protected:
static constexpr char const * HINT_TIMEOUT {"x-canonical-snap-decisions-timeout"};
static constexpr char const * AS_BUSNAME {"org.freedesktop.Accounts"};
- static constexpr char const * AS_INTERFACE {"com.lomiri.touch.AccountsService.Sound"};
+ static constexpr char const * AS_INTERFACE {"com.ubuntu.touch.AccountsService.Sound"};
static constexpr char const * PROP_OTHER_VIBRATIONS {"OtherVibrate"};
static constexpr char const * PROP_SILENT_MODE {"SilentMode"};
@@ -112,7 +112,7 @@ protected:
appt.end = christmas.end_of_day();
appt.alarms.push_back(ayatana::indicator::datetime::Alarm{"Ho Ho Ho!", CALENDAR_DEFAULT_SOUND, appt.begin});
- // init a Lomiri Alarm
+ // init an Ubuntu Alarm
ualarm.color = "red";
ualarm.summary = "Wakeup";
ualarm.uid = "E4B57D50247291478ED31DED17FF0A9838DED403";
diff --git a/tests/run-eds-ics-test.sh b/tests/run-eds-ics-test.sh
index 7db9f1b..f21307c 100755
--- a/tests/run-eds-ics-test.sh
+++ b/tests/run-eds-ics-test.sh
@@ -69,5 +69,5 @@ rv=$?
# if the test passed, blow away the tmpdir
if [ $rv -eq 0 ]; then
- rm -rf $TEST_TMP_DIR
+ rm -rfd $TEST_TMP_DIR
fi
diff --git a/tests/test-eds-ics-non-selected-source.ics.in b/tests/test-eds-ics-non-selected-source.ics.in
index 19f93d7..f7b028b 100644
--- a/tests/test-eds-ics-non-selected-source.ics.in
+++ b/tests/test-eds-ics-non-selected-source.ics.in
@@ -9,7 +9,7 @@ DTSTAMP:20150508T211449Z
DTSTART:20150508T164000
RRULE:FREQ=WEEKLY;BYDAY=FR
SUMMARY:Alarm
-CATEGORIES:x-lomiri-alarm
+CATEGORIES:x-canonical-alarm
CREATED:20150507T211449Z
LAST-MODIFIED:20150507T211449Z
BEGIN:VALARM