aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2009-11-26 18:19:51 +0800
committerPaul Bolle <pebolle@tiscali.nl>2009-11-26 18:19:51 +0800
commit8a2c7800850d6726328c354fc3399d3ea34a0c34 (patch)
treee7faed13afb09eadde2a031bdc1ef18d58a8796f
parentaf960510bdb32deb387436f9dcb436093ff6d527 (diff)
downloadgsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.tar
gsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.tar.gz
gsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.tar.bz2
gsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.tar.lz
gsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.tar.xz
gsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.tar.zst
gsoc2013-evolution-8a2c7800850d6726328c354fc3399d3ea34a0c34.zip
Bug #550025 - Add error dialogs for Meetings
-rw-r--r--calendar/calendar.error.xml16
-rw-r--r--calendar/gui/dialogs/delete-comp.c17
-rw-r--r--calendar/gui/dialogs/save-comp.c7
3 files changed, 35 insertions, 5 deletions
diff --git a/calendar/calendar.error.xml b/calendar/calendar.error.xml
index 996f439a3f..346070bc83 100644
--- a/calendar/calendar.error.xml
+++ b/calendar/calendar.error.xml
@@ -43,6 +43,13 @@
<button stock="gtk-delete" response="GTK_RESPONSE_YES"/>
</error>
+ <error id="prompt-delete-titled-meeting" type="question" default="GTK_RESPONSE_NO">
+ <_primary>Are you sure you want to delete the meeting titled '{0}'?</_primary>
+ <_secondary>All information on this meeting will be deleted and can not be restored.</_secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_NO"/>
+ <button stock="gtk-delete" response="GTK_RESPONSE_YES"/>
+ </error>
+
<error id="prompt-delete-titled-appointment" type="question" default="GTK_RESPONSE_NO">
<_primary>Are you sure you want to delete the appointment titled '{0}'?</_primary>
<_secondary>All information on this appointment will be deleted and can not be restored.</_secondary>
@@ -92,6 +99,15 @@
<button stock="gtk-delete" response="GTK_RESPONSE_YES"/>
</error>
+ <error id="prompt-save-meeting" type="warning" default="GTK_RESPONSE_YES">
+ <_title>Save Meeting</_title>
+ <_primary>Would you like to save your changes to this meeting?</_primary>
+ <_secondary>You have changed this meeting, but not yet saved it.</_secondary>
+ <button _label="_Discard Changes" response="GTK_RESPONSE_NO"/>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button _label="_Save Changes" response="GTK_RESPONSE_YES"/>
+ </error>
+
<error id="prompt-save-appointment" type="warning" default="GTK_RESPONSE_YES">
<_title>Save Appointment</_title>
<_primary>Would you like to save your changes to this appointment?</_primary>
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: