[gnome-initial-setup/shell/4765: 202/362] Set clock format based on personality
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 202/362] Set clock format based on personality
- Date: Thu, 19 Mar 2015 01:38:03 +0000 (UTC)
commit f7868f5394c0878212e545823960e4f748fbc6d4
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Mon Sep 8 09:49:29 2014 +0000
Set clock format based on personality
Set default clock format to 24h or 12h (AM/PM), depending on the personality.
[endlessm/eos-shell#3590]
.../pages/location/gis-location-page.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/pages/location/gis-location-page.c
b/gnome-initial-setup/pages/location/gis-location-page.c
index 6acd0d6..b56901d 100644
--- a/gnome-initial-setup/pages/location/gis-location-page.c
+++ b/gnome-initial-setup/pages/location/gis-location-page.c
@@ -598,7 +598,9 @@ gis_location_page_constructed (GObject *object)
GisLocationPagePrivate *priv = gis_location_page_get_instance_private (page);
GtkWidget *frame, *map, *entry;
GWeatherLocation *world;
+ GSettings *clock_settings;
GError *error;
+ const gchar *clock_format;
const gchar *timezone;
DateEndianess endianess;
GtkWidget *widget;
@@ -745,6 +747,11 @@ gis_location_page_constructed (GObject *object)
update_time (page);
+ clock_settings = g_settings_new ("org.gnome.desktop.interface");
+ clock_format = gis_driver_get_default_time_format (GIS_PAGE (page)->driver);
+ g_settings_set_string (clock_settings, "clock-format", clock_format? clock_format: "24h");
+ g_object_unref (clock_settings);
+
gis_page_set_complete (GIS_PAGE (page), TRUE);
gtk_widget_show (GTK_WIDGET (page));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]