From d6e71d2ad96d9929f9b5053f1f730ca3628c20a2 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 22 Oct 2001 03:51:41 +0000 Subject: listen for changes in the date editors (schedule_page_set_dates): update 2001-10-21 JP Rosevear * gui/dialogs/schedule-page.c (init_widgets): listen for changes in the date editors (schedule_page_set_dates): update the times when they change elsewhere (update_time): set the time in the dialog (time_changed_cb): notify of changed times * gui/dialogs/comp-editor.c (page_dates_changed_cb): don't call the set dates function on the page that noted the change (page_summary_changed_cb): same for set summary function * gui/dialogs/event-page.c (update_time): move time setting stuff to util function (event_page_set_dates): use it (event_page_fill_component): ditto * gui/e-meeting-time-sel.h: fix comment svn path=/trunk/; revision=13863 --- calendar/gui/dialogs/comp-editor.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'calendar/gui/dialogs/comp-editor.c') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 46b60e56e9..372614b9f2 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -83,10 +83,10 @@ static void real_send_comp (CompEditor *editor, CalComponentItipMethod method); static void delete_comp (CompEditor *editor); static void close_dialog (CompEditor *editor); -static void page_changed_cb (GtkWidget *widget, gpointer data); -static void page_needs_send_cb (GtkWidget *widget, gpointer data); -static void page_summary_changed_cb (GtkWidget *widget, const char *summary, gpointer data); -static void page_dates_changed_cb (GtkWidget *widget, CompEditorPageDates *dates, gpointer data); +static void page_changed_cb (GtkObject *obj, gpointer data); +static void page_needs_send_cb (GtkObject *obj, gpointer data); +static void page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data); +static void page_dates_changed_cb (GtkObject *obj, CompEditorPageDates *dates, gpointer data); static void obj_updated_cb (CalClient *client, const char *uid, gpointer data); static void obj_removed_cb (CalClient *client, const char *uid, gpointer data); @@ -1147,7 +1147,7 @@ close_cmd (GtkWidget *widget, gpointer data) } static void -page_changed_cb (GtkWidget *widget, gpointer data) +page_changed_cb (GtkObject *obj, gpointer data) { CompEditor *editor = COMP_EDITOR (data); CompEditorPrivate *priv; @@ -1158,7 +1158,7 @@ page_changed_cb (GtkWidget *widget, gpointer data) } static void -page_needs_send_cb (GtkWidget *widget, gpointer data) +page_needs_send_cb (GtkObject *obj, gpointer data) { CompEditor *editor = COMP_EDITOR (data); CompEditorPrivate *priv; @@ -1170,7 +1170,7 @@ page_needs_send_cb (GtkWidget *widget, gpointer data) /* Page signal callbacks */ static void -page_summary_changed_cb (GtkWidget *widget, const char *summary, gpointer data) +page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data) { CompEditor *editor = COMP_EDITOR (data); CompEditorPrivate *priv; @@ -1179,13 +1179,14 @@ page_summary_changed_cb (GtkWidget *widget, const char *summary, gpointer data) priv = editor->priv; for (l = priv->pages; l != NULL; l = l->next) - comp_editor_page_set_summary (l->data, summary); + if (obj != l->data) + comp_editor_page_set_summary (l->data, summary); priv->changed = TRUE; } static void -page_dates_changed_cb (GtkWidget *widget, +page_dates_changed_cb (GtkObject *obj, CompEditorPageDates *dates, gpointer data) { @@ -1196,7 +1197,8 @@ page_dates_changed_cb (GtkWidget *widget, priv = editor->priv; for (l = priv->pages; l != NULL; l = l->next) - comp_editor_page_set_dates (l->data, dates); + if (obj != l->data) + comp_editor_page_set_dates (l->data, dates); priv->changed = TRUE; } -- cgit v1.2.3