[gnome-control-center] datetime: Don't crash when g-s-d is badly installed
- From: hadess src gnome org
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] datetime: Don't crash when g-s-d is badly installed
- Date: Wed, 2 Feb 2011 12:03:47 +0000 (UTC)
commit de278d3a857374a8f9cb8af3db211e9f87089049
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 2 11:42:31 2011 +0000
datetime: Don't crash when g-s-d is badly installed
And require a newer gnome-settings-daemon to avoid those problems.
https://bugzilla.gnome.org/show_bug.cgi?id=641232
configure.ac | 2 +-
panels/datetime/cc-datetime-panel.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f2f0473..65fc2f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ PKG_CHECK_MODULES(CAPPLET, $COMMON_MODULES)
PKG_CHECK_MODULES(GNOMECC_SHELL, $COMMON_MODULES libgnome-menu gio-unix-2.0)
PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1)
PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0)
-PKG_CHECK_MODULES(GSD_DBUS, gnome-settings-daemon >= 2.91.2)
+PKG_CHECK_MODULES(GSD_DBUS, gnome-settings-daemon >= 2.91.9)
PKG_CHECK_MODULES(GIO, gio-2.0 gio-unix-2.0)
PKG_CHECK_MODULES(XML, libxml-2.0)
PKG_CHECK_MODULES(UPOWER, upower-glib >= 0.9.1)
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index 03b6188..d980718 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -863,6 +863,12 @@ cc_date_time_panel_init (CcDateTimePanel *self)
/* add the lock button */
permission = polkit_permission_new_sync ("org.gnome.settingsdaemon.datetimemechanism.configure", NULL, NULL, NULL);
+ if (permission == NULL)
+ {
+ g_warning ("Your system does not have the '%s' PolicyKit files installed. Please check your installation",
+ "org.gnome.settingsdaemon.datetimemechanism.configure");
+ return;
+ }
/* DtLockButton takes ownership of the permission */
lockbutton = dt_lock_button_new (permission);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]