diff options
author | Jasmine Hassan <jasmine.aura@gmail.com> | 2012-12-15 03:13:18 +0200 |
---|---|---|
committer | Jasmine Hassan <jasmine.aura@gmail.com> | 2012-12-15 07:03:38 +0200 |
commit | 89f1a9bd93f75f2b3cd23667654d0351d86b13eb (patch) | |
tree | 0cce3e7fe7c040e3c898a6640c6e35a3af00be75 /plugins | |
parent | 8bcea2de19cab57e0c340cf6d8ebf181c31529df (diff) | |
download | mate-settings-daemon-89f1a9bd93f75f2b3cd23667654d0351d86b13eb.tar.bz2 mate-settings-daemon-89f1a9bd93f75f2b3cd23667654d0351d86b13eb.tar.xz |
[datetime] fix deprecated polkit_authority_get(), bump to 0.97
http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=d08b1b05997b3591c7ac1eefebd04a503c97c06e
and bump PolicyKit minimum required to 0.97
http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=d1c499e9e6b2aae3b0d1e0004e38f1d280e31144
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/datetime/msd-datetime-mechanism.c | 10 |
1 files changed, 8 insertions, 2 deletions
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) { |