aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-03-05 08:11:35 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-03-05 08:11:35 +0800
commitd842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d (patch)
tree9bd19bd8db1552c3f7d66a75f5c98ef2a102d891 /calendar/gui/calendar-config.c
parent7b7acde405898803001e1614e6ffd15df7682391 (diff)
downloadgsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.gz
gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.zst
gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.zip
keep list of all Tasks folders so we can update the preference settings
2001-03-05 Damon Chaplin <damon@ximian.com> * gui/e-tasks.c: keep list of all Tasks folders so we can update the preference settings when necessary. * gui/gnome-cal.c: configure the TaskPad according to the settings. * gui/e-calendar-table.c: use ECellCombo and ECellDateEdit for fields, so the tasks folders is almost usable now. * gui/calendar-model.c: added support for the Status property. * gui/calendar-config.[hc]: added convenience functions to setup ECalendarTable and ECellDateEdit objects. * gui/calendar-commands.c: connected to "destroy" signal of calendars so we can remove them from all_calendars list. * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_update_config): call e_tasks_update_all_config_settings() to update all the settings in the Tasks folders as well. * cal-util/cal-component.h: added CAL_COMPONENT_FIELD_STATUS. * cal-util/cal-component.c (cal_component_get_transparency): fixed calls to strcasecmp so they check for '== 0'. Applied patch from Miguel... 2001-02-27 Miguel de Icaza <miguel@ximian.com> * gui/e-day-view.c (e_day_view_on_event_right_click): Reorganize the menus to have entries always in a consistent fashion, as reported to the genepool mailing list. (e_day_view_on_event_right_click): Added a FIXME comment to the FIXME comment without a FIXME. Now we use e_popup_menu. This allows us to hide/show items on demand, and to sensitize/de-sensitize items depending on their state. This will also let us add icon support (when we get nice icons for this) * gui/e-week-view.c (e_week_view_show_popup_menu): Ditto. The files popup-menu.c and popup-menu.h can now be removed. svn path=/trunk/; revision=8549
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 08579182fe..eb1071b913 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -430,6 +430,8 @@ calendar_config_configure_e_calendar (ECalendar *cal)
gboolean dnav_show_week_no;
gint week_start_day;
+ g_return_if_fail (E_IS_CALENDAR (cal));
+
dnav_show_week_no = calendar_config_get_dnav_show_week_no ();
/* Note that this is 0 (Sun) to 6 (Sat). */
@@ -455,6 +457,8 @@ calendar_config_configure_e_date_edit (EDateEdit *dedit)
gboolean dnav_show_week_no, use_24_hour;
gint week_start_day, start_hour, end_hour;
+ g_return_if_fail (E_IS_DATE_EDIT (dedit));
+
dnav_show_week_no = calendar_config_get_dnav_show_week_no ();
/* Note that this is 0 (Sun) to 6 (Sat). */
@@ -476,3 +480,54 @@ calendar_config_configure_e_date_edit (EDateEdit *dedit)
e_date_edit_set_use_24_hour_format (dedit, use_24_hour);
e_date_edit_set_time_popup_range (dedit, start_hour, end_hour);
}
+
+
+/* This sets all the common config settings for an ECellDateEdit ETable item.
+ These are the settings for the ECalendar popup and the time list (if we use
+ 24 hour format, and the hours of the working day). */
+void
+calendar_config_configure_e_cell_date_edit (ECellDateEdit *ecde)
+{
+ gboolean use_24_hour;
+ gint start_hour, end_hour;
+
+ g_return_if_fail (E_IS_CELL_DATE_EDIT (ecde));
+
+ calendar_config_configure_e_calendar (E_CALENDAR (ecde->calendar));
+
+ use_24_hour = calendar_config_get_24_hour_format ();
+
+ start_hour = calendar_config_get_day_start_hour ();
+ end_hour = calendar_config_get_day_end_hour ();
+ /* Round up the end hour. */
+ if (calendar_config_get_day_end_minute () != 0)
+ end_hour = end_hour + 1 % 24;
+
+ e_cell_date_edit_freeze (ecde);
+ gtk_object_set (GTK_OBJECT (ecde),
+ "use_24_hour_format", use_24_hour,
+ "lower_hour", start_hour,
+ "upper_hour", end_hour,
+ NULL);
+ e_cell_date_edit_thaw (ecde);
+}
+
+
+/* This sets all the common config settings for an ECalendarTable widget.
+ These are the settings for the ECalendar popup and the time list (if we use
+ 24 hour format, and the hours of the working day). */
+void
+calendar_config_configure_e_calendar_table (ECalendarTable *cal_table)
+{
+ CalendarModel *model;
+ gboolean use_24_hour;
+
+ g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
+
+ use_24_hour = calendar_config_get_24_hour_format ();
+
+ model = e_calendar_table_get_model (cal_table);
+ calendar_model_set_use_24_hour_format (model, use_24_hour);
+
+ calendar_config_configure_e_cell_date_edit (cal_table->dates_cell);
+}