diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2013-05-22 20:55:05 +0800 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2013-05-22 21:18:30 +0800 |
commit | a9666d99f03bda2873b933bc0572b5d2ddb03dad (patch) | |
tree | 4bf35fbb3e3a90809a1b0fd7af3288ccf0d65147 /calendar/gui/dialogs | |
parent | badc0e6156777c65885bad6858a6f44f7cbf037e (diff) | |
download | gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.tar gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.tar.gz gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.tar.bz2 gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.tar.lz gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.tar.xz gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.tar.zst gsoc2013-evolution-a9666d99f03bda2873b933bc0572b5d2ddb03dad.zip |
Use an user-friendlier message when update comp-editor fails
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index dd58b86ce6..abbf737206 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1041,7 +1041,6 @@ save_and_close_editor (CompEditor *editor, ECalClientSourceType source_type; icalcomponent *icalcomp = NULL; const gchar *uid = NULL; - gchar *msg; gchar *rid = NULL; GError *error = NULL; @@ -1060,42 +1059,35 @@ save_and_close_editor (CompEditor *editor, if (error != NULL) { switch (source_type) { case (E_CAL_CLIENT_SOURCE_TYPE_TASKS): - msg = g_strdup_printf ( - _("Unable to retrieve saved component from the task list, returned error was: %s"), - error->message); + g_warning ("Unable to retrieve saved component from the task list, returned error was: %s", error->message); break; case (E_CAL_CLIENT_SOURCE_TYPE_MEMOS): - msg = g_strdup_printf ( - _("Unable to retrieve saved component from the memo list, returned error was: %s"), - error->message); + g_warning ("Unable to retrieve saved component from the memo list, returned error was: %s", error->message); break; case (E_CAL_CLIENT_SOURCE_TYPE_EVENTS): default: - msg = g_strdup_printf ( - _("Unable to retrieve saved component from the calendar, returned error was: %s"), - error->message); + g_warning ("Unable to retrieve saved component from the calendar, returned error was: %s", error->message); break; } g_clear_error (&error); } else { switch (source_type) { case (E_CAL_CLIENT_SOURCE_TYPE_TASKS): - msg = g_strdup ( - _("Unable to retrieve saved component from the task list")); + g_warning ("Unable to retrieve saved component from the task list"); break; case (E_CAL_CLIENT_SOURCE_TYPE_MEMOS): - msg = g_strdup ( - _("Unable to retrieve saved component from the memo list")); + g_warning ("Unable to retrieve saved component from the memo list"); break; case (E_CAL_CLIENT_SOURCE_TYPE_EVENTS): default: - msg = g_strdup ( - _("Unable to retrieve saved component from the calendar")); + g_warning ("Unable to retrieve saved component from the calendar"); break; } } - e_notice (GTK_WINDOW (editor), GTK_MESSAGE_ERROR, "%s", msg); - g_free (msg); + e_notice ( + GTK_WINDOW (editor), + GTK_MESSAGE_ERROR, + _("Unable to synchronize with the server")); } else { comp = e_cal_component_new (); if (e_cal_component_set_icalcomponent (comp, icalcomp)) { @@ -1110,21 +1102,20 @@ save_and_close_editor (CompEditor *editor, } else { switch (source_type) { case (E_CAL_CLIENT_SOURCE_TYPE_TASKS): - msg = g_strdup ( - _("Unable to update the editor with the retrieved component from the task list")); + g_warning ("Unable to update the editor with the retrieved component from the task list"); break; case (E_CAL_CLIENT_SOURCE_TYPE_MEMOS): - msg = g_strdup ( - _("Unable to update the editor with the retrieved component from the memo list")); + g_warning ("Unable to update the editor with the retrieved component from the memo list"); break; case (E_CAL_CLIENT_SOURCE_TYPE_EVENTS): default: - msg = g_strdup ( - _("Unable to update the editor with the retrieved component from the calendar")); + g_warning ("Unable to update the editor with the retrieved component from the calendar"); break; } - e_notice (GTK_WINDOW (editor), GTK_MESSAGE_ERROR, "%s", msg); - g_free (msg); + e_notice ( + GTK_WINDOW (editor), + GTK_MESSAGE_ERROR, + _("Unable to synchronize with the server")); icalcomponent_free (icalcomp); } g_object_unref (comp); |