[evolution/wip/webkit2] Bug 762205 - Add UID column into message list



commit 410a54f9426a395e9627ef7b8c15ae34e96fe028
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 19 11:15:20 2016 +0100

    Bug 762205 - Add UID column into message list

 mail/message-list.c      |   13 +++++++++++++
 mail/message-list.etspec |    1 +
 mail/message-list.h      |    2 ++
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/mail/message-list.c b/mail/message-list.c
index 73bbf74..61e8718 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2030,6 +2030,9 @@ ml_tree_value_at_ex (ETreeModel *etm,
                g_hash_table_destroy (ld.labels_tag2iter);
                return (gpointer) g_string_free (result, FALSE);
        }
+       case COL_UID: {
+               return (gpointer) camel_pstring_strdup (camel_message_info_uid (msg_info));
+       }
        default:
                g_warning ("%s: This shouldn't be reached (col:%d)", G_STRFUNC, col);
                return NULL;
@@ -3195,6 +3198,9 @@ message_list_duplicate_value (ETreeModel *tree_model,
                case COL_FOLLOWUP_FLAG_STATUS:
                        return (gpointer) value;
 
+               case COL_UID:
+                       return (gpointer) camel_pstring_strdup (value);
+
                case COL_FROM:
                case COL_SUBJECT:
                case COL_TO:
@@ -3254,6 +3260,10 @@ message_list_free_value (ETreeModel *tree_model,
                case COL_ITALIC:
                        break;
 
+               case COL_UID:
+                       camel_pstring_free (value);
+                       break;
+
                case COL_LOCATION:
                case COL_SENDER:
                case COL_RECIPIENTS:
@@ -3294,6 +3304,7 @@ message_list_initialize_value (ETreeModel *tree_model,
                case COL_FOLLOWUP_FLAG:
                case COL_FOLLOWUP_FLAG_STATUS:
                case COL_FOLLOWUP_DUE_BY:
+               case COL_UID:
                        return NULL;
 
                case COL_LOCATION:
@@ -3341,6 +3352,7 @@ message_list_value_is_empty (ETreeModel *tree_model,
                case COL_MIXED_SENDER:
                case COL_MIXED_RECIPIENTS:
                case COL_LABELS:
+               case COL_UID:
                        return !(value && *(gchar *) value);
 
                default:
@@ -3397,6 +3409,7 @@ message_list_value_to_string (ETreeModel *tree_model,
                case COL_MIXED_SENDER:
                case COL_MIXED_RECIPIENTS:
                case COL_LABELS:
+               case COL_UID:
                        return g_strdup (value);
 
                default:
diff --git a/mail/message-list.etspec b/mail/message-list.etspec
index efbf8c4..1717c81 100644
--- a/mail/message-list.etspec
+++ b/mail/message-list.etspec
@@ -34,6 +34,7 @@
   <ETableColumn model_col="18"  _title="Labels" expansion="1.0" minimum_width="32" resizable="true" 
cell="render_text" compare="stringcase" search="string" priority="10"/>
 
   <ETableColumn model_col="19" compare_col="21" _title="Subject - Trimmed" expansion="1.6" 
minimum_width="32" resizable="true" cell="render_tree" compare="stringcase" search="string"/>
+  <ETableColumn model_col="23" _title="UID" expansion="0.0" minimum_width="32" resizable="true" 
cell="render_text" compare="string" search="string"/>
 
   <ETableState>
     <column source="0"/> <column source="3"/> <column source="1"/>
diff --git a/mail/message-list.h b/mail/message-list.h
index bf03712..bf3e3d4 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -78,6 +78,8 @@ enum {
        COL_SUBJECT_NORM,
        COL_TO_NORM,
 
+       COL_UID,
+
        COL_LAST,
 
        /* Invisible columns */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]