made search for accounts by email address not case sensitive
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 26 Oct 2001 19:39:20 +0000 (19:39 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 26 Oct 2001 19:39:20 +0000 (19:39 +0000)
fixed memory leak in folder_item_get_identifier
fixed wrong strstr2 (should work like strstr)

ChangeLog.claws
configure.in
src/account.c
src/folder.c
src/gtkspell.c
src/utils.c

index 965940238c4ab40d91ae2736ecdf947a331f53ba..3b0d0b5da3608b691ce10238feccdc85a35a250e 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-26 [christoph] 0.6.4claws10
+
+       * src/account.c
+               made search for accounts by email address not case
+               sensitive
+       * src/folder.c
+               fixed memory leak in folder_item_get_identifier
+       * src/gtkspell.c
+       * src/utils.c
+               fixed wrong strstr2 (should work like strstr)
+
 2001-10-26 [darko]     0.6.4claws9
 
        * src/compose.c src/gtkstext.[ch]
index 6cd84326c0a7ce3ad0d63afcffafeb6b07acd3fa..0785f4f4a30d966825dcae0ebf39491417bf420a 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws9
+EXTRA_VERSION=claws10
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 2c6c673bc81c789937f18db7babd0aa00aff3736..79341794d50add6ce1f1eaf9e8d19a673c8a5deb 100644 (file)
@@ -196,7 +196,7 @@ PrefsAccount *account_find_from_address(const gchar *address)
 
        for (cur = account_list; cur != NULL; cur = cur->next) {
                ac = (PrefsAccount *)cur->data;
-               if (ac->protocol != A_NNTP && !strstr2(address, ac->address))
+               if (ac->protocol != A_NNTP && strcasestr(address, ac->address))
                        return ac;
        }
 
index 993de0e7e0e2bed7e0eb7d2873f247a7f3176b78..42cb5c6a964fe2ebab470b3887f7667b416ff0b6 100644 (file)
@@ -1424,18 +1424,14 @@ static gchar * folder_item_get_tree_identifier(FolderItem * item)
 
 gchar * folder_item_get_identifier(FolderItem * item)
 {
-       gchar * path;
        gchar * id;
        gchar * folder_str;
 
-       folder_str = folder_get_identifier(item->folder);
-
-       if (item->path == NULL) {
-               g_free(folder_str);
-               return NULL;
-       }
+       g_return_if_fail(item->path != NULL);
 
+       folder_str = folder_get_identifier(item->folder);
        id = g_strconcat(folder_str, "/", item->path, NULL);
+       g_free(folder_str);
 
        return id;
 }
index 4435751332f6a212a0d253478979f086dc359179..9d5594caace719cbf5800885c6f51aff9a0d9af8 100644 (file)
@@ -1418,8 +1418,8 @@ gchar *gtkpspell_get_dictionary_menu_active_item(GtkWidget *menu)
 guchar *convert_to_pspell_encoding (const guchar *encoding)
 {
        guchar * pspell_encoding;
-       /* Beware, strstr2 returns 0 if string is found -1 if not */
-       if (!strstr2(encoding, "ISO-8859-")) {
+
+       if (strstr2(encoding, "ISO-8859-")) {
                pspell_encoding = g_strdup_printf("iso8859%s", encoding+8);
        }
        else
index 00363528daf8b56e4b69ed7f51fbbabdb7e053c2..c197163f38bd4bc7636b026c3b6a0d2d252c0a13 100644 (file)
@@ -158,15 +158,12 @@ gint strcmp2(const gchar *s1, const gchar *s2)
                return strcmp(s1, s2);
 }
 /* strstr with NULL-checking */
-gint strstr2(const gchar *s1, const gchar *s2)
+gchar *strstr2(const gchar *s1, const gchar *s2)
 {
        if (s1 == NULL || s2 == NULL)
-               return -1;
+               return NULL;
        else
-               if( strstr(s1, s2) !=NULL) 
-                return 0;
-                else 
-                return -1;
+               return strstr(s1, s2);
 }
 /* compare paths */
 gint path_cmp(const gchar *s1, const gchar *s2)