Commit 7cfc56db authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

use GtkSortType instead of GtkTreeSortOrder. (#59173).

Thu Aug 23 20:01:41 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
        gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
        gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
        (#59173).
parent 0b5311f5
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
Thu Aug 23 20:01:41 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
(#59173).
Thu Aug 23 16:26:47 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize):
......
......@@ -95,10 +95,10 @@ static void gtk_list_store_sort_iter_changed (GtkListStore *list_
gint column);
static gboolean gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order);
GtkSortType *order);
static void gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order);
GtkSortType order);
static void gtk_list_store_set_sort_func (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeIterCompareFunc func,
......@@ -1391,7 +1391,7 @@ gtk_list_store_compare_func (gconstpointer a,
&iter_a, &iter_b,
header->data);
if (list_store->order == GTK_TREE_SORT_DESCENDING)
if (list_store->order == GTK_SORT_DESCENDING)
{
if (retval > 0)
retval = -1;
......@@ -1530,7 +1530,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
}
if (list_store->order == GTK_TREE_SORT_DESCENDING)
if (list_store->order == GTK_SORT_DESCENDING)
{
if (cmp_a < 0)
cmp_a = 1;
......@@ -1567,7 +1567,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
list = G_SLIST (list_store->root);
new_location = 0;
tmp_iter.user_data = list;
if (list_store->order == GTK_TREE_SORT_DESCENDING)
if (list_store->order == GTK_SORT_DESCENDING)
cmp_a = (* header->func) (GTK_TREE_MODEL (list_store),
&tmp_iter, iter, header->data);
else
......@@ -1580,7 +1580,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
list = list->next;
new_location++;
tmp_iter.user_data = list;
if (list_store->order == GTK_TREE_SORT_DESCENDING)
if (list_store->order == GTK_SORT_DESCENDING)
cmp_a = (* header->func) (GTK_TREE_MODEL (list_store),
&tmp_iter, iter, header->data);
else
......@@ -1645,7 +1645,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
static gboolean
gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order)
GtkSortType *order)
{
GtkListStore *list_store = (GtkListStore *) sortable;
......@@ -1664,7 +1664,7 @@ gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable,
static void
gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order)
GtkSortType order)
{
GtkListStore *list_store = (GtkListStore *) sortable;
GList *list;
......
......@@ -48,7 +48,7 @@ struct _GtkListStore
GList *sort_list;
gint n_columns;
gint sort_column_id;
GtkTreeSortOrder order;
GtkSortType order;
GType *column_headers;
gint length;
};
......
......@@ -112,10 +112,10 @@ static void gtk_tree_model_sort_unref_node (GtkTreeModel *
/* sortable */
static gboolean gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order);
GtkSortType *order);
static void gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order);
GtkSortType order);
static void gtk_tree_model_sort_set_sort_func (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeIterCompareFunc func,
......@@ -913,7 +913,7 @@ gtk_tree_model_sort_unref_node (GtkTreeModel *tree_model,
static gboolean
gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order)
GtkSortType *order)
{
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) sortable;
......@@ -933,7 +933,7 @@ gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable,
static void
gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order)
GtkSortType order)
{
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) sortable;
GList *list;
......
......@@ -53,7 +53,7 @@ struct _GtkTreeModelSort
/* sort information */
GList *sort_list;
gint sort_column_id;
GtkTreeSortOrder order;
GtkSortType order;
/* signal ids */
guint changed_id;
......
......@@ -79,7 +79,7 @@ gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable)
gboolean
gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order)
GtkSortType *order)
{
GtkTreeSortableIface *iface;
......@@ -96,7 +96,7 @@ gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable,
void
gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order)
GtkSortType order)
{
GtkTreeSortableIface *iface;
......
......@@ -26,12 +26,6 @@
extern "C" {
#endif /* __cplusplus */
typedef enum
{
GTK_TREE_SORT_ASCENDING,
GTK_TREE_SORT_DESCENDING
} GtkTreeSortOrder;
#define GTK_TYPE_TREE_SORTABLE (gtk_tree_sortable_get_type ())
#define GTK_TREE_SORTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_SORTABLE, GtkTreeSortable))
#define GTK_TREE_SORTABLE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GTK_TYPE_TREE_SORTABLE, GtkTreeSortableIface))
......@@ -58,10 +52,10 @@ struct _GtkTreeSortableIface
/* virtual table */
gboolean (* get_sort_column_id) (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order);
GtkSortType *order);
void (* set_sort_column_id) (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order);
GtkSortType order);
void (* set_sort_func) (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeIterCompareFunc func,
......@@ -75,10 +69,10 @@ GType gtk_tree_sortable_get_type (void) G_GNUC_CONST;
void gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable);
gboolean gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order);
GtkSortType *order);
void gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order);
GtkSortType order);
void gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeIterCompareFunc func,
......
......@@ -94,10 +94,10 @@ static void gtk_tree_store_sort_iter_changed (GtkTreeStore *
gint column);
static gboolean gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order);
GtkSortType *order);
static void gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order);
GtkSortType order);
static void gtk_tree_store_set_sort_func (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeIterCompareFunc func,
......@@ -1490,7 +1490,7 @@ gtk_tree_store_compare_func (gconstpointer a,
&iter_a, &iter_b,
header->data);
if (tree_store->order == GTK_TREE_SORT_DESCENDING)
if (tree_store->order == GTK_SORT_DESCENDING)
{
if (retval > 0)
retval = -1;
......@@ -1653,7 +1653,7 @@ gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store,
}
if (tree_store->order == GTK_TREE_SORT_DESCENDING)
if (tree_store->order == GTK_SORT_DESCENDING)
{
if (cmp_a < 0)
cmp_a = 1;
......@@ -1692,7 +1692,7 @@ gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store,
node = node->parent->children;
new_location = 0;
tmp_iter.user_data = node;
if (tree_store->order == GTK_TREE_SORT_DESCENDING)
if (tree_store->order == GTK_SORT_DESCENDING)
cmp_a = (* header->func) (GTK_TREE_MODEL (tree_store),
&tmp_iter, iter, header->data);
else
......@@ -1705,7 +1705,7 @@ gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store,
node = node->next;
new_location++;
tmp_iter.user_data = node;
if (tree_store->order == GTK_TREE_SORT_DESCENDING)
if (tree_store->order == GTK_SORT_DESCENDING)
cmp_a = (* header->func) (GTK_TREE_MODEL (tree_store),
&tmp_iter, iter, header->data);
else
......@@ -1774,7 +1774,7 @@ gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store,
static gboolean
gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable,
gint *sort_column_id,
GtkTreeSortOrder *order)
GtkSortType *order)
{
GtkTreeStore *tree_store = (GtkTreeStore *) sortable;
......@@ -1794,7 +1794,7 @@ gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable,
static void
gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
GtkTreeSortOrder order)
GtkSortType order)
{
GtkTreeStore *tree_store = (GtkTreeStore *) sortable;
GList *list;
......
......@@ -48,7 +48,7 @@ struct _GtkTreeStore
gint n_columns;
gint sort_column_id;
GList *sort_list;
GtkTreeSortOrder order;
GtkSortType order;
GType *column_headers;
};
......
......@@ -268,8 +268,8 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
g_param_spec_enum ("sort_order",
_("Sort order"),
_("Sort direction the sort indicator should indicate"),
GTK_TYPE_TREE_SORT_ORDER,
GTK_TREE_SORT_ASCENDING,
GTK_TYPE_SORT_TYPE,
GTK_SORT_ASCENDING,
G_PARAM_READABLE | G_PARAM_WRITABLE));
}
......@@ -287,7 +287,7 @@ gtk_tree_view_column_init (GtkTreeViewColumn *tree_column)
tree_column->visible = TRUE;
tree_column->clickable = FALSE;
tree_column->dirty = TRUE;
tree_column->sort_order = GTK_TREE_SORT_ASCENDING;
tree_column->sort_order = GTK_SORT_ASCENDING;
tree_column->show_sort_indicator = FALSE;
tree_column->property_changed_signal = 0;
tree_column->sort_clicked_signal = 0;
......@@ -599,13 +599,13 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
switch (tree_column->sort_order)
{
case GTK_TREE_SORT_ASCENDING:
case GTK_SORT_ASCENDING:
gtk_arrow_set (GTK_ARROW (arrow),
GTK_ARROW_DOWN,
GTK_SHADOW_IN);
break;
case GTK_TREE_SORT_DESCENDING:
case GTK_SORT_DESCENDING:
gtk_arrow_set (GTK_ARROW (arrow),
GTK_ARROW_UP,
GTK_SHADOW_IN);
......@@ -764,7 +764,7 @@ gtk_tree_view_model_sort_column_changed (GtkTreeSortable *sortable,
GtkTreeViewColumn *column)
{
gint sort_column_id;
GtkTreeSortOrder order;
GtkSortType order;
if (gtk_tree_sortable_get_sort_column_id (sortable,
&sort_column_id,
......@@ -792,14 +792,14 @@ gtk_tree_view_column_sort (GtkTreeViewColumn *tree_column,
if (tree_column->show_sort_indicator)
{
if (tree_column->sort_order == GTK_TREE_SORT_ASCENDING)
gtk_tree_view_column_set_sort_order (tree_column, GTK_TREE_SORT_DESCENDING);
if (tree_column->sort_order == GTK_SORT_ASCENDING)
gtk_tree_view_column_set_sort_order (tree_column, GTK_SORT_DESCENDING);
else
gtk_tree_view_column_set_sort_order (tree_column, GTK_TREE_SORT_ASCENDING);
gtk_tree_view_column_set_sort_order (tree_column, GTK_SORT_ASCENDING);
}
else
{
gtk_tree_view_column_set_sort_order (tree_column, GTK_TREE_SORT_ASCENDING);
gtk_tree_view_column_set_sort_order (tree_column, GTK_SORT_ASCENDING);
gtk_tree_view_column_set_sort_indicator (tree_column, TRUE);
}
......@@ -839,7 +839,7 @@ gtk_tree_view_column_setup_sort_column_id_callback (GtkTreeViewColumn *tree_colu
tree_column->sort_column_id != -1)
{
gint real_sort_column_id;
GtkTreeSortOrder real_order;
GtkSortType real_order;
if (tree_column->sort_column_changed_signal == 0)
tree_column->sort_column_changed_signal =
......@@ -1883,7 +1883,7 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
tree_column->sort_column_changed_signal = 0;
}
gtk_tree_view_column_set_sort_order (tree_column, GTK_TREE_SORT_ASCENDING);
gtk_tree_view_column_set_sort_order (tree_column, GTK_SORT_ASCENDING);
gtk_tree_view_column_set_sort_indicator (tree_column, FALSE);
return;
}
......@@ -1978,7 +1978,7 @@ gtk_tree_view_column_get_sort_indicator (GtkTreeViewColumn *tree_column)
**/
void
gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column,
GtkTreeSortOrder order)
GtkSortType order)
{
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
......@@ -1998,7 +1998,7 @@ gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column,
*
* Return value: the sort order the sort indicator is indicating
**/
GtkTreeSortOrder
GtkSortType
gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column)
{
g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
......
......@@ -85,7 +85,7 @@ struct _GtkTreeViewColumn
guint sort_clicked_signal;
guint sort_column_changed_signal;
gint sort_column_id;
GtkTreeSortOrder sort_order;
GtkSortType sort_order;
/* Flags */
guint visible : 1;
......@@ -188,8 +188,8 @@ void gtk_tree_view_column_set_sort_indicator (GtkTreeViewCol
gboolean setting);
gboolean gtk_tree_view_column_get_sort_indicator (GtkTreeViewColumn *tree_column);
void gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column,
GtkTreeSortOrder order);
GtkTreeSortOrder gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column);
GtkSortType order);
GtkSortType gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column);
/* These functions are meant primarily for interaction between the GtkTreeView and the column.
......
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