In stead of using tny_folder_refresh, use tny_folder_poke_status in case folders...
authorPhilip Van Hoof <philip@codeminded.be>
Fri, 8 Jun 2007 09:19:28 +0000 (09:19 +0000)
committerPhilip Van Hoof <philip@codeminded.be>
Fri, 8 Jun 2007 09:19:28 +0000 (09:19 +0000)
pmo-trunk-r2126

src/maemo/easysetup/modest-easysetup-country-combo-box.c
src/modest-mail-operation.c
src/modest-search.c
src/modest-search.h

index dcfd1d6..c41a2c2 100644 (file)
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE /* So we can use the getline() function, which is a convenient GNU extension. */
+#endif
+
 #include <stdio.h>
 
 #include "modest-easysetup-country-combo-box.h"
index 7a5bb33..44328ea 100644 (file)
@@ -820,6 +820,7 @@ update_account_thread (gpointer thr_user_data)
        ModestMailOperationPrivate *priv;
        ModestTnySendQueue *send_queue;
 
+
        info = (UpdateAccountInfo *) thr_user_data;
        priv = MODEST_MAIL_OPERATION_GET_PRIVATE(info->mail_op);
 
@@ -879,13 +880,14 @@ update_account_thread (gpointer thr_user_data)
                 * We use the blocking version, because we are already in a separate 
                 * thread.
                 */
-               tny_folder_refresh (TNY_FOLDER (folder), &(priv->error));
 
                /* If the retrieve type is headers only do nothing more */
                if (!g_ascii_strcasecmp (info->retrieve_type, MODEST_ACCOUNT_RETRIEVE_VALUE_MESSAGES) || 
                    !g_ascii_strcasecmp (info->retrieve_type, MODEST_ACCOUNT_RETRIEVE_VALUE_MESSAGES_AND_ATTACHMENTS)) {
                        TnyIterator *iter;
 
+                       tny_folder_refresh (TNY_FOLDER (folder), &(priv->error));
+
                        iter = tny_list_create_iterator (observer->new_headers);
                        while (!tny_iterator_is_done (iter)) {
                                TnyHeader *header = TNY_HEADER (tny_iterator_get_current (iter));
@@ -902,7 +904,8 @@ update_account_thread (gpointer thr_user_data)
                                tny_iterator_next (iter);
                        }
                        g_object_unref (iter);
-               }
+               } else
+                       tny_folder_poke_status (TNY_FOLDER (folder));
                
                tny_folder_remove_observer (TNY_FOLDER (folder), TNY_FOLDER_OBSERVER (observer));
                g_object_unref (observer);
index 1f5e724..89914a7 100644 (file)
@@ -1,4 +1,6 @@
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
index 091a9dd..533063a 100644 (file)
@@ -4,7 +4,9 @@
 #include <glib.h>
 #include <tny-folder.h>
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>