aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-12-22 00:17:09 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-12-22 00:17:09 +0800
commit72d188ef338726b5e5f831ce8976e8c7a33af7f4 (patch)
treecc01c585bde12f1b365c0b5dd8309b8f6dcda9a3 /calendar
parent44ec04bb27be55cd7456632d04cfe082cc8ba954 (diff)
downloadgsoc2013-evolution-72d188ef338726b5e5f831ce8976e8c7a33af7f4.tar.gz
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')
-rw-r--r--calendar/ChangeLog31
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c25
-rw-r--r--calendar/gui/dialogs/comp-editor-page.h1
-rw-r--r--calendar/gui/dialogs/comp-editor.c20
-rw-r--r--calendar/gui/dialogs/send-comp.c26
-rw-r--r--calendar/gui/dialogs/send-comp.h2
-rw-r--r--calendar/gui/e-day-view.c10
-rw-r--r--calendar/gui/e-week-view.c2
8 files changed, 58 insertions, 59 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 023ca5c4a8..bf82b75702 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,34 @@
-2001-12-21 <jpr@ximian.com>
+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
+
+2001-12-21 JP Rosevear <jpr@ximian.com>
+
* gui/dialogs/comp-editor.h: inherit from bonobo window
* gui/dialogs/comp-editor.c: inherit from bonobo window
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
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index dc8441e88a..6b473950f7 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -4437,7 +4437,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE;
if (cal_client_update_object (day_view->client, comp)) {
- if (cal_component_has_attendees (comp) && send_component_dialog (comp))
+ if (cal_component_has_attendees (comp) && send_component_dialog (comp, FALSE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp);
} else {
g_message ("e_day_view_finish_long_event_resize(): Could not update the object!");
@@ -4498,7 +4498,7 @@ e_day_view_finish_resize (EDayView *day_view)
day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE;
if (cal_client_update_object (day_view->client, comp)) {
- if (cal_component_has_attendees (comp) && send_component_dialog (comp))
+ if (cal_component_has_attendees (comp) && send_component_dialog (comp, FALSE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp);
} else {
g_message ("e_day_view_finish_resize(): Could not update the object!");
@@ -5841,7 +5841,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
cal_component_set_summary (event->comp, &summary);
if (cal_client_update_object (day_view->client, event->comp)) {
- if (cal_component_has_attendees (event->comp) && send_component_dialog (event->comp))
+ if (cal_component_has_attendees (event->comp) && send_component_dialog (event->comp, FALSE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, event->comp);
} else {
g_message ("e_day_view_on_editing_stopped(): Could not update the object!");
@@ -6889,7 +6889,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
gnome_canvas_item_show (event->canvas_item);
if (cal_client_update_object (day_view->client, comp)) {
- if (cal_component_has_attendees (comp) && send_component_dialog (comp))
+ if (cal_component_has_attendees (comp) && send_component_dialog (comp, FALSE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp);
} else {
g_message ("e_day_view_on_top_canvas_drag_data_received(): Could "
@@ -7001,7 +7001,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
gnome_canvas_item_show (event->canvas_item);
if (cal_client_update_object (day_view->client, comp)) {
- if (cal_component_has_attendees (comp) && send_component_dialog (comp))
+ if (cal_component_has_attendees (comp) && send_component_dialog (comp, FALSE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp);
} else {
g_message ("e_day_view_on_main_canvas_drag_data_received(): "
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index df489ef710..c9c4b4077e 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3188,7 +3188,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
cal_component_set_summary (event->comp, &summary);
if (cal_client_update_object (week_view->client, event->comp)) {
- if (cal_component_has_attendees (event->comp) && send_component_dialog (event->comp))
+ if (cal_component_has_attendees (event->comp) && send_component_dialog (event->comp, FALSE))
itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, event->comp);
} else {
g_message ("e_week_view_on_editing_stopped(): Could not update the object!");