threading - empty subject are ignored
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Tue, 6 Nov 2001 18:27:14 +0000 (18:27 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Tue, 6 Nov 2001 18:27:14 +0000 (18:27 +0000)
ChangeLog.claws
configure.in
src/procmsg.c
src/summaryview.c
src/utils.c
src/utils.h

index 5a534e5..edff71b 100644 (file)
@@ -1,3 +1,11 @@
+2001-11-06 [hoa]       0.6.4claws30
+       
+       * src/procmsg.c
+       * src/summaryview.c
+       * src/utils.c
+       * src/utils.h
+               threading by subject - empty subject are ignored
+
 2001-11-06 [christoph] 0.6.4claws29
 
        * src/socket.c
index 5475634..7683cf1 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws29
+EXTRA_VERSION=claws30
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 6e69c1a..a466ca3 100644 (file)
@@ -496,30 +496,6 @@ FILE *procmsg_open_mark_file(const gchar *folder, gboolean append)
        return fp;
 }
 
-static GNode * subject_table_lookup(GHashTable * subject_table,
-                                   gchar * subject)
-{
-       if (subject == NULL)
-               subject = "";
-
-       if (g_strncasecmp(subject, "Re: ", 4) == 0)
-               return g_hash_table_lookup(subject_table, subject + 4);
-       else
-               return g_hash_table_lookup(subject_table, subject);
-}
-
-static void subject_table_insert(GHashTable * subject_table, gchar * subject,
-                                GNode * node)
-{
-       if (subject == NULL)
-               subject = "";
-
-       if (g_strncasecmp(subject, "Re: ", 4) == 0)
-               g_hash_table_insert(subject_table, subject + 4, node);
-       else
-               g_hash_table_insert(subject_table, subject, node);
-}
-
 /* return the reversed thread tree */
 GNode *procmsg_get_thread_tree(GSList *mlist)
 {
index 8a8b89f..7794f50 100644 (file)
@@ -1817,41 +1817,6 @@ gboolean summary_insert_gnode_func(GtkCTree *ctree, guint depth, GNode *gnode,
        return TRUE;
 }
 
-static GtkCTreeNode * subject_table_lookup(GHashTable *subject_table,
-                                          gchar * subject)
-{
-       if (subject == NULL)
-               subject = "";
-
-       if (g_strncasecmp(subject, "Re: ", 4) == 0)
-               return g_hash_table_lookup(subject_table, subject + 4);
-       else
-               return g_hash_table_lookup(subject_table, subject);
-}
-
-static void subject_table_insert(GHashTable *subject_table, gchar * subject,
-                                GtkCTreeNode * node)
-{
-       if (subject == NULL)
-               subject = "";
-
-       if (g_strncasecmp(subject, "Re: ", 4) == 0)
-               g_hash_table_insert(subject_table, subject + 4, node);
-       else
-               g_hash_table_insert(subject_table, subject, node);
-}
-
-static void subject_table_remove(GHashTable *subject_table, gchar * subject)
-{
-       if (subject == NULL)
-               subject = "";
-
-       if (g_strncasecmp(subject, "Re: ", 4) == 0)
-               g_hash_table_remove(subject_table, subject + 4);
-       else
-               g_hash_table_remove(subject_table, subject);
-}
-
 static void summary_set_ctree_from_list(SummaryView *summaryview,
                                        GSList *mlist)
 {
index d0e5e53..bbfcf0d 100644 (file)
@@ -2223,3 +2223,44 @@ void log_error(const gchar *format, ...)
                fflush(log_fp);
        }
 }
+
+
+void * subject_table_lookup(GHashTable *subject_table, gchar * subject)
+{
+       if (subject == NULL)
+               subject = "";
+
+       if (g_strncasecmp(subject, "Re: ", 4) == 0)
+               return g_hash_table_lookup(subject_table, subject + 4);
+       else
+               return g_hash_table_lookup(subject_table, subject);
+}
+
+void subject_table_insert(GHashTable *subject_table, gchar * subject,
+                         void * data)
+{
+       if (subject == NULL)
+               return;
+       if (* subject == 0)
+               return;
+       if (g_strcasecmp(subject, "Re:") == 0)
+               return;
+       if (g_strcasecmp(subject, "Re: ") == 0)
+               return;
+
+       if (g_strncasecmp(subject, "Re: ", 4) == 0)
+               g_hash_table_insert(subject_table, subject + 4, data);
+       else
+               g_hash_table_insert(subject_table, subject, data);
+}
+
+void subject_table_remove(GHashTable *subject_table, gchar * subject)
+{
+       if (subject == NULL)
+               return;
+
+       if (g_strncasecmp(subject, "Re: ", 4) == 0)
+               g_hash_table_remove(subject_table, subject + 4);
+       else
+               g_hash_table_remove(subject_table, subject);
+}
index a079ac9..172df05 100644 (file)
@@ -310,4 +310,10 @@ void log_message   (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
 void log_warning       (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
 void log_error         (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
 
+/* subject threading */
+void * subject_table_lookup(GHashTable *subject_table, gchar * subject)
+void subject_table_insert(GHashTable *subject_table, gchar * subject,
+                         void * data);
+void subject_table_remove(GHashTable *subject_table, gchar * subject);
+
 #endif /* __UTILS_H__ */