diff options
author | JP Rosevear <jpr@ximian.com> | 2001-12-22 00:17:09 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-12-22 00:17:09 +0800 |
commit | 72d188ef338726b5e5f831ce8976e8c7a33af7f4 (patch) | |
tree | cc01c585bde12f1b365c0b5dd8309b8f6dcda9a3 /calendar/gui/dialogs | |
parent | 44ec04bb27be55cd7456632d04cfe082cc8ba954 (diff) | |
download | gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar.gz gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar.bz2 gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar.lz gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar.xz gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar.zst gsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.zip |
remove needs send signal related cruft (save_comp_with_send): with
2001-12-21 JP Rosevear <jpr@ximian.com>
* gui/dialogs/comp-editor.c: remove needs send signal related
cruft
(save_comp_with_send): with send_component_dialog, indicate if the
meeting info is newly created or not
(real_edit_comp): remember if the dialog initially needs a send
* gui/dialogs/send-comp.c (send_component_dialog): take a "new"
parameter indicating whether the dialog should intimate if the
component to be sent is a new meeting or not
* gui/dialogs/send-comp.h: update proto
* gui/dialogs/comp-editor.c: remove no longer used needs_send
notification and signal
* gui/dialogs/comp-editor.h: remove proto
* gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received): add new
param to send_component_dialog
(e_day_view_finish_long_event_resize): ditto
(e_day_view_finish_resize): ditto
(e_day_view_on_editing_stopped): ditto
(e_day_view_on_top_canvas_drag_data_received): ditto
* gui/e-week-view.c (e_week_view_on_editing_stopped): add new
param to send_component_dialog
svn path=/trunk/; revision=15204
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-page.c | 25 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor-page.h | 1 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 20 | ||||
-rw-r--r-- | calendar/gui/dialogs/send-comp.c | 26 | ||||
-rw-r--r-- | calendar/gui/dialogs/send-comp.h | 2 |
5 files changed, 22 insertions, 52 deletions
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index b1fabf28be..0d7f315837 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -37,7 +37,6 @@ static GtkObjectClass *parent_class = NULL; enum { CHANGED, - NEEDS_SEND, SUMMARY_CHANGED, DATES_CHANGED, LAST_SIGNAL @@ -101,15 +100,6 @@ comp_editor_page_class_init (CompEditorPageClass *class) gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - comp_editor_page_signals[NEEDS_SEND] = - gtk_signal_new ("needs_send", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CompEditorPageClass, - needs_send), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - comp_editor_page_signals[SUMMARY_CHANGED] = gtk_signal_new ("summary_changed", GTK_RUN_FIRST, @@ -332,21 +322,6 @@ comp_editor_page_notify_changed (CompEditorPage *page) } /** - * comp_editor_page_notify_needs_send: - * @page: - * - * - **/ -void -comp_editor_page_notify_needs_send (CompEditorPage *page) -{ - g_return_if_fail (page != NULL); - g_return_if_fail (IS_COMP_EDITOR_PAGE (page)); - - gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[NEEDS_SEND]); -} - -/** * comp_editor_page_notify_summary_changed: * @page: An editor page. * diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h index 1b84cb16b7..6ef5549219 100644 --- a/calendar/gui/dialogs/comp-editor-page.h +++ b/calendar/gui/dialogs/comp-editor-page.h @@ -95,7 +95,6 @@ void comp_editor_page_set_summary (CompEditorPage *page, void comp_editor_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates); void comp_editor_page_notify_changed (CompEditorPage *page); -void comp_editor_page_notify_needs_send (CompEditorPage *page); void comp_editor_page_notify_summary_changed (CompEditorPage *page, const char *summary); void comp_editor_page_notify_dates_changed (CompEditorPage *page, diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 0d19bdade2..14bee4e9a7 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -69,6 +69,7 @@ struct _CompEditorPrivate { gboolean changed; gboolean needs_send; + gboolean needs_send_new; gboolean updating; }; @@ -87,7 +88,6 @@ static void delete_comp (CompEditor *editor); static void close_dialog (CompEditor *editor); 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); @@ -239,6 +239,7 @@ comp_editor_init (CompEditor *editor) priv->pages = NULL; priv->changed = FALSE; priv->needs_send = FALSE; + priv->needs_send_new = FALSE; } @@ -343,7 +344,7 @@ save_comp_with_send (CompEditor *editor) if (!save_comp (editor)) return FALSE; - if (send && send_component_dialog (priv->comp)) + if (send && send_component_dialog (priv->comp, priv->needs_send_new)) comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST); return TRUE; @@ -553,8 +554,6 @@ comp_editor_append_page (CompEditor *editor, gtk_notebook_append_page (priv->notebook, page_widget, label_widget); /* Listen for things happening on the page */ - gtk_signal_connect (GTK_OBJECT (page), "needs_send", - GTK_SIGNAL_FUNC (page_needs_send_cb), editor); gtk_signal_connect (GTK_OBJECT (page), "changed", GTK_SIGNAL_FUNC (page_changed_cb), editor); gtk_signal_connect (GTK_OBJECT (page), "summary_changed", @@ -835,6 +834,8 @@ real_edit_comp (CompEditor *editor, CalComponent *comp) if (comp) priv->comp = cal_component_clone (comp); + priv->needs_send_new = !priv->needs_send; + set_title_from_comp (editor); set_icon_from_comp (editor); fill_widgets (editor); @@ -1216,17 +1217,6 @@ page_changed_cb (GtkObject *obj, gpointer data) priv->changed = TRUE; } -static void -page_needs_send_cb (GtkObject *obj, gpointer data) -{ - CompEditor *editor = COMP_EDITOR (data); - CompEditorPrivate *priv; - - priv = editor->priv; - - priv->needs_send = TRUE; -} - /* Page signal callbacks */ static void page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data) diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index 8fe62e77b3..2afd92320e 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -42,7 +42,7 @@ * Return value: TRUE if the user clicked Yes, FALSE otherwise. **/ gboolean -send_component_dialog (CalComponent *comp) +send_component_dialog (CalComponent *comp, gboolean new) { GtkWidget *dialog; CalComponentVType vtype; @@ -52,18 +52,24 @@ send_component_dialog (CalComponent *comp) switch (vtype) { case CAL_COMPONENT_EVENT: - str = g_strdup_printf (_("The meeting information has changed. " - "Send an updated version?")); + if (new) + str = g_strdup_printf (_("The meeting information has " + "been created. Send it?")); + else + str = g_strdup_printf (_("The meeting information has " + "changed. Send an updated " + "version?")); break; case CAL_COMPONENT_TODO: - str = g_strdup_printf (_("The task information has changed. " - "Send an updated version?")); - break; - - case CAL_COMPONENT_JOURNAL: - str = g_strdup_printf (_("The journal entry has changed. " - "Send an updated version?")); + if (new) + str = g_strdup_printf (_("The task assignment " + "information has been " + "created. Send it?")); + else + str = g_strdup_printf (_("The task information has " + "changed. Send an updated " + "version?")); break; default: diff --git a/calendar/gui/dialogs/send-comp.h b/calendar/gui/dialogs/send-comp.h index ea43a229d3..9a77d8bd4e 100644 --- a/calendar/gui/dialogs/send-comp.h +++ b/calendar/gui/dialogs/send-comp.h @@ -24,6 +24,6 @@ #include <glib.h> #include <cal-util/cal-component.h> -gboolean send_component_dialog (CalComponent *comp); +gboolean send_component_dialog (CalComponent *comp, gboolean new); #endif |