2007-12-06 [colin] 3.1.0cvs62
[claws.git] / src / plugins / dillo_viewer / dillo_prefs.c
index d3d3633c5205284894e92925377009129ec25d64..3763ae169bdb8e46de0771901e304ea64e87c904 100644 (file)
@@ -80,13 +80,15 @@ static void save_dillo_prefs                (PrefsPage *page);
 static void dillo_whitelist_ab_select_cb(GtkWidget *widget, gpointer data)
 {
        DilloBrowserPage *page = (DilloBrowserPage *) data;
-       gchar *folderpath = NULL;
-       gboolean ret = FALSE;
-
-       folderpath = (gchar *) gtk_entry_get_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child));
-       ret = addressbook_folder_selection(&folderpath);
-       if ( ret != FALSE && folderpath != NULL)
-               gtk_entry_set_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child), folderpath);
+       const gchar *folderpath = NULL;
+       gchar *new_path = NULL;
+
+       folderpath = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child));
+       new_path = addressbook_folder_selection(folderpath);
+       if (new_path) {
+               gtk_entry_set_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child), new_path);
+               g_free(new_path);
+       } 
 }
 
 static void local_checkbox_toggled(GtkToggleButton *button,