evolution r35747 - in trunk: mail plugins/itip-formatter
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35747 - in trunk: mail plugins/itip-formatter
- Date: Wed, 16 Jul 2008 11:41:04 +0000 (UTC)
Author: psankar
Date: Wed Jul 16 11:41:04 2008
New Revision: 35747
URL: http://svn.gnome.org/viewvc/evolution?rev=35747&view=rev
Log:
Pushing changes from the madagascar branch related to the on-disk
summary work.
Modified:
trunk/mail/ChangeLog
trunk/mail/em-folder-browser.c
trunk/mail/em-folder-view.c
trunk/mail/mail-ops.c
trunk/mail/message-list.c
trunk/plugins/itip-formatter/ChangeLog
trunk/plugins/itip-formatter/itip-formatter.c
Modified: trunk/mail/em-folder-browser.c
==============================================================================
--- trunk/mail/em-folder-browser.c (original)
+++ trunk/mail/em-folder-browser.c Wed Jul 16 11:41:04 2008
@@ -873,11 +873,15 @@
view_sexp = " ";
break;
+ /* README: All the sexp below are not rocket science but it is not straightforward as well.
+ I believe it is better to document the assumptions and the conventions followed for the sexp,
+ before I forget so that no one else again needs to read through the code -- Sankar */
+
case VIEW_UNREAD_MESSAGES:
- view_sexp = "(match-all (not (system-flag \"Seen\")))";
+ view_sexp = "(match-all (system-flag \"Seen\"))";
break;
case VIEW_READ_MESSAGES:
- view_sexp = "(match-all (system-flag \"Seen\"))";
+ view_sexp = "(match-all (system-flag \"Seen\" \"set\"))";
break;
case VIEW_RECENT_MESSAGES:
if (!em_utils_folder_is_sent (folder, folder_uri))
@@ -892,10 +896,10 @@
view_sexp = " (match-all (> (get-sent-date) (- (get-current-date) 432000)))";
break;
case VIEW_WITH_ATTACHMENTS:
- view_sexp = "(match-all (system-flag \"Attachments\"))";
+ view_sexp = "(match-all (system-flag \"Attachments\" \"set\"))";
break;
case VIEW_NOT_JUNK:
- view_sexp = "(match-all (not (system-flag \"junk\")))";
+ view_sexp = "(match-all (system-flag \"junk\"))";
break;
case VIEW_NO_LABEL: {
GSList *l;
@@ -911,6 +915,8 @@
tag += 6;
g_string_append_printf (s, " (match-all (not (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\"))))", tag, tag, tag);
+ /* FIXME: I dont see a way of mapping this kind of sexp into sql atm. I guess this option could be kicked out */
+ /* May be we should copy what I did for system flags -- Sankar */
}
}
@@ -921,11 +927,11 @@
} break;
case VIEW_LABEL:
tag = (char *)g_object_get_data (G_OBJECT (menu_item), "LabelTag");
- view_sexp = g_strdup_printf ("(match-all (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\")))", tag, tag, tag);
+ view_sexp = g_strdup_printf ("(match-all (and (and (user-tag \"label\" \"%s\")) (or (user-flag \"$Label%s\")) (or (user-flag \"%s\"))))", tag, tag, tag);
duplicate = FALSE;
break;
case VIEW_MESSAGES_MARKED_AS_IMPORTANT:
- view_sexp = "(match-all (system-flag \"Flagged\"))";
+ view_sexp = "(match-all (system-flag \"Flagged\" \"set\"))";
break;
case VIEW_ANY_FIELD_CONTAINS:
break;
Modified: trunk/mail/em-folder-view.c
==============================================================================
--- trunk/mail/em-folder-view.c (original)
+++ trunk/mail/em-folder-view.c Wed Jul 16 11:41:04 2008
@@ -2172,7 +2172,7 @@
return;
{
- if (emfv->menu) {
+ if (emfv->menu && emfv->folder) {
EMMenuTargetSelect *t;
t = em_menu_target_new_select(emfv->menu, emfv->folder, emfv->folder_uri, message_list_get_selected(emfv->list));
Modified: trunk/mail/mail-ops.c
==============================================================================
--- trunk/mail/mail-ops.c (original)
+++ trunk/mail/mail-ops.c Wed Jul 16 11:41:04 2008
@@ -1620,9 +1620,9 @@
static void
refresh_folder_exec (struct _sync_folder_msg *m)
{
- camel_folder_sync (m->folder, FALSE, &m->base.ex);
+ //camel_folder_sync (m->folder, FALSE, &m->base.ex);
- if (!camel_exception_is_set (&m->base.ex))
+ //if (!camel_exception_is_set (&m->base.ex))
camel_folder_refresh_info(m->folder, &m->base.ex);
}
Modified: trunk/mail/message-list.c
==============================================================================
--- trunk/mail/message-list.c (original)
+++ trunk/mail/message-list.c Wed Jul 16 11:41:04 2008
@@ -40,6 +40,7 @@
#include <camel/camel-file-utils.h>
#include <camel/camel-folder.h>
#include <camel/camel-folder-thread.h>
+#include <camel/camel-folder-summary.h>
#include <camel/camel-vee-folder.h>
#include <libedataserver/e-memory.h>
@@ -4062,6 +4063,7 @@
e_profile_event_emit("list.threaduids", m->folder->full_name, 0);
+ //camel_folder_summary_reload_from_db (m->folder->summary, NULL);
if (!camel_operation_cancel_check(m->base.cancel)) {
/* update/build a new tree */
if (m->dotree) {
@@ -4071,6 +4073,10 @@
m->tree = camel_folder_thread_messages_new (m->folder, showuids, m->thread_subject);
} else {
m->summary = g_ptr_array_new ();
+ if (showuids->len != camel_folder_summary_cache_size (m->folder->summary) ) {
+ CamelException ex;
+ camel_folder_summary_reload_from_db (m->folder->summary, &ex);
+ }
for (i = 0; i < showuids->len; i++) {
info = camel_folder_get_message_info (m->folder, showuids->pdata[i]);
if (info)
Modified: trunk/plugins/itip-formatter/itip-formatter.c
==============================================================================
--- trunk/plugins/itip-formatter/itip-formatter.c (original)
+++ trunk/plugins/itip-formatter/itip-formatter.c Wed Jul 16 11:41:04 2008
@@ -1741,7 +1741,7 @@
}
camel_message_info_free (mi);
}
- camel_folder_summary_array_free (pitip->folder->summary, summary_array);
+ camel_folder_free_summary (pitip->folder, summary_array);
}
} else {
/* Either not a recurring appointment or "apply-to-all" is not selected. So just delete this instance alone */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]