From 7303a1091352b0745cad4f59ca0ff193c616cf99 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 26 Jul 2007 06:42:47 +0000 Subject: [PATCH] 2007-07-26 Murray Cumming * 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 | 14 ++++++++++++++ src/dbus_api/modest-dbus-callbacks.c | 4 +++- src/modest-mail-operation.c | 10 ++++++++-- src/modest-search.c | 7 ++++++- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ChangeLog2 b/ChangeLog2 index 61c95b6..0ecc1d6 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,3 +1,17 @@ +2007-07-26 Murray Cumming + + * 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 * src/maemo/modest-maemo-utils.h: diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index 6d5f4fe..5a977de 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -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 ? diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 6b6f3f8..9780168 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -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 */ diff --git a/src/modest-search.c b/src/modest-search.c index 94a5c3e..3ed4ed6 100644 --- a/src/modest-search.c +++ b/src/modest-search.c @@ -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); } -- 1.7.9.5