From 5c4e7a0243fd749e4d7b657dc89349531dedcc85 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 30 Oct 2001 21:29:24 +0000 Subject: Commit the ETable click-to-add for if the dialog is being destroyed. 2001-10-30 Federico Mena Quintero * gui/dialogs/meeting-page.c (table_canvas_focus_out_cb): Commit the ETable click-to-add for if the dialog is being destroyed. Should fix bug #13959. svn path=/trunk/; revision=14481 --- calendar/ChangeLog | 6 ++++++ calendar/gui/dialogs/meeting-page.c | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ef061b0b42..c7f3acd214 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2001-10-30 Federico Mena Quintero + + * gui/dialogs/meeting-page.c (table_canvas_focus_out_cb): Commit + the ETable click-to-add for if the dialog is being destroyed. + Should fix bug #13959. + 2001-10-30 Federico Mena Quintero * gui/itip-utils.c (itip_send_comp): Allocate enough space for the diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index d3e126e003..776a49f93e 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -440,7 +440,7 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp) if (e_meeting_model_count_actual_attendees (priv->model) < 1) { e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - "Atleast one attendee is required."); + "At least one attendee is required."); return FALSE; } set_attendees (comp, e_meeting_model_get_attendees (priv->model)); @@ -731,6 +731,25 @@ right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer da +/* Callback used when the ETable gets a focus-out event. We have to commit any + * pending click-to-add state for if the event editor is being destroyed. + */ +static gint +table_canvas_focus_out_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + MeetingPage *mpage; + MeetingPagePrivate *priv; + ETable *etable; + + mpage = MEETING_PAGE (data); + priv = mpage->priv; + + etable = e_table_scrolled_get_table (priv->etable); + + e_table_commit_click_to_add (etable); + return TRUE; +} + /** * meeting_page_construct: * @mpage: An task details page. @@ -777,6 +796,9 @@ meeting_page_construct (MeetingPage *mpage, EMeetingModel *emm) gtk_signal_connect (GTK_OBJECT (real_table), "right_click", GTK_SIGNAL_FUNC (right_click_cb), mpage); + gtk_signal_connect (GTK_OBJECT (real_table->table_canvas), "focus_out_event", + GTK_SIGNAL_FUNC (table_canvas_focus_out_cb), mpage); + gtk_widget_show (GTK_WIDGET (priv->etable)); gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->etable), TRUE, TRUE, 2); -- cgit v1.2.3