2008-05-12 [wwp] 3.4.0cvs30
[claws.git] / src / addressbook_foldersel.c
index e365e0adc75c2d9ccf76cb823e6b7fe4eb75d71f..76b22a10da69bf7c4097cd431b5e599bb8f47d39 100644 (file)
@@ -292,7 +292,8 @@ static void addressbook_foldersel_load_folder( GtkCTreeNode *parentNode, ItemFol
        }
 }
 
-static void addressbook_foldersel_load_data( AddressIndex *addrIndex, gchar *path, FolderPathMatch* match )
+static void addressbook_foldersel_load_data( AddressIndex *addrIndex, 
+                                            FolderPathMatch* match )
 {
        AddressDataSource *ds;
        GList *list, *nodeDS;
@@ -367,7 +368,8 @@ static void addressbook_foldersel_load_data( AddressIndex *addrIndex, gchar *pat
 }
 
 gboolean addressbook_foldersel_selection( AddressIndex *addrIndex,
-                                       AddressBookFile **book, ItemFolder **folder, gchar* path)
+                                       AddressBookFile **book, ItemFolder **folder, 
+                                       const gchar* path)
 {
        FolderPathMatch folder_path_match = { NULL, FALSE, 0, NULL };
        gboolean retVal = FALSE;
@@ -386,14 +388,15 @@ gboolean addressbook_foldersel_selection( AddressIndex *addrIndex,
        corresponds to what we received */
 
        if ( path != NULL ) {
-               if ( strcasecmp(path, _("Any")) == 0 || *path == '\0' )
-                       /* consider "Any" and "" as valid addressbook root */
+               if ( g_utf8_collate(path, _("Any")) == 0 || strcasecmp(path, "Any") || *path == '\0' )
+                       /* consider "Any" (both translated or untranslated forms) and ""
+                          as valid addressbook roots */
                        folder_path_match.matched = TRUE;
                else
                        folder_path_match.folder_path = g_strsplit( path, "/", 256 );
        }
 
-       addressbook_foldersel_load_data( addrIndex, path, &folder_path_match );
+       addressbook_foldersel_load_data( addrIndex, &folder_path_match );
 
        if ( folder_path_match.folder_path != NULL && folder_path_match.matched == FALSE)
                g_warning("addressbook_foldersel_load_data: couldn't match book/folder path '%s'\n", path);