if(error == NULL || error->domain != modest_maemo_utils_get_supported_secure_authentication_error_quark() ||
error->code != MODEST_MAEMO_UTILS_GET_SUPPORTED_SECURE_AUTHENTICATION_ERROR_CANCELED)
{
- GtkWidget* error_dialog = gtk_message_dialog_new(GTK_WINDOW(account_wizard),
- GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, (error != NULL) ? error->message : _("Server does not support secure authentication!"));
- gtk_dialog_run(GTK_DIALOG(error_dialog));
- gtk_widget_destroy(error_dialog);
+ show_error (GTK_WINDOW (account_wizard), _("Could not discover supported secure authentication methods."));
}
if(error != NULL) g_error_free(error);
if(error == NULL || error->domain != modest_maemo_utils_get_supported_secure_authentication_error_quark() ||
error->code != MODEST_MAEMO_UTILS_GET_SUPPORTED_SECURE_AUTHENTICATION_ERROR_CANCELED)
{
- GtkWidget* error_dialog = gtk_message_dialog_new(GTK_WINDOW(self),
- GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, (error != NULL) ? error->message : _("Server does not support secure authentication!"));
- gtk_dialog_run(GTK_DIALOG(error_dialog));
- gtk_widget_destroy(error_dialog);
+ show_error (GTK_WINDOW (self), _("Could not discover supported secure authentication methods."));
}
- if(error != NULL) g_error_free(error);
+ if(error != NULL)
+ g_error_free(error);
+
/* This is a nasty hack. jschmid. */
/* Don't let the dialog close */
/*g_signal_stop_emission_by_name (dialog, "response");*/
static void
on_sendqueue_error_happened (TnySendQueue *self, TnyHeader *header, TnyMsg *msg, GError *err, ModestMainWindow *user_data)
{
+ if (err) {
+ printf ("DEBUG: %s: err->code=%d, err->message=%s\n", __FUNCTION__, err->code, err->message);
+ }
+
if (header) {
gchar *str = g_strdup_printf ("%s. Do you want to remove the message (%s)?",
err->message, tny_header_get_subject (header));
/* const gchar *prompt = NULL; */
gchar *prompt = NULL;
switch (error->code) {
+ case TNY_ACCOUNT_STORE_ERROR_CANCEL_ALERT:
+ /* Don't show waste the user's time by showing him a dialog telling the
+ * user that he has just cancelled something: */
+ g_debug ("%s: Handling GError domain=%d, code=%d (cancelled) without showing a dialog, message=%s",
+ __FUNCTION__, error->domain, error->code, error->message);
+ prompt = NULL;
+ break;
+ case TNY_ACCOUNT_ERROR_TRY_CONNECT_HOST_LOOKUP_FAILED:
+ g_debug ("%s: Handling GError domain=%d, code=%d (lookup failed), message=%s",
+ __FUNCTION__, error->domain, error->code, error->message);
+ prompt = g_strdup (_("emev_ni_ui_pop3_msg_connect_error"));
+ /*
+ prompt = g_strdup_printf(
+ "%s\n Host lookup failed.%s",
+ _("Incorrect Account Settings"),
+ error->message);
+ */
+ break;
+ case TNY_ACCOUNT_ERROR_TRY_CONNECT_AUTHENTICATION_NOT_SUPPORTED:
+ g_debug ("%s: Handling GError domain=%d, code=%d (authentication not supported), message=%s",
+ __FUNCTION__, error->domain, error->code, error->message);
+ prompt = g_strdup_printf(
+ "%s\n The secure authentication method is not supported.\n%s",
+ _("Incorrect Account Settings"),
+ error->message);
+ break;
+
case TNY_ACCOUNT_ERROR_TRY_CONNECT:
/* The tinymail camel implementation just sends us this for almost
* everything, so we have to guess at the cause.
case TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT:
/* This debug output is useful. Please keep it uncommented until
* we have fixed the problems in this function: */
- g_debug ("%s: Handling GError domain=%d, code=%d, message=%s",
+ g_debug ("%s: Handling GError domain=%d, code=%d, message=%s",
__FUNCTION__, error->domain, error->code, error->message);
/* TODO: Remove the internal error message for the real release.