aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-10-29 22:37:23 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-10-29 22:37:23 +0800
commit6c743503b1f747c50e28c05aed4ad4c620a3912e (patch)
tree988b2fea553d72ac5c566de4ca2ab09b0b679480
parentfd1be1837acc71058f3f0ab4b99526639300b862 (diff)
downloadgsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.tar
gsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.tar.gz
gsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.tar.bz2
gsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.tar.lz
gsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.tar.xz
gsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.tar.zst
gsoc2013-evolution-6c743503b1f747c50e28c05aed4ad4c620a3912e.zip
set the format on the cal view
2003-10-29 JP Rosevear <jpr@ximian.com> * gui/e-day-view-config.c (set_twentyfour_hour): set the format on the cal view * gui/e-week-view-config.c (set_twentyfour_hour): ditto * gui/e-cal-list-view-config.c (set_twentyfour_hour): set the 24 hour format on the view (twentyfour_hour_changed_cb): 24 hour format change callback (e_cal_list_view_config_set_view): handle 24 hour format change svn path=/trunk/; revision=23116
-rw-r--r--calendar/ChangeLog12
-rw-r--r--calendar/gui/e-cal-list-view-config.c27
-rw-r--r--calendar/gui/e-day-view-config.c2
-rw-r--r--calendar/gui/e-week-view-config.c2
4 files changed, 41 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 116ab1b8f1..fca2ac3644 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,17 @@
2003-10-29 JP Rosevear <jpr@ximian.com>
+ * gui/e-day-view-config.c (set_twentyfour_hour): set the format on
+ the cal view
+
+ * gui/e-week-view-config.c (set_twentyfour_hour): ditto
+
+ * gui/e-cal-list-view-config.c (set_twentyfour_hour): set the 24
+ hour format on the view
+ (twentyfour_hour_changed_cb): 24 hour format change callback
+ (e_cal_list_view_config_set_view): handle 24 hour format changes
+
+2003-10-29 JP Rosevear <jpr@ximian.com>
+
* gui/dialogs/recurrence-page.c (recurrence_page_finalize): unref
config manager
(init_widgets): create config manager for the e-calendar
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