From 8a2c7800850d6726328c354fc3399d3ea34a0c34 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 26 Nov 2009 11:19:51 +0100 Subject: Bug #550025 - Add error dialogs for Meetings --- calendar/gui/dialogs/delete-comp.c | 17 +++++++++++++---- calendar/gui/dialogs/save-comp.c | 7 ++++++- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index 1a004272d1..8fc8d80ddf 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -64,6 +64,7 @@ delete_component_dialog (ECalComponent *comp, const gchar *id; gchar *arg0 = NULL; gint response; + gboolean attendees; if (comp) { g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE); @@ -91,10 +92,18 @@ delete_component_dialog (ECalComponent *comp, switch (vtype) { case E_CAL_COMPONENT_EVENT: - if (arg0) - id = "calendar:prompt-delete-titled-appointment"; - else - id = "calendar:prompt-delete-appointment"; + attendees = e_cal_component_has_attendees (comp); + if (arg0) { + if (attendees) + id = "calendar:prompt-delete-titled-meeting"; + else + id = "calendar:prompt-delete-titled-appointment"; + } else { + if (attendees) + id = "calendar:prompt-delete-meeting"; + else + id = "calendar:prompt-delete-appointment"; + } break; case E_CAL_COMPONENT_TODO: diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c index 7284f1d0d5..0d42b73b91 100644 --- a/calendar/gui/dialogs/save-comp.c +++ b/calendar/gui/dialogs/save-comp.c @@ -44,10 +44,15 @@ GtkResponseType save_component_dialog (GtkWindow *parent, ECalComponent *comp) { ECalComponentVType vtype = e_cal_component_get_vtype(comp); + CompEditorFlags flags; switch (vtype) { case E_CAL_COMPONENT_EVENT: - return e_error_run (parent, "calendar:prompt-save-appointment", NULL); + flags = comp_editor_get_flags (COMP_EDITOR(parent)); + if (flags & COMP_EDITOR_MEETING) + return e_error_run (parent, "calendar:prompt-save-meeting", NULL); + else + return e_error_run (parent, "calendar:prompt-save-appointment", NULL); case E_CAL_COMPONENT_TODO: return e_error_run (parent, "calendar:prompt-save-task", NULL); case E_CAL_COMPONENT_JOURNAL: -- cgit v1.2.3