* modest-header-view.c: Remove some commented and unsed code.
authorJavier Fernandez Garcia-Boente <jfernandez@igalia.com>
Mon, 13 Aug 2007 11:35:43 +0000 (11:35 +0000)
committerJavier Fernandez Garcia-Boente <jfernandez@igalia.com>
Mon, 13 Aug 2007 11:35:43 +0000 (11:35 +0000)
* modest-ui-actios.c: implemented some changes on
new_messages_arrieved callback, executed afte send&receive has
been completed, to check if folder is empty and new message
have arrived; this imlpies a change in main-view window style.
* Fixes: NB#57458

pmo-trunk-r2963

src/modest-ui-actions.c
src/widgets/modest-header-view.c

index baf2176..fbc1895 100644 (file)
@@ -1411,10 +1411,22 @@ new_messages_arrived (ModestMailOperation *self,
                      gint new_messages,
                      gpointer user_data)
 {
+       ModestMainWindow *win = NULL;
+       gboolean folder_empty = FALSE;
+
+       g_return_if_fail (MODEST_IS_MAIN_WINDOW (user_data));
+       win = MODEST_MAIN_WINDOW (user_data);
+
        if (new_messages == 0)
                return;
+       
+       /* Set contents style of headers view */
+       folder_empty = modest_main_window_get_style (win);
+       if (folder_empty) {
+               modest_main_window_set_contents_style (win,
+                                                      MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS);
+       }       
 
-       modest_platform_on_new_msg ();
 }
 
 /*
@@ -1463,7 +1475,7 @@ modest_ui_actions_do_send_receive (const gchar *account_name, ModestWindow *win)
           internally, so the progress objects will receive the proper
           progress information */
        modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_op);
-       modest_mail_operation_update_account (mail_op, acc_name, new_messages_arrived, NULL);
+       modest_mail_operation_update_account (mail_op, acc_name, new_messages_arrived, win);
        g_object_unref (G_OBJECT (mail_op));
        
        /* Free */
index b95dc48..20669ba 100644 (file)
@@ -1521,11 +1521,6 @@ folder_monitor_update (TnyFolderObserver *self,
        if (tny_folder_change_get_folder (change) != priv->folder)
                return;
 
-       /* Check header removed  (hide marked as DELETED headers) */
-/*     if (changed & TNY_FOLDER_CHANGE_CHANGED_EXPUNGED_HEADERS) { */
-/*             modest_header_view_refilter (MODEST_HEADER_VIEW(self)); */
-/*     } */
-
        /* Check folder count */
        if ((changed & TNY_FOLDER_CHANGE_CHANGED_ADDED_HEADERS) ||
            (changed & TNY_FOLDER_CHANGE_CHANGED_EXPUNGED_HEADERS)) {