[gnome-control-center] datetime: Set the filechooser clock format too



commit c462c34b286b089e020ca5ceb8c8081756533a72
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 24 18:17:48 2014 -0500

    datetime: Set the filechooser clock format too
    
    GTK+ now uses a 12h/24h setting in the org.gtk.Settings.FileChooser
    schema to switch the time display in the file chooser. Set this
    to be in sync with the global time format preference we have.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722942

 panels/datetime/cc-datetime-panel.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index 45ba352..9a02849 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -63,6 +63,8 @@ enum {
 #define CLOCK_SCHEMA "org.gnome.desktop.interface"
 #define CLOCK_FORMAT_KEY "clock-format"
 
+#define FILECHOOSER_SCHEMA "org.gtk.Settings.FileChooser"
+
 #define DATETIME_SCHEMA "org.gnome.desktop.datetime"
 #define AUTO_TIMEZONE_KEY "automatic-timezone"
 
@@ -83,6 +85,7 @@ struct _CcDateTimePanelPrivate
 
   GSettings *clock_settings;
   GSettings *datetime_settings;
+  GSettings *filechooser_settings;
   GDesktopClockFormat clock_format;
   gboolean ampm_available;
   GtkWidget *am_label;
@@ -158,6 +161,7 @@ cc_date_time_panel_dispose (GObject *object)
   g_clear_object (&priv->permission);
   g_clear_object (&priv->clock_settings);
   g_clear_object (&priv->datetime_settings);
+  g_clear_object (&priv->filechooser_settings);
 
   g_clear_pointer (&priv->date, g_date_time_unref);
 
@@ -222,6 +226,7 @@ change_clock_settings (GObject         *gobject,
     value = G_DESKTOP_CLOCK_FORMAT_12H;
 
   g_settings_set_enum (priv->clock_settings, CLOCK_FORMAT_KEY, value);
+  g_settings_set_enum (priv->filechooser_settings, CLOCK_FORMAT_KEY, value);
   priv->clock_format = value;
 
   update_time (panel);
@@ -1385,4 +1390,6 @@ cc_date_time_panel_init (CcDateTimePanel *self)
   g_signal_connect_swapped (priv->dtm, "notify::timezone",
                             G_CALLBACK (on_timezone_changed), self);
   /* We ignore UTC <--> LocalRTC changes at the moment */
+
+  priv->filechooser_settings = g_settings_new (FILECHOOSER_SCHEMA);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]