[Xfce4-commits] <postler:master> Index mailing list names

Christian Dywan noreply at xfce.org
Sat Jun 4 14:30:03 CEST 2011


Updating branch refs/heads/master
         to 0b4ac5bfbcfa1045bf4921dfcde80593825c17cc (commit)
       from 0632d13cb32fdd26acc48180bba68bdf1e995803 (commit)

commit 0b4ac5bfbcfa1045bf4921dfcde80593825c17cc
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon May 30 21:08:00 2011 +0200

    Index mailing list names

 postler/postler-index.vala   |    7 ++++---
 postler/postler-message.vala |    5 +++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/postler/postler-index.vala b/postler/postler-index.vala
index ce987ae..99531c2 100644
--- a/postler/postler-index.vala
+++ b/postler/postler-index.vala
@@ -43,7 +43,7 @@ namespace Postler {
             if (database.exec (
                 """
                 CREATE TABLE IF NOT EXISTS
-                messages (id TEXT, uri TEXT, threads TEXT, project TEXT,
+                messages (id TEXT, uri TEXT, threads TEXT, project TEXT, list TEXT,
                           subject TEXT, sender TEXT, recipients TEXT,
                           unread BOOLEAN, flagged BOOLEAN,
                           forwarded BOOLEAN, replied BOOLEAN, priority BOOLEAN,
@@ -59,8 +59,8 @@ namespace Postler {
                     INSERT INTO messages
                     (uri, subject, sender, recipients,
                      unread, flagged, forwarded, replied, priority,
-                     date, id, timestamp, threads, project)
-                    VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14)
+                     date, id, timestamp, threads, project, list)
+                    VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15)
                     """,
                     -1, out statement_insert) != Sqlite.OK)
                     throw new GLib.FileError.FAILED (_("Failed to index message: %s"), database.errmsg ());
@@ -80,6 +80,7 @@ namespace Postler {
              && statement_insert.bind_int64 (12, startup_timestamp) == Sqlite.OK
              && statement_insert.bind_text (13, message.threads, -1) == Sqlite.OK
              && statement_insert.bind_text (14, message.project, -1) == Sqlite.OK
+             && statement_insert.bind_text (15, message.list, -1) == Sqlite.OK
              && statement_insert.step () == Sqlite.DONE;
             statement_insert.reset ();
             if (!success)
diff --git a/postler/postler-message.vala b/postler/postler-message.vala
index db6ac11..579ef90 100644
--- a/postler/postler-message.vala
+++ b/postler/postler-message.vala
@@ -40,6 +40,7 @@ namespace Postler {
         public string organization { public get; set; }
         public string application { public get; set; }
         public string project { public get; set; }
+        public string list { public get; set; }
         GLib.HashTable<string,string> fields = new GLib.HashTable<string,string> (str_hash, str_equal);
         public string get_field (string field) { return fields.lookup (field); }
         GLib.DataInputStream? stream = null;
@@ -218,6 +219,10 @@ namespace Postler {
                     else if (!semicolon)
                         project = stripped;
                 }
+                else if (field == "list-id") {
+                    string field_charset = null;
+                    list = parse_encoded (parts[1], out field_charset);
+                }
                 else if (field == "reply-to") {
                     string field_charset = null;
                     reply_to = parse_encoded (parts[1], out field_charset);



More information about the Xfce4-commits mailing list