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 5a534e556aed0b581d3b79bc545cbce7113e62b4..edff71b865e2be3d226d6e0bfde253d9e7c9f950 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 54756341644f8ed417d9fccbba1c8be40b4c4945..7683cf1d41e569a42b97d1beae6133317f293dcc 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 6e69c1a28948ac75bcaf1b833b7553bb7652a40c..a466ca35f724554ce984d4e9a3d458f699e3abc0 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 8a8b89fa583cf893eb35a5c8b03c4d71b27d5cd3..7794f50b833b9cbb17d3df7cc9f5c7e15074a752 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 d0e5e536eeb0a2508ac4899b36d905f0b08d6d0d..bbfcf0dad0cd0c3b86aec92ad753d3631b975c5d 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 a079ac9e7d83ad0a50e72934dbdf69f80c9cbd1c..172df058de4b9de143d80db3c8dcb447a0eb9bdc 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__ */