2006-04-06 [mones] 2.1.0cvs7
[claws.git] / src / common / mgutils.c
index 9094adf660d70e9f08ea4c0d792fdc6d8aa6a6ff..30226833b9e4927fbf7d098a936b637c21b42fab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2001-2003 Match Grun
+ * Copyright (C) 2001-2006 Match Grun and the Sylpheed-Claws team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 /*
@@ -115,7 +115,7 @@ gchar *mgu_list_coalesce( GSList *list ) {
 * Replace existing string with new string.
 */
 gchar *mgu_replace_string( gchar *str, const gchar *value ) {
-       if( str ) g_free( str );
+       g_free( str );
        if( value ) {
                str = g_strdup( value );
                g_strstrip( str );
@@ -377,7 +377,7 @@ gboolean mgu_slist_test_unq_nc( GSList *list, gchar *str ) {
                if( strlen( str ) > 0 ) {
                        node = list;
                        while( node ) {
-                               if( g_strcasecmp( str, node->data ) == 0 )
+                               if( g_utf8_collate( str, node->data ) == 0 )
                                        return FALSE;
                                node = g_slist_next( node );
                        }
@@ -401,7 +401,7 @@ gboolean mgu_list_test_unq_nc( GList *list, gchar *str ) {
                if( strlen( str ) > 0 ) {
                        node = list;
                        while( node ) {
-                               if( g_strcasecmp( str, node->data ) == 0 )
+                               if( g_utf8_collate( str, node->data ) == 0 )
                                        return FALSE;
                                node = g_list_next( node );
                        }