[gnome-control-center/gnome-3-2] datetime: Fix showing actual clock format on panel open
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-2] datetime: Fix showing actual clock format on panel open
- Date: Fri, 7 Oct 2011 15:53:11 +0000 (UTC)
commit b7ab8b12f912a75013a03f00413eb65c0d9f4297
Author: Tomas Bzatek <tbzatek redhat com>
Date: Fri Oct 7 17:51:20 2011 +0200
datetime: Fix showing actual clock format on panel open
A small regression after recent switch to radio buttons.
panels/datetime/cc-datetime-panel.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index c369c78..555eaaa 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -230,19 +230,21 @@ clock_settings_changed_cb (GSettings *settings,
{
CcDateTimePanelPrivate *priv = panel->priv;
GtkWidget *button24h;
- gboolean use_24_hour;
+ GtkWidget *button12h;
GDesktopClockFormat value;
value = g_settings_get_enum (settings, CLOCK_FORMAT_KEY);
priv->clock_format = value;
button24h = W ("24h_button");
-
- use_24_hour = (value == G_DESKTOP_CLOCK_FORMAT_24H);
+ button12h = W ("12h_button");
g_signal_handlers_block_by_func (button24h, change_clock_settings, panel);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button24h), use_24_hour);
+ if (value == G_DESKTOP_CLOCK_FORMAT_24H)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button24h), TRUE);
+ else
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button12h), TRUE);
update_time (panel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]