diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-list-view-config.c | 27 | ||||
-rw-r--r-- | calendar/gui/e-day-view-config.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-week-view-config.c | 2 |
3 files changed, 29 insertions, 2 deletions
diff --git a/calendar/gui/e-cal-list-view-config.c b/calendar/gui/e-cal-list-view-config.c index cf6b586be7..5e4bbc31d2 100644 --- a/calendar/gui/e-cal-list-view-config.c +++ b/calendar/gui/e-cal-list-view-config.c @@ -183,6 +183,27 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer set_timezone (priv->view); } +static void +set_twentyfour_hour (ECalListView *list_view) +{ + gboolean use_24_hour; + + use_24_hour = calendar_config_get_24_hour_format (); + + e_cal_view_set_use_24_hour_format (E_CAL_VIEW (list_view), use_24_hour); +} + +static void +twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data) +{ + ECalListViewConfig *view_config = data; + ECalListViewConfigPrivate *priv; + + priv = view_config->priv; + + set_twentyfour_hour (priv->view); +} + void e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView *list_view) { @@ -217,4 +238,10 @@ e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView * not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config); priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not)); + + /* 24 Hour format */ + set_twentyfour_hour (list_view); + + not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config); + priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not)); } diff --git a/calendar/gui/e-day-view-config.c b/calendar/gui/e-day-view-config.c index a5fe7cc73b..bee97919f1 100644 --- a/calendar/gui/e-day-view-config.c +++ b/calendar/gui/e-day-view-config.c @@ -214,7 +214,7 @@ set_twentyfour_hour (EDayView *day_view) use_24_hour = calendar_config_get_24_hour_format (); - e_day_view_set_24_hour_format (day_view, use_24_hour); + e_cal_view_set_use_24_hour_format (E_CAL_VIEW (day_view), use_24_hour); } static void diff --git a/calendar/gui/e-week-view-config.c b/calendar/gui/e-week-view-config.c index 8b1cdec6d4..097d86dd92 100644 --- a/calendar/gui/e-week-view-config.c +++ b/calendar/gui/e-week-view-config.c @@ -214,7 +214,7 @@ set_twentyfour_hour (EWeekView *week_view) use_24_hour = calendar_config_get_24_hour_format (); - e_week_view_set_24_hour_format (week_view, use_24_hour); + e_cal_view_set_use_24_hour_format (E_CAL_VIEW (week_view), use_24_hour); } static void |