aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/cancel-comp.c28
-rw-r--r--calendar/gui/dialogs/cancel-comp.h2
-rw-r--r--calendar/gui/dialogs/comp-editor.c10
-rw-r--r--calendar/gui/dialogs/event-editor.c2
-rw-r--r--calendar/gui/dialogs/task-editor.c2
5 files changed, 30 insertions, 14 deletions
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index 92590cfa40..9156877016 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -42,30 +42,40 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-cancel_component_dialog (CalComponent *comp)
+cancel_component_dialog (CalComponent *comp, gboolean deleting)
{
GtkWidget *dialog;
CalComponentVType vtype;
char *str;
- str = _("The meeting status has changed. Send an updated version?");
-
vtype = cal_component_get_vtype (comp);
switch (vtype) {
case CAL_COMPONENT_EVENT:
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this meeting?"));
+ if (deleting)
+ str = g_strdup_printf (_("The event being deleted is a meeting, "
+ "would you like to send a cancellation notice?"));
+ else
+ str = g_strdup_printf (_("Are you sure you want to cancel "
+ "and delete this meeting?"));
break;
case CAL_COMPONENT_TODO:
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this task?"));
+ if (deleting)
+ str = g_strdup_printf (_("The task being deleted is assigned, "
+ "would you like to send a cancellation notice?"));
+ else
+ str = g_strdup_printf (_("Are you sure you want to cancel "
+ "and delete this task?"));
break;
case CAL_COMPONENT_JOURNAL:
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this journal entry?"));
+ if (deleting)
+ str = g_strdup_printf (_("The journal entry being deleted is published, "
+ "would you like to send a cancellation notice?"));
+ else
+ str = g_strdup_printf (_("Are you sure you want to cancel "
+ "and delete this journal entry?"));
break;
default:
diff --git a/calendar/gui/dialogs/cancel-comp.h b/calendar/gui/dialogs/cancel-comp.h
index d12466ffa1..b05d6a5cab 100644
--- a/calendar/gui/dialogs/cancel-comp.h
+++ b/calendar/gui/dialogs/cancel-comp.h
@@ -24,6 +24,6 @@
#include <glib.h>
#include <cal-util/cal-component.h>
-gboolean cancel_component_dialog (CalComponent *comp);
+gboolean cancel_component_dialog (CalComponent *comp, gboolean deleting);
#endif
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 1179453aff..44e7f80c20 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -47,6 +47,7 @@
#include "delete-comp.h"
#include "send-comp.h"
#include "changed-comp.h"
+#include "cancel-comp.h"
#include "comp-editor.h"
@@ -379,7 +380,7 @@ save_comp_with_send (CompEditor *editor)
if (!save_comp (editor))
return FALSE;
- if (send && send_component_dialog (priv->comp, priv->existing_org)) {
+ if (send && send_component_dialog (priv->comp, !priv->existing_org)) {
if (itip_organizer_is_user (priv->comp))
comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST);
else
@@ -1232,8 +1233,13 @@ delete_cmd (GtkWidget *widget, gpointer data)
vtype = cal_component_get_vtype (priv->comp);
- if (delete_component_dialog (priv->comp, FALSE, 1, vtype, GTK_WIDGET (editor)))
+ if (delete_component_dialog (priv->comp, FALSE, 1, vtype, GTK_WIDGET (editor))) {
+ if (itip_organizer_is_user (priv->comp)
+ && cancel_component_dialog (priv->comp, TRUE))
+ itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
+
delete_comp (editor);
+ }
}
static void
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 7c020caff0..7224f6f175 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -446,7 +446,7 @@ cancel_meeting_cmd (GtkWidget *widget, gpointer data)
CalComponent *comp;
comp = comp_editor_get_current_comp (COMP_EDITOR (ee));
- if (cancel_component_dialog (comp)) {
+ if (cancel_component_dialog (comp, FALSE)) {
comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_CANCEL);
comp_editor_delete_comp (COMP_EDITOR (ee));
}
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index b712e07135..7a637f34f1 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -394,7 +394,7 @@ cancel_task_cmd (GtkWidget *widget, gpointer data)
CalComponent *comp;
comp = comp_editor_get_current_comp (COMP_EDITOR (te));
- if (cancel_component_dialog (comp)) {
+ if (cancel_component_dialog (comp, FALSE)) {
comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_CANCEL);
comp_editor_delete_comp (COMP_EDITOR (te));
}