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
This commit is contained in:
parent
bfdedc5505
commit
c462c34b28
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue