summaryrefslogtreecommitdiff
path: root/plugins/datetime
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-12-15 12:33:17 -0800
committerStefano Karapetsas <[email protected]>2012-12-15 12:33:17 -0800
commit85c5ae14d75e3413b8f3f3aa38205ea852dcb20d (patch)
tree4750b8d23dfcb17aea6cbc62c7e1c788a6976a7b /plugins/datetime
parent12dcf19aa5f51901053c273cd7f5c17ce85e909d (diff)
parentc6a6cbde72489a0055ba63341a153fe365058072 (diff)
downloadmate-settings-daemon-85c5ae14d75e3413b8f3f3aa38205ea852dcb20d.tar.bz2
mate-settings-daemon-85c5ae14d75e3413b8f3f3aa38205ea852dcb20d.tar.xz
Merge pull request #31 from jasmineaura/develop
background revised, various other fixes & improvements
Diffstat (limited to 'plugins/datetime')
-rw-r--r--plugins/datetime/Makefile.am2
-rw-r--r--plugins/datetime/msd-datetime-mechanism.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/datetime/Makefile.am b/plugins/datetime/Makefile.am
index 061443f..7c3b76a 100644
--- a/plugins/datetime/Makefile.am
+++ b/plugins/datetime/Makefile.am
@@ -6,7 +6,7 @@ dbus_services_in_files = org.mate.SettingsDaemon.DateTimeMechanism.service.in
polkit_in_files = org.mate.settingsdaemon.datetimemechanism.policy.in
msd-datetime-mechanism-glue.h: $(srcdir)/msd-datetime-mechanism.xml
- $(AM_V_GEN)dbus-binding-tool \
+ $(AM_V_GEN) dbus-binding-tool \
--prefix=msd_datetime_mechanism --mode=glib-server \
--output=msd-datetime-mechanism-glue.h \
$(srcdir)/msd-datetime-mechanism.xml
diff --git a/plugins/datetime/msd-datetime-mechanism.c b/plugins/datetime/msd-datetime-mechanism.c
index f03018f..6fc3399 100644
--- a/plugins/datetime/msd-datetime-mechanism.c
+++ b/plugins/datetime/msd-datetime-mechanism.c
@@ -176,9 +176,15 @@ register_mechanism (MsdDatetimeMechanism *mechanism)
{
GError *error = NULL;
- mechanism->priv->auth = polkit_authority_get ();
+ mechanism->priv->auth = polkit_authority_get_sync (NULL, &error);
+ if (mechanism->priv->auth == NULL) {
+ if (error != NULL) {
+ g_critical ("error getting system bus: %s", error->message);
+ g_error_free (error);
+ }
+ goto error;
+ }
- error = NULL;
mechanism->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (mechanism->priv->system_bus_connection == NULL) {
if (error != NULL) {