From 0bdbb230d227325cc474ca1cfb5215a2edd78ae2 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 11 May 2004 22:05:03 +0000 Subject: get error information from the call to e_cal_receive_objects, and use that 2004-05-11 Rodrigo Moya * gui/e-itip-control.c (update_item): get error information from the call to e_cal_receive_objects, and use that as the error message. svn path=/trunk/; revision=25862 --- calendar/ChangeLog | 5 +++++ calendar/gui/e-itip-control.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index e45c4c23ba..ece744dd01 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2004-05-11 Rodrigo Moya + + * gui/e-itip-control.c (update_item): get error information from + the call to e_cal_receive_objects, and use that as the error message. + 2004-05-11 Dan Winship * gui/GNOME_Evolution_Calendar.server.in.in: Remove the calendar diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 0cc1b06cd9..13bce78ec9 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -1740,6 +1740,7 @@ update_item (EItipControl *itip) icalproperty *prop; icalcomponent *clone; GtkWidget *dialog; + GError *error = NULL; priv = itip->priv; @@ -1761,9 +1762,9 @@ update_item (EItipControl *itip) icalcomponent_add_component (priv->top_level, clone); icalcomponent_set_method (priv->top_level, priv->method); - /* FIXME Better error dialog */ - if (!e_cal_receive_objects (priv->current_ecal, priv->top_level, NULL)) { - dialog = gnome_warning_dialog (_("Calendar file could not be updated!\n")); + if (!e_cal_receive_objects (priv->current_ecal, priv->top_level, &error)) { + dialog = gnome_warning_dialog (error->message); + g_error_free (error); } else { dialog = gnome_ok_dialog (_("Update complete\n")); } -- cgit