From 8ffcfb4e106bb0081714455239cfe13a524c365f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 19 Mar 2010 20:32:47 -0400 Subject: Add extensions to configure calender widgets. Make ECalendarItem, ECalendarView, ECalModel, EDateEdit, EMeetingStore, and EMeetingTimeSelector extensible and register extensions to automatically bind every instance to the appropriate EShellSettings. --- calendar/gui/dialogs/comp-editor-util.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'calendar/gui/dialogs/comp-editor-util.c') diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index 271ac5a8cc..cd16b46974 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -209,7 +209,6 @@ comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) /** * comp_editor_new_date_edit: - * @shell_settings: an #EShellSettings * @show_date: Whether to show a date picker in the widget. * @show_time: Whether to show a time picker in the widget. * @make_time_insensitive: Whether the time field is made insensitive rather @@ -221,15 +220,12 @@ comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) * Return value: A newly-created #EDateEdit widget. **/ GtkWidget * -comp_editor_new_date_edit (EShellSettings *shell_settings, - gboolean show_date, +comp_editor_new_date_edit (gboolean show_date, gboolean show_time, gboolean make_time_insensitive) { EDateEdit *dedit; - g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), NULL); - dedit = E_DATE_EDIT (e_date_edit_new ()); e_date_edit_set_show_date (dedit, show_date); @@ -240,29 +236,9 @@ comp_editor_new_date_edit (EShellSettings *shell_settings, e_date_edit_set_make_time_insensitive (dedit, FALSE); #endif - comp_editor_bind_date_edit_settings (GTK_WIDGET (dedit), shell_settings); - return GTK_WIDGET (dedit); } -void -comp_editor_bind_date_edit_settings (GtkWidget *dateedit, EShellSettings *shell_settings) -{ - g_return_if_fail (dateedit != NULL); - g_return_if_fail (E_IS_DATE_EDIT (dateedit)); - - if (!shell_settings) - shell_settings = e_shell_get_shell_settings (e_shell_get_default ()); - - e_binding_new ( - shell_settings, "cal-show-week-numbers", - dateedit, "show-week-numbers"); - - e_binding_new ( - shell_settings, "cal-week-start-day", - dateedit, "week-start-day"); -} - /* Returns the current time, for EDateEdit widgets and ECalendar items in the dialogs. FIXME: Should probably use the timezone from somewhere in the component -- cgit v1.2.3