2007-07-26 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Thu, 26 Jul 2007 06:42:47 +0000 (06:42 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Thu, 26 Jul 2007 06:42:47 +0000 (06:42 +0000)
* src/dbus_api/modest-dbus-callbacks.c: (modest_dbus_req_filter):
        printf more details when we get unhandled D-Bus methods, because
        it is interesting.

        * src/modest-mail-operation.c: (update_account_thread):
        Comment out the tny_camel_pop_store_account_reconnect(), because this
        is apparently no longer needed, and it did not work before anyway.
        See the comment in the code.

        * src/modest-search.c: (modest_search_folder): Ignore deleted emails,
        by checking the header flags.

pmo-trunk-r2796

ChangeLog2
src/dbus_api/modest-dbus-callbacks.c
src/modest-mail-operation.c
src/modest-search.c

index 61c95b6..0ecc1d6 100644 (file)
@@ -1,3 +1,17 @@
+2007-07-26  Murray Cumming  <murrayc@murrayc.com>
+
+       * src/dbus_api/modest-dbus-callbacks.c: (modest_dbus_req_filter):
+       printf more details when we get unhandled D-Bus methods, because 
+       it is interesting.
+
+       * src/modest-mail-operation.c: (update_account_thread):
+       Comment out the tny_camel_pop_store_account_reconnect(), because this 
+       is apparently no longer needed, and it did not work before anyway. 
+       See the comment in the code.
+
+       * src/modest-search.c: (modest_search_folder): Ignore deleted emails, 
+       by checking the header flags.
+
 2007-07-25  Murray Cumming  <murrayc@murrayc.com>
 
        * src/maemo/modest-maemo-utils.h: 
index 6d5f4fe..5a977de 100644 (file)
@@ -1408,7 +1408,9 @@ modest_dbus_req_filter (DBusConnection *con,
                handled = TRUE;                         
        }
        else {
-               g_debug ("  debug: %s: Unexpected D-Bus method\n", __FUNCTION__);
+               g_debug ("  debug: %s: Unexpected D-Bus method: Interface=%s, Member=%s\n", 
+                       __FUNCTION__, dbus_message_get_interface (message),
+                       dbus_message_get_member(message));
        }
        
        return (handled ? 
index 6b6f3f8..9780168 100644 (file)
@@ -1159,11 +1159,17 @@ update_account_thread (gpointer thr_user_data)
        priv->account = g_object_ref (info->account);
 
        /*
-        * for POP3, we do a logout-login upon send/receive -- many POP-servers (like Gmail) do not
-        * show any updates unless we do that
+        * Previousl, we did this for POP3, to do a logout-login upon send/receive, 
+        * because many POP-servers (like Gmail) do not
+        * show any updates unless we do that.
+        * But that didn't work with gmail anyway, 
+        * and tinymail now takes care of this itself by disconnecting 
+        * automatically after using the connection.
         */
+       /*
        if (!first_time && TNY_IS_CAMEL_POP_STORE_ACCOUNT (priv->account)) 
                tny_camel_pop_store_account_reconnect (TNY_CAMEL_POP_STORE_ACCOUNT(priv->account));
+       */
 
        /* Get all the folders. We can do it synchronously because
           we're already running in a different thread than the UI */
index 94a5c3e..3ed4ed6 100644 (file)
@@ -420,9 +420,13 @@ modest_search_folder (TnyFolder *folder, ModestSearch *search)
 
        while (!tny_iterator_is_done (iter)) {
                TnyHeader *cur = (TnyHeader *) tny_iterator_get_current (iter);
-               time_t t = tny_header_get_date_sent (cur);
+               const time_t t = tny_header_get_date_sent (cur);
                gboolean found = FALSE;
                
+               /* Ignore deleted (not yet expunged) emails: */
+               if (tny_header_get_flags(cur) & TNY_HEADER_FLAG_DELETED)
+                       goto go_next;
+                       
                if (search->flags & MODEST_SEARCH_BEFORE)
                        if (!(t <= search->before))
                                goto go_next;
@@ -488,6 +492,7 @@ modest_search_folder (TnyFolder *folder, ModestSearch *search)
                                        retval = add_hit (retval, cur, folder);
                                }
                        }
+                       
                        if (msg)
                                g_object_unref (msg);
                }