Addressbook folder selection dialogs: make sure folder list is
authorwwp <subscript@free.fr>
Sun, 10 Nov 2019 23:14:55 +0000 (00:14 +0100)
committerwwp <subscript@free.fr>
Sun, 10 Nov 2019 23:14:55 +0000 (00:14 +0100)
sorted and apply global prefs to get stripes in lists.

src/addressadd.c
src/addressbook_foldersel.c

index f2b985c..6d1c682 100644 (file)
@@ -267,6 +267,8 @@ static void addressadd_create( void ) {
 
        tree_folder = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
        g_object_unref(store);
+       gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), ADDRADD_COL_NAME, GTK_SORT_ASCENDING);
+       gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree_folder), prefs_common.use_stripes_everywhere);
        gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_folder), TRUE);
        gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(tree_folder), FALSE);
        gtk_tree_view_set_search_column(GTK_TREE_VIEW(tree_folder),
index cb8cc54..7228b79 100644 (file)
@@ -184,6 +184,8 @@ static void addressbook_foldersel_create( void )
                        GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
 
        view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+       gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), COL_NAME, GTK_SORT_ASCENDING);
+       gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view), prefs_common.use_stripes_everywhere);
        gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE);
        gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(view), FALSE);
        gtk_tree_view_set_search_column(GTK_TREE_VIEW(view), COL_NAME);