aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-11-23 16:55:11 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-11-23 16:55:11 +0100
commita1063ca8b2e0dacd9c8c40e1f9b0f8526772edb9 (patch)
tree3b4d019ebc44604aa3b00e0fc6f817cd1a66657b
parent10505c6b870a03b4b9cbd3e719838280a20fc9da (diff)
parentde62f549f2f0818f6821132d85e8dee360f53cd6 (diff)
downloadayatana-indicator-datetime-a1063ca8b2e0dacd9c8c40e1f9b0f8526772edb9.tar.gz
ayatana-indicator-datetime-a1063ca8b2e0dacd9c8c40e1f9b0f8526772edb9.tar.bz2
ayatana-indicator-datetime-a1063ca8b2e0dacd9c8c40e1f9b0f8526772edb9.zip
Merge branch 'tari01-pr/fix-haptic-dbus-data'
Attributes GH PR #101: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/101
-rw-r--r--src/haptic.cpp14
-rw-r--r--tests/test-eds-ics-missing-trigger.cpp4
-rw-r--r--tests/test-eds-ics-nonrepeating-events.cpp4
-rw-r--r--tests/test-eds-ics-repeating-events-with-individual-change.cpp4
-rw-r--r--tests/test-eds-ics-repeating-events.cpp4
-rw-r--r--tests/test-eds-ics-tzids-2.cpp4
-rw-r--r--tests/test-eds-ics-tzids-utc.cpp4
-rw-r--r--tests/test-eds-ics-tzids.cpp4
8 files changed, 18 insertions, 24 deletions
diff --git a/src/haptic.cpp b/src/haptic.cpp
index 370f0f9..2b0af4c 100644
--- a/src/haptic.cpp
+++ b/src/haptic.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2014 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -43,7 +43,7 @@ public:
m_cancellable(g_cancellable_new()),
m_repeat(repeat)
{
- g_bus_get (G_BUS_TYPE_SESSION, m_cancellable, on_bus_ready, this);
+ g_bus_get (G_BUS_TYPE_SYSTEM, m_cancellable, on_bus_ready, this);
}
~Impl()
@@ -105,20 +105,14 @@ private:
void call_vibrate()
{
- GVariantBuilder builder;
- auto duration = g_variant_new_int32 (1000);
-
- g_variant_builder_init (&builder, G_VARIANT_TYPE_INT32);
- g_variant_builder_add_value (&builder, duration);
-
- auto vibrate_arg = g_variant_builder_end (&builder);
+ auto duration = g_variant_new ("(i)", 1000);
g_dbus_connection_call (m_bus,
BUS_HAPTIC_NAME,
BUS_HAPTIC_PATH,
BUS_HAPTIC_INTERFACE,
"vibrate",
- vibrate_arg,
+ duration,
nullptr,
G_DBUS_CALL_FLAGS_NONE,
-1,
diff --git a/tests/test-eds-ics-missing-trigger.cpp b/tests/test-eds-ics-missing-trigger.cpp
index 61271e6..5d98f81 100644
--- a/tests/test-eds-ics-missing-trigger.cpp
+++ b/tests/test-eds-ics-missing-trigger.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>
diff --git a/tests/test-eds-ics-nonrepeating-events.cpp b/tests/test-eds-ics-nonrepeating-events.cpp
index 25bbed4..06b6b95 100644
--- a/tests/test-eds-ics-nonrepeating-events.cpp
+++ b/tests/test-eds-ics-nonrepeating-events.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>
diff --git a/tests/test-eds-ics-repeating-events-with-individual-change.cpp b/tests/test-eds-ics-repeating-events-with-individual-change.cpp
index c63cafc..c83c8d2 100644
--- a/tests/test-eds-ics-repeating-events-with-individual-change.cpp
+++ b/tests/test-eds-ics-repeating-events-with-individual-change.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2016 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>
diff --git a/tests/test-eds-ics-repeating-events.cpp b/tests/test-eds-ics-repeating-events.cpp
index d33c339..2be5aa5 100644
--- a/tests/test-eds-ics-repeating-events.cpp
+++ b/tests/test-eds-ics-repeating-events.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>
diff --git a/tests/test-eds-ics-tzids-2.cpp b/tests/test-eds-ics-tzids-2.cpp
index 608b80a..36ef0fe 100644
--- a/tests/test-eds-ics-tzids-2.cpp
+++ b/tests/test-eds-ics-tzids-2.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>
diff --git a/tests/test-eds-ics-tzids-utc.cpp b/tests/test-eds-ics-tzids-utc.cpp
index 06aac71..3a79485 100644
--- a/tests/test-eds-ics-tzids-utc.cpp
+++ b/tests/test-eds-ics-tzids-utc.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>
diff --git a/tests/test-eds-ics-tzids.cpp b/tests/test-eds-ics-tzids.cpp
index 8f6f76b..c6b4dc4 100644
--- a/tests/test-eds-ics-tzids.cpp
+++ b/tests/test-eds-ics-tzids.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 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
@@ -20,7 +20,7 @@
*/
#include <algorithm>
-
+#include <array>
#include <datetime/alarm-queue-simple.h>
#include <datetime/clock-mock.h>
#include <datetime/engine-eds.h>