aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-04-09 19:03:57 -0500
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:37:39 +0200
commit8b3ba566108578f5e49ed50129f341bab2429dab (patch)
tree38857a0f27ec6c723e830d1faee3bfe1b6f4b377 /src
parent8b30701b2052c0ae30d585248bce41b6d6fb3985 (diff)
downloadayatana-indicator-datetime-8b3ba566108578f5e49ed50129f341bab2429dab.tar.gz
ayatana-indicator-datetime-8b3ba566108578f5e49ed50129f341bab2429dab.tar.bz2
ayatana-indicator-datetime-8b3ba566108578f5e49ed50129f341bab2429dab.zip
in actions-live, don't hardcode the bus strings
Diffstat (limited to 'src')
-rw-r--r--src/actions-live.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index 231fb33..e3237b7 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -17,6 +17,7 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
+#include <datetime/dbus-shared.h>
#include <datetime/actions-live.h>
#ifdef HAS_URLDISPATCHER
@@ -240,7 +241,7 @@ on_datetime1_proxy_ready (GObject * object G_GNUC_UNUSED,
else
{
g_dbus_proxy_call(proxy,
- "SetTimezone",
+ Bus::Timedate1::Methods::SET_TIMEZONE,
g_variant_new ("(sb)", data->tzid.c_str(), TRUE),
G_DBUS_CALL_FLAGS_NONE,
-1,
@@ -268,9 +269,9 @@ void LiveActions::set_location(const std::string& tzid, const std::string& name)
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
nullptr,
- "org.freedesktop.timedate1",
- "/org/freedesktop/timedate1",
- "org.freedesktop.timedate1",
+ Bus::Timedate1::BUSNAME,
+ Bus::Timedate1::ADDR,
+ Bus::Timedate1::IFACE,
nullptr,
on_datetime1_proxy_ready,
data);