aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/delete-error.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
committerMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
commit03d626856b294bc98919ac244e04e9b8821a681d (patch)
tree62433e158f1791aa6b9222ecbe05d164c4703f6c /calendar/gui/dialogs/delete-error.c
parent6d4ce8571ff62a3e489999d2feeac1691e06c59a (diff)
downloadgsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.gz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.zst
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.zip
Bug #623204 - Be able to report detailed errors from backends
Diffstat (limited to 'calendar/gui/dialogs/delete-error.c')
-rw-r--r--calendar/gui/dialogs/delete-error.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index c312e16ada..9b9d22ae4c 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -39,7 +39,7 @@
*
**/
void
-delete_error_dialog (GError *error, ECalComponentVType vtype)
+delete_error_dialog (const GError *error, ECalComponentVType vtype)
{
GtkWidget *dialog;
const gchar *str;
@@ -49,19 +49,23 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
return;
switch (error->code) {
- case E_CALENDAR_STATUS_CORBA_EXCEPTION:
+ case E_CALENDAR_STATUS_DBUS_EXCEPTION:
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
- str = _("The event could not be deleted due to a corba error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The event could not be deleted due to a dbus error: %s");
break;
case E_CAL_COMPONENT_TODO:
- str = _("The task could not be deleted due to a corba error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The task could not be deleted due to a dbus error: %s");
break;
case E_CAL_COMPONENT_JOURNAL:
- str = _("The memo could not be deleted due to a corba error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The memo could not be deleted due to a dbus error: %s");
break;
default:
- str = _("The item could not be deleted due to a corba error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The item could not be deleted due to a dbus error: %s");
break;
}
break;
@@ -84,16 +88,20 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
case E_CALENDAR_STATUS_OTHER_ERROR:
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
- str = _("The event could not be deleted due to an error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The event could not be deleted due to an error: %s");
break;
case E_CAL_COMPONENT_TODO:
- str = _("The task could not be deleted due to an error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The task could not be deleted due to an error: %s");
break;
case E_CAL_COMPONENT_JOURNAL:
- str = _("The memo could not be deleted due to an error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The memo could not be deleted due to an error: %s");
break;
default:
- str = _("The item could not be deleted due to an error");
+ /* Translators: The '%s' is replaced with a detailed error message */
+ str = _("The item could not be deleted due to an error: %s");
break;
}
break;
@@ -106,7 +114,7 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, "%s", str);
+ GTK_BUTTONS_OK, str, error->message);
if (vtype == E_CAL_COMPONENT_EVENT)
icon_name = "x-office-calendar";
else if (vtype == E_CAL_COMPONENT_TODO)