aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-09-05 18:18:18 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-09-05 18:18:18 +0100
commit87eaa8d2fa412e2f28360587308530fd3e9231d9 (patch)
treedf0ca4bb9d237572fd6ee732cc08aecbf902d1af
parentef6479a971ec5e8ab1c12a090e6f2a338bd0c8ad (diff)
downloadayatana-indicator-datetime-87eaa8d2fa412e2f28360587308530fd3e9231d9.tar.gz
ayatana-indicator-datetime-87eaa8d2fa412e2f28360587308530fd3e9231d9.tar.bz2
ayatana-indicator-datetime-87eaa8d2fa412e2f28360587308530fd3e9231d9.zip
indicator-datetime: Update the desktop schema when showing seconds
As GnomeWallClock uses "clock-show-seconds" desktop key to update the current time
-rw-r--r--configure.ac2
-rw-r--r--src/indicator-datetime.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 55c4f3b..eaeb958 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,7 @@ ECAL_REQUIRED_VERSION=2.30
EDS_REQUIRED_VERSION=2.30
ICAL_REQUIRED_VERSION=0.44
GNOME_DESKTOP_REQUIRED_VERSION=3.1.91
+GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=3.1.4
CAIRO_REQUIRED_VERSION=1.10
GDK_REQUIRED_VERSION=2.22
GLIB_REQUIRED_VERSION=2.26
@@ -76,6 +77,7 @@ AS_IF([test "x$with_gtk" = x3],
[PKG_CHECK_MODULES(INDICATOR, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
glib-2.0 >= $GLIB_REQUIRED_VERSION
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
+ gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS)
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 9a74ced..16ad131 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -104,6 +104,7 @@ struct _IndicatorDatetimePrivate {
GList * timezone_items;
GSettings * settings;
+ GSettings * gnome_settings;
GtkSizeGroup * indicator_right_group;
@@ -367,6 +368,8 @@ indicator_datetime_init (IndicatorDatetime *self)
g_warning("Unable to get settings for '" SETTINGS_INTERFACE "'");
}
+ self->priv->gnome_settings = g_settings_new ("org.gnome.desktop.interface");
+
self->priv->clock = g_object_new (GNOME_TYPE_WALL_CLOCK, NULL);
g_signal_connect (self->priv->clock, "notify::clock", G_CALLBACK (on_clock_changed), self);
@@ -581,6 +584,9 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
update = TRUE;
update_time (self);
}
+ g_settings_set_boolean (self->priv->gnome_settings,
+ "clock-show-seconds",
+ self->priv->show_seconds);
}
break;
}
@@ -616,6 +622,9 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
update = TRUE;
update_time (self);
}
+ g_settings_set_boolean (self->priv->gnome_settings,
+ "clock-show-seconds",
+ self->priv->show_seconds);
}
break;
}