Commit b5ad1977 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

preparation for surgery ditto

Wed Oct  3 20:29:29 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.[ch]: preparation for surgery
        * tests/testtreesort.c: ditto
parent eacd03ae
This diff is collapsed.
......@@ -59,6 +59,11 @@ struct _GtkTreeModelSort
guint has_child_toggled_id;
guint deleted_id;
guint reordered_id;
/* default sort */
GtkTreeIterCompareFunc default_sort_func;
gpointer default_sort_data;
GtkDestroyNotify default_sort_destroy;
};
struct _GtkTreeModelSortClass
......
#include <gtk/gtk.h>
#include "../gtk/gtktreedatalist.h"
typedef struct _ListSort ListSort;
struct _ListSort
......@@ -151,11 +153,11 @@ main (int argc, char *argv[])
gtk_tree_view_column_set_sort_column_id (column, WORD_COLUMN_4);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
/*
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (smodel),
WORD_COLUMN_1,
GTK_SORT_ASCENDING);
*/
gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view);
gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
gtk_widget_show_all (window);
......@@ -217,9 +219,14 @@ main (int argc, char *argv[])
gtk_tree_view_column_set_sort_column_id (column, WORD_COLUMN_4);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view2), column);
gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE (smodel),
(GtkTreeIterCompareFunc)gtk_tree_data_list_compare_func,
NULL, NULL);
/*
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (smodel),
WORD_COLUMN_1,
GTK_SORT_DESCENDING);
*/
gtk_container_add (GTK_CONTAINER (scrolled_window2), tree_view2);
gtk_window_set_default_size (GTK_WINDOW (window2), 400, 400);
......@@ -282,11 +289,11 @@ main (int argc, char *argv[])
NULL);
gtk_tree_view_column_set_sort_column_id (column, WORD_COLUMN_4);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view3), column);
/*
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (ssmodel),
WORD_COLUMN_1,
GTK_SORT_DESCENDING);
GTK_SORT_ASCENDING);
*/
gtk_container_add (GTK_CONTAINER (scrolled_window3), tree_view3);
gtk_window_set_default_size (GTK_WINDOW (window3), 400, 400);
gtk_widget_show_all (window3);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment