aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-04-09 19:03:57 -0500
committerRobert Tari <robert@tari.in>2021-07-06 00:16:41 +0200
commit7ac0160b0e7ce9245e13750429790cb2a999528b (patch)
tree6323ba65307de5151b38a9d4032812856a33f61e /src
parent85f702d540c998b91f5004b9c9629faaacfc37bd (diff)
downloadayatana-indicator-datetime-7ac0160b0e7ce9245e13750429790cb2a999528b.tar.gz
ayatana-indicator-datetime-7ac0160b0e7ce9245e13750429790cb2a999528b.tar.bz2
ayatana-indicator-datetime-7ac0160b0e7ce9245e13750429790cb2a999528b.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);