From 855f978850a02ba9a389a11de99b1c856f3ff60a Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Tue, 17 Feb 2009 10:45:10 +0000 Subject: [PATCH] Removed trailing whitespaces pmo-trunk-r7505 --- .../modest-connection-specific-smtp-window.c | 29 +++++++++----------- src/modest-tny-account-store.c | 6 ++-- src/modest-transport-account-decorator.c | 2 +- src/modest-ui-actions.c | 8 +++--- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/hildon2/modest-connection-specific-smtp-window.c b/src/hildon2/modest-connection-specific-smtp-window.c index b2dd4f1..02d3f1e 100644 --- a/src/hildon2/modest-connection-specific-smtp-window.c +++ b/src/hildon2/modest-connection-specific-smtp-window.c @@ -266,11 +266,7 @@ edit_account (ModestConnectionSpecificSmtpWindow *self, GtkTreePath *path) MODEL_COL_SERVER_ACCOUNT_NAME, &server_account_name, MODEL_COL_SERVER_ACCOUNT_SETTINGS, &server_settings, -1); - - /* printf("DEBUG: %s: BEFORE: connection-specific server_account_name=%s\n", __FUNCTION__, server_account_name); */ - /* TODO: Is 0 an allowed libconic IAP ID? - * If not then we should check for it. */ - + /* Get existing server account data if a server account is already specified: */ gboolean settings_were_retrieved = FALSE; if (server_account_name && !server_settings) { @@ -278,19 +274,19 @@ edit_account (ModestConnectionSpecificSmtpWindow *self, GtkTreePath *path) if (server_settings) settings_were_retrieved = TRUE; } - + GtkWidget * window = GTK_WIDGET (modest_connection_specific_smtp_edit_window_new ()); modest_connection_specific_smtp_edit_window_set_connection ( MODEST_CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW (window), id, connection_name, server_settings); - + /* Delete data, unless it was data from the rowmodel: */ if (settings_were_retrieved) { g_object_unref (server_settings); server_settings = NULL; } - + modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (window), GTK_WINDOW (self)); - + gint response = gtk_dialog_run (GTK_DIALOG (window)); if (response == GTK_RESPONSE_OK) { @@ -299,14 +295,14 @@ edit_account (ModestConnectionSpecificSmtpWindow *self, GtkTreePath *path) g_object_unref (server_settings); server_settings = NULL; } - + /* Get the new account data and save it in the row for later: * We free this in finalize(), * and save it to our configuration in * modest_connection_specific_smtp_window_save_server_accounts(). */ server_settings = modest_connection_specific_smtp_edit_window_get_settings ( MODEST_CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW (window)); - + if (server_settings) { gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter, MODEL_COL_SERVER_ACCOUNT_SETTINGS, server_settings, @@ -441,8 +437,8 @@ modest_connection_specific_smtp_window_save_server_accounts (ModestConnectionSpe ModestAccountMgr *mgr = modest_runtime_get_account_mgr (); ModestConnectionSpecificSmtpWindowPrivate *priv = CONNECTION_SPECIFIC_SMTP_WINDOW_GET_PRIVATE (self); - - + + /* Get the first iter in the list */ GtkTreeIter iter; gboolean valid = gtk_tree_model_get_iter_first (priv->model, &iter); @@ -454,7 +450,7 @@ modest_connection_specific_smtp_window_save_server_accounts (ModestConnectionSpe gchar *server_account_name = NULL; gchar *server_name = NULL; ModestServerAccountSettings *server_settings = NULL; - + gtk_tree_model_get (priv->model, &iter, MODEL_COL_ID, &id, MODEL_COL_NAME, &connection_name, @@ -462,8 +458,8 @@ modest_connection_specific_smtp_window_save_server_accounts (ModestConnectionSpe MODEL_COL_SERVER_ACCOUNT_NAME, &server_account_name, MODEL_COL_SERVER_ACCOUNT_SETTINGS, &server_settings, -1); - - gboolean success = TRUE; + + gboolean success = TRUE; if (id && server_settings) { /* The presence of data suggests that there is something to save. */ if (!server_account_name) { /* Add a new server account, building a (non-human-visible) name: */ @@ -492,6 +488,7 @@ modest_connection_specific_smtp_window_save_server_accounts (ModestConnectionSpe MODEL_COL_SERVER_ACCOUNT_NAME, server_account_name, -1); } else { + /* If the account already exists then update it and notify */ modest_account_mgr_save_server_settings (mgr, server_settings); } } else if (id && server_name && diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 7f198db..20d1851 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1388,17 +1388,17 @@ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection if (!server_account_name) { return NULL; /* No connection-specific SMTP server was specified for this connection. */ } - + TnyAccount* account = modest_tny_account_store_get_tny_account_by (self, MODEST_TNY_ACCOUNT_STORE_QUERY_ID, server_account_name); /* printf ("DEBUG: %s: account=%p\n", __FUNCTION__, account); */ - g_free (server_account_name); + g_free (server_account_name); /* Unref the get()ed object, as required by the tny_maemo_conic_device_get_iap() documentation. */ g_object_unref (connection); - + return account; #else return NULL; /* TODO: Implement this for GNOME, instead of just Maemo? */ diff --git a/src/modest-transport-account-decorator.c b/src/modest-transport-account-decorator.c index de47dc4..d3a8ec5 100644 --- a/src/modest-transport-account-decorator.c +++ b/src/modest-transport-account-decorator.c @@ -83,7 +83,7 @@ modest_transport_account_decorator_send (TnyTransportAccount *self, TnyMsg *msg, connection_specific_account = TNY_TRANSPORT_ACCOUNT (modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (store, account_name)); } - + if (connection_specific_account) { tny_transport_account_send (connection_specific_account, msg, err); g_object_unref (connection_specific_account); diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index dfd8c97..c1dc59e 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -6304,7 +6304,7 @@ on_send_receive_finished (ModestMailOperation *mail_op, } -void +void modest_ui_actions_on_send_queue_error_happened (TnySendQueue *self, TnyHeader *header, TnyMsg *msg, @@ -6326,10 +6326,10 @@ modest_ui_actions_on_send_queue_error_happened (TnySendQueue *self, /* Get the server name: */ - server_account = + server_account = TNY_TRANSPORT_ACCOUNT (tny_camel_send_queue_get_transport_account (TNY_CAMEL_SEND_QUEUE (self))); if (server_account) - server_name = tny_account_get_hostname (TNY_ACCOUNT (server_account)); + server_name = tny_account_get_hostname (TNY_ACCOUNT (server_account)); else g_return_if_reached (); @@ -6348,7 +6348,7 @@ modest_ui_actions_on_send_queue_error_happened (TnySendQueue *self, g_warning ("%s: unexpected ERROR %d", __FUNCTION__, err->code); message = g_strdup (_CS("sfil_ib_unable_to_send")); - break; + break; } modest_platform_run_information_dialog (NULL, message, FALSE); -- 1.7.9.5