diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index cad55ebf08..05710b7581 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -297,6 +297,7 @@ save_comp (CompEditor *editor) CompEditorPrivate *priv; CalComponent *clone; GList *l; + CalClientResult result; priv = editor->priv; @@ -316,11 +317,29 @@ save_comp (CompEditor *editor) priv->updating = TRUE; - if (!cal_client_update_object (priv->client, priv->comp)) { + result = cal_client_update_object (priv->client, priv->comp); + if (result != CAL_CLIENT_RESULT_SUCCESS) { GtkWidget *dlg; + char *msg; + + switch (result) { + case CAL_CLIENT_RESULT_INVALID_OBJECT : + msg = g_strdup (_("Could not update invalid object")); + break; + case CAL_CLIENT_RESULT_NOT_FOUND : + msg = g_strdup (_("Object not found, not updated")); + break; + case CAL_CLIENT_RESULT_PERMISSION_DENIED : + msg = g_strdup (_("You don't have permissions to update this object")); + break; + default : + msg = g_strdup (_("Could not update object")); + break; + } - dlg = gnome_error_dialog (_("Could not update object!")); + dlg = gnome_error_dialog (msg); gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); + g_free (msg); return FALSE; } else { |