From c692eb0612942d959dd119063d68741a4694ff00 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 15 Apr 2004 15:45:27 +0000 Subject: Fixes #53903 2004-04-15 JP Rosevear Fixes #53903 * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): show/hide add button properly (change_clicked_cb): ditto * gui/dialogs/comp-editor.c (needs_send_cb): call back when "needs_send" (page_changed_cb): use accessor svn path=/trunk/; revision=25482 --- calendar/gui/dialogs/comp-editor.c | 18 +++++++++++++++--- calendar/gui/dialogs/meeting-page.c | 5 ++++- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 23d20d6e2f..976cae4493 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -102,6 +102,7 @@ static void delete_comp (CompEditor *editor); static void close_dialog (CompEditor *editor); static void page_changed_cb (GtkObject *obj, gpointer data); +static void 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 page_client_changed_cb (GtkObject *obj, ECal *client, gpointer data); @@ -469,11 +470,9 @@ save_comp_with_send (CompEditor *editor) send = priv->changed && priv->needs_send; - g_message ("Save and Send"); if (!save_comp (editor)) return FALSE; - g_message ("Send dialog"); if (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org)) { if (itip_organizer_is_user (priv->comp, priv->client)) return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST); @@ -765,6 +764,8 @@ comp_editor_append_page (CompEditor *editor, /* Listen for things happening on the page */ g_signal_connect(page, "changed", G_CALLBACK (page_changed_cb), editor); + g_signal_connect(page, "needs_send", + G_CALLBACK (needs_send_cb), editor); g_signal_connect(page, "summary_changed", G_CALLBACK (page_summary_changed_cb), editor); g_signal_connect(page, "dates_changed", @@ -1465,7 +1466,7 @@ page_changed_cb (GtkObject *obj, gpointer data) priv = editor->priv; - priv->changed = TRUE; + comp_editor_set_changed (editor, TRUE); if (!priv->warned && priv->existing_org && !priv->user_org) { e_notice (editor, GTK_MESSAGE_INFO, @@ -1475,6 +1476,17 @@ page_changed_cb (GtkObject *obj, gpointer data) } +static void +needs_send_cb (GtkObject *obj, gpointer data) +{ + CompEditor *editor = COMP_EDITOR (data); + CompEditorPrivate *priv; + + priv = editor->priv; + + comp_editor_set_needs_send (editor, TRUE); +} + /* Page signal callbacks */ static void page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data) diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index ab82e4eb93..fdd0cb40e1 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -354,6 +354,7 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) gtk_widget_show (priv->existing_organizer_table); if (itip_organizer_is_user (comp, page->client)) { gtk_widget_show (priv->invite); + gtk_widget_show (priv->add); if (e_cal_get_static_capability ( page->client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) @@ -364,6 +365,7 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) gtk_widget_hide (priv->existing_organizer_btn); gtk_widget_hide (priv->invite); + gtk_widget_hide (priv->add); } if (organizer.cn != NULL) @@ -543,8 +545,9 @@ change_clicked_cb (GtkWidget *widget, gpointer data) gtk_widget_show (priv->organizer_table); gtk_widget_hide (priv->existing_organizer_table); gtk_widget_show (priv->invite); + gtk_widget_show (priv->add); - comp_editor_page_notify_needs_send (COMP_EDITOR_PAGE (mpage)); + comp_editor_page_notify_changed (COMP_EDITOR_PAGE (mpage)); priv->existing = FALSE; } -- cgit