Merged fix for bugs 87174, 86213 from trunk
authorVivek Sekar <viveksekar@gmail.com>
Mon, 4 Aug 2008 13:49:51 +0000 (13:49 +0000)
committerVivek Sekar <viveksekar@gmail.com>
Mon, 4 Aug 2008 13:49:51 +0000 (13:49 +0000)
pmo-diablo-r5256

src/maemo/modest-msg-edit-window.c
src/modest-default-connection-policy.c
src/modest-ui-actions.c

index 611f552..b340c34 100644 (file)
@@ -2319,7 +2319,6 @@ modest_msg_edit_window_attach_file_one (ModestMsgEditWindow *window,
        ModestMsgEditWindowPrivate *priv;
        GnomeVFSResult result;
        GnomeVFSFileSize size = 0;
-
        g_return_val_if_fail (window, 0);
        g_return_val_if_fail (uri, 0);
                
@@ -2362,8 +2361,8 @@ modest_msg_edit_window_attach_file_one (ModestMsgEditWindow *window,
                    info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) {
                        size = info->size;
                        if (size > allowed_size) {
-                               g_warning ("%s: attachment too big", __FUNCTION__);
-                               modest_platform_information_banner (NULL, NULL, dgettext("hildon-fm", "sfil_ib_opening_not_allowed"));
+                               modest_platform_information_banner (NULL, NULL, 
+                                                                   dgettext("hildon-fm", "sfil_ib_opening_not_allowed"));
                                return 0;
                        }
                } else
index e72d478..778ca0e 100644 (file)
@@ -65,7 +65,6 @@ modest_default_connection_policy_on_connection_broken (TnyConnectionPolicy *self
 static void
 modest_default_connection_policy_on_disconnect (TnyConnectionPolicy *self, TnyAccount *account)
 {
-       tny_account_cancel (account);
        return;
 }
 
index 0e36164..e01d8e8 100644 (file)
@@ -753,11 +753,15 @@ modest_ui_actions_compose_msg(ModestWindow *win,
        total_size = 0;
        allowed_size = MODEST_MAX_ATTACHMENT_SIZE;
        msg_win = modest_msg_edit_window_new (msg, account_name, FALSE);
+
+       modest_window_mgr_register_window (modest_runtime_get_window_mgr(), msg_win);
+       modest_msg_edit_window_set_modified (MODEST_MSG_EDIT_WINDOW (msg_win), set_as_modified);
+       gtk_widget_show_all (GTK_WIDGET (msg_win));
+
        while (attachments) {
                total_size +=
-                       modest_msg_edit_window_attach_file_one(
-                               (ModestMsgEditWindow *)msg_win,
-                               attachments->data, allowed_size);
+                       modest_msg_edit_window_attach_file_one((ModestMsgEditWindow *)msg_win,
+                                                              attachments->data, allowed_size);
 
                if (total_size > allowed_size) {
                        g_warning ("%s: total size: %u",
@@ -768,10 +772,6 @@ modest_ui_actions_compose_msg(ModestWindow *win,
 
                attachments = g_slist_next(attachments);
        }
-       modest_window_mgr_register_window (modest_runtime_get_window_mgr(), msg_win);
-       modest_msg_edit_window_set_modified (MODEST_MSG_EDIT_WINDOW (msg_win), set_as_modified);
-
-       gtk_widget_show_all (GTK_WIDGET (msg_win));
 
 cleanup:
        g_free (from_str);
@@ -2388,7 +2388,6 @@ modest_ui_actions_on_folder_selection_changed (ModestFolderView *folder_view,
                if (TNY_IS_FOLDER (folder_store) && selected) {
                        TnyAccount *account;
                        const gchar *account_name = NULL;
-                       gboolean refresh;
 
                        /* Update the active account */
                        account = modest_tny_folder_get_account (TNY_FOLDER (folder_store));
@@ -2406,8 +2405,6 @@ modest_ui_actions_on_folder_selection_changed (ModestFolderView *folder_view,
                        modest_main_window_set_contents_style (main_window, 
                                                               MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS);
 
-                       refresh = !modest_account_mgr_account_is_busy (modest_runtime_get_account_mgr (), account_name);
-
                        /* Set folder on header view. This function
                           will call tny_folder_refresh_async so we
                           pass a callback that will be called when
@@ -2415,7 +2412,7 @@ modest_ui_actions_on_folder_selection_changed (ModestFolderView *folder_view,
                           empty view if there are no messages */
                        modest_header_view_set_folder (MODEST_HEADER_VIEW(header_view),
                                                       TNY_FOLDER (folder_store),
-                                                      refresh,
+                                                      TRUE,
                                                       folder_refreshed_cb,
                                                       main_window);