forked from AuroraMiddleware/gtk
#99803, #100458. And a couple of non-bugzilla'd bugs (I am soooo sure I misspelled that).
This commit is contained in:
parent
b6913de5e9
commit
3804b7e64b
57
ChangeLog
57
ChangeLog
@ -1,3 +1,60 @@
|
||||
Mon Jan 27 22:45:15 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): don't handle b if
|
||||
we appended/prepended, send the rows_reordered signal to the
|
||||
correct level ... (Reported by Matthew Tuck).
|
||||
|
||||
Mon Jan 27 22:43:11 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_sort_helper): don't just bail
|
||||
out if the level only has one item, recurse over the child if there
|
||||
is one. (Fixes #100458, reported by Gaël Le Mignot).
|
||||
|
||||
Mon Jan 27 22:41:26 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_model),
|
||||
(gtk_tree_view_search_equal_func): make TreeView search handle
|
||||
all types which are transformable by GValue. (Fixes #99803, reported
|
||||
by Muktha Narayan).
|
||||
|
||||
Mon Jan 27 22:39:25 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_sort_column_id):
|
||||
*really* handle unsetting the ID. Slightly modified patch from
|
||||
Soeren Sandmann. Fixes #87556, reported by Jarek Dukat.
|
||||
|
||||
Mon Jan 27 22:33:43 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes the total GtkTreeSortable mess, and #83195, reported by
|
||||
Jarek Dukat
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id),
|
||||
(gtk_tree_store_set_sort_column_id), (gtk_tree_store_set_sort_func),
|
||||
(gtk_tree_store_set_default_sort_func): use the constant
|
||||
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID instead of -1, make functions
|
||||
work as advertised by the documentation.
|
||||
|
||||
* gtk/gtklistore.c (gtk_list_store_get_sort_column_id),
|
||||
(gtk_list_store_set_sort_column_id), (gtk_list_store_set_sort_func),
|
||||
(gtk_list_store_set_default_sort_func): likewise.
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_set_sort_column_id),
|
||||
(gtk_tree_model_set_sort_func),
|
||||
(gtk_tree_model_sort_set_default_sort_func): make functions work
|
||||
as advertised by the documentation.
|
||||
|
||||
Mon Jan 27 22:31:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): update focus_column
|
||||
before we decide if we edit. (fixes #100973, reported by Dave Cook).
|
||||
|
||||
Mon Jan 27 22:29:30 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Bug report and test case from Paolo Maggi via IRC.
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_swap): update tail if needed,
|
||||
(gtk_list_store_move): update tail if needed.
|
||||
|
||||
Mon Jan 27 16:19:59 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_filter_func): event->any.window
|
||||
|
@ -1,3 +1,60 @@
|
||||
Mon Jan 27 22:45:15 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): don't handle b if
|
||||
we appended/prepended, send the rows_reordered signal to the
|
||||
correct level ... (Reported by Matthew Tuck).
|
||||
|
||||
Mon Jan 27 22:43:11 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_sort_helper): don't just bail
|
||||
out if the level only has one item, recurse over the child if there
|
||||
is one. (Fixes #100458, reported by Gaël Le Mignot).
|
||||
|
||||
Mon Jan 27 22:41:26 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_model),
|
||||
(gtk_tree_view_search_equal_func): make TreeView search handle
|
||||
all types which are transformable by GValue. (Fixes #99803, reported
|
||||
by Muktha Narayan).
|
||||
|
||||
Mon Jan 27 22:39:25 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_sort_column_id):
|
||||
*really* handle unsetting the ID. Slightly modified patch from
|
||||
Soeren Sandmann. Fixes #87556, reported by Jarek Dukat.
|
||||
|
||||
Mon Jan 27 22:33:43 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes the total GtkTreeSortable mess, and #83195, reported by
|
||||
Jarek Dukat
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id),
|
||||
(gtk_tree_store_set_sort_column_id), (gtk_tree_store_set_sort_func),
|
||||
(gtk_tree_store_set_default_sort_func): use the constant
|
||||
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID instead of -1, make functions
|
||||
work as advertised by the documentation.
|
||||
|
||||
* gtk/gtklistore.c (gtk_list_store_get_sort_column_id),
|
||||
(gtk_list_store_set_sort_column_id), (gtk_list_store_set_sort_func),
|
||||
(gtk_list_store_set_default_sort_func): likewise.
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_set_sort_column_id),
|
||||
(gtk_tree_model_set_sort_func),
|
||||
(gtk_tree_model_sort_set_default_sort_func): make functions work
|
||||
as advertised by the documentation.
|
||||
|
||||
Mon Jan 27 22:31:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): update focus_column
|
||||
before we decide if we edit. (fixes #100973, reported by Dave Cook).
|
||||
|
||||
Mon Jan 27 22:29:30 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Bug report and test case from Paolo Maggi via IRC.
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_swap): update tail if needed,
|
||||
(gtk_list_store_move): update tail if needed.
|
||||
|
||||
Mon Jan 27 16:19:59 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_filter_func): event->any.window
|
||||
|
@ -1,3 +1,60 @@
|
||||
Mon Jan 27 22:45:15 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): don't handle b if
|
||||
we appended/prepended, send the rows_reordered signal to the
|
||||
correct level ... (Reported by Matthew Tuck).
|
||||
|
||||
Mon Jan 27 22:43:11 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_sort_helper): don't just bail
|
||||
out if the level only has one item, recurse over the child if there
|
||||
is one. (Fixes #100458, reported by Gaël Le Mignot).
|
||||
|
||||
Mon Jan 27 22:41:26 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_model),
|
||||
(gtk_tree_view_search_equal_func): make TreeView search handle
|
||||
all types which are transformable by GValue. (Fixes #99803, reported
|
||||
by Muktha Narayan).
|
||||
|
||||
Mon Jan 27 22:39:25 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_sort_column_id):
|
||||
*really* handle unsetting the ID. Slightly modified patch from
|
||||
Soeren Sandmann. Fixes #87556, reported by Jarek Dukat.
|
||||
|
||||
Mon Jan 27 22:33:43 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes the total GtkTreeSortable mess, and #83195, reported by
|
||||
Jarek Dukat
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id),
|
||||
(gtk_tree_store_set_sort_column_id), (gtk_tree_store_set_sort_func),
|
||||
(gtk_tree_store_set_default_sort_func): use the constant
|
||||
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID instead of -1, make functions
|
||||
work as advertised by the documentation.
|
||||
|
||||
* gtk/gtklistore.c (gtk_list_store_get_sort_column_id),
|
||||
(gtk_list_store_set_sort_column_id), (gtk_list_store_set_sort_func),
|
||||
(gtk_list_store_set_default_sort_func): likewise.
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_set_sort_column_id),
|
||||
(gtk_tree_model_set_sort_func),
|
||||
(gtk_tree_model_sort_set_default_sort_func): make functions work
|
||||
as advertised by the documentation.
|
||||
|
||||
Mon Jan 27 22:31:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): update focus_column
|
||||
before we decide if we edit. (fixes #100973, reported by Dave Cook).
|
||||
|
||||
Mon Jan 27 22:29:30 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Bug report and test case from Paolo Maggi via IRC.
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_swap): update tail if needed,
|
||||
(gtk_list_store_move): update tail if needed.
|
||||
|
||||
Mon Jan 27 16:19:59 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_filter_func): event->any.window
|
||||
|
@ -1,3 +1,60 @@
|
||||
Mon Jan 27 22:45:15 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): don't handle b if
|
||||
we appended/prepended, send the rows_reordered signal to the
|
||||
correct level ... (Reported by Matthew Tuck).
|
||||
|
||||
Mon Jan 27 22:43:11 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_sort_helper): don't just bail
|
||||
out if the level only has one item, recurse over the child if there
|
||||
is one. (Fixes #100458, reported by Gaël Le Mignot).
|
||||
|
||||
Mon Jan 27 22:41:26 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_model),
|
||||
(gtk_tree_view_search_equal_func): make TreeView search handle
|
||||
all types which are transformable by GValue. (Fixes #99803, reported
|
||||
by Muktha Narayan).
|
||||
|
||||
Mon Jan 27 22:39:25 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_sort_column_id):
|
||||
*really* handle unsetting the ID. Slightly modified patch from
|
||||
Soeren Sandmann. Fixes #87556, reported by Jarek Dukat.
|
||||
|
||||
Mon Jan 27 22:33:43 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes the total GtkTreeSortable mess, and #83195, reported by
|
||||
Jarek Dukat
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id),
|
||||
(gtk_tree_store_set_sort_column_id), (gtk_tree_store_set_sort_func),
|
||||
(gtk_tree_store_set_default_sort_func): use the constant
|
||||
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID instead of -1, make functions
|
||||
work as advertised by the documentation.
|
||||
|
||||
* gtk/gtklistore.c (gtk_list_store_get_sort_column_id),
|
||||
(gtk_list_store_set_sort_column_id), (gtk_list_store_set_sort_func),
|
||||
(gtk_list_store_set_default_sort_func): likewise.
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_set_sort_column_id),
|
||||
(gtk_tree_model_set_sort_func),
|
||||
(gtk_tree_model_sort_set_default_sort_func): make functions work
|
||||
as advertised by the documentation.
|
||||
|
||||
Mon Jan 27 22:31:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): update focus_column
|
||||
before we decide if we edit. (fixes #100973, reported by Dave Cook).
|
||||
|
||||
Mon Jan 27 22:29:30 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Bug report and test case from Paolo Maggi via IRC.
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_swap): update tail if needed,
|
||||
(gtk_list_store_move): update tail if needed.
|
||||
|
||||
Mon Jan 27 16:19:59 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_filter_func): event->any.window
|
||||
|
@ -1,3 +1,60 @@
|
||||
Mon Jan 27 22:45:15 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): don't handle b if
|
||||
we appended/prepended, send the rows_reordered signal to the
|
||||
correct level ... (Reported by Matthew Tuck).
|
||||
|
||||
Mon Jan 27 22:43:11 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_sort_helper): don't just bail
|
||||
out if the level only has one item, recurse over the child if there
|
||||
is one. (Fixes #100458, reported by Gaël Le Mignot).
|
||||
|
||||
Mon Jan 27 22:41:26 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_model),
|
||||
(gtk_tree_view_search_equal_func): make TreeView search handle
|
||||
all types which are transformable by GValue. (Fixes #99803, reported
|
||||
by Muktha Narayan).
|
||||
|
||||
Mon Jan 27 22:39:25 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_sort_column_id):
|
||||
*really* handle unsetting the ID. Slightly modified patch from
|
||||
Soeren Sandmann. Fixes #87556, reported by Jarek Dukat.
|
||||
|
||||
Mon Jan 27 22:33:43 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes the total GtkTreeSortable mess, and #83195, reported by
|
||||
Jarek Dukat
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id),
|
||||
(gtk_tree_store_set_sort_column_id), (gtk_tree_store_set_sort_func),
|
||||
(gtk_tree_store_set_default_sort_func): use the constant
|
||||
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID instead of -1, make functions
|
||||
work as advertised by the documentation.
|
||||
|
||||
* gtk/gtklistore.c (gtk_list_store_get_sort_column_id),
|
||||
(gtk_list_store_set_sort_column_id), (gtk_list_store_set_sort_func),
|
||||
(gtk_list_store_set_default_sort_func): likewise.
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_set_sort_column_id),
|
||||
(gtk_tree_model_set_sort_func),
|
||||
(gtk_tree_model_sort_set_default_sort_func): make functions work
|
||||
as advertised by the documentation.
|
||||
|
||||
Mon Jan 27 22:31:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): update focus_column
|
||||
before we decide if we edit. (fixes #100973, reported by Dave Cook).
|
||||
|
||||
Mon Jan 27 22:29:30 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Bug report and test case from Paolo Maggi via IRC.
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_swap): update tail if needed,
|
||||
(gtk_list_store_move): update tail if needed.
|
||||
|
||||
Mon Jan 27 16:19:59 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_filter_func): event->any.window
|
||||
|
@ -1594,7 +1594,7 @@ gtk_list_store_row_drop_possible (GtkTreeDragDest *drag_dest,
|
||||
&src_model,
|
||||
&src_path))
|
||||
goto out;
|
||||
|
||||
|
||||
if (src_model != GTK_TREE_MODEL (drag_dest))
|
||||
goto out;
|
||||
|
||||
@ -1770,6 +1770,12 @@ gtk_list_store_swap (GtkListStore *store,
|
||||
G_SLIST (a->user_data)->next = prev_b;
|
||||
G_SLIST (b->user_data)->next = prev_a;
|
||||
|
||||
/* update tail if needed */
|
||||
if (! G_SLIST (a->user_data)->next)
|
||||
store->tail = G_SLIST (a->user_data);
|
||||
else if (! G_SLIST (b->user_data)->next)
|
||||
store->tail = G_SLIST (b->user_data);
|
||||
|
||||
/* emit signal */
|
||||
order = g_new (gint, store->length);
|
||||
for (j = 0; j < store->length; j++)
|
||||
@ -1901,9 +1907,12 @@ gtk_list_store_move (GtkListStore *store,
|
||||
{
|
||||
G_SLIST (store->tail)->next = G_SLIST (iter->user_data);
|
||||
G_SLIST (iter->user_data)->next = NULL;
|
||||
store->tail = iter->user_data;
|
||||
}
|
||||
|
||||
/* update tail if needed */
|
||||
if (!G_SLIST (iter->user_data)->next)
|
||||
store->tail = G_SLIST (iter->user_data);
|
||||
|
||||
/* emit signal */
|
||||
if (position)
|
||||
new_pos = gtk_tree_path_get_indices (pos_path)[0];
|
||||
@ -2304,7 +2313,7 @@ gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable,
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST_STORE (sortable), FALSE);
|
||||
|
||||
if (list_store->sort_column_id == -1)
|
||||
if (list_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
return FALSE;
|
||||
|
||||
if (sort_column_id)
|
||||
@ -2327,7 +2336,7 @@ gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
(list_store->order == order))
|
||||
return;
|
||||
|
||||
if (sort_column_id != -1)
|
||||
if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
{
|
||||
GtkTreeDataSortHeader *header = NULL;
|
||||
|
||||
@ -2346,9 +2355,9 @@ gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
list_store->sort_column_id = sort_column_id;
|
||||
list_store->order = order;
|
||||
|
||||
gtk_list_store_sort (list_store);
|
||||
|
||||
gtk_tree_sortable_sort_column_changed (sortable);
|
||||
|
||||
gtk_list_store_sort (list_store);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2395,8 +2404,10 @@ gtk_list_store_set_sort_func (GtkTreeSortable *sortable,
|
||||
header->func = func;
|
||||
header->data = data;
|
||||
header->destroy = destroy;
|
||||
}
|
||||
|
||||
if (list_store->sort_column_id == sort_column_id)
|
||||
gtk_list_store_sort (list_store);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_list_store_set_default_sort_func (GtkTreeSortable *sortable,
|
||||
@ -2419,6 +2430,9 @@ gtk_list_store_set_default_sort_func (GtkTreeSortable *sortable,
|
||||
list_store->default_sort_func = func;
|
||||
list_store->default_sort_data = data;
|
||||
list_store->default_sort_destroy = destroy;
|
||||
|
||||
if (list_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
gtk_list_store_sort (list_store);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1318,9 +1318,9 @@ gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
tree_model_sort->sort_column_id = sort_column_id;
|
||||
tree_model_sort->order = order;
|
||||
|
||||
gtk_tree_model_sort_sort (tree_model_sort);
|
||||
|
||||
gtk_tree_sortable_sort_column_changed (sortable);
|
||||
|
||||
gtk_tree_model_sort_sort (tree_model_sort);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1368,6 +1368,9 @@ gtk_tree_model_sort_set_sort_func (GtkTreeSortable *sortable,
|
||||
header->func = func;
|
||||
header->data = data;
|
||||
header->destroy = destroy;
|
||||
|
||||
if (tree_model_sort->sort_column_id == sort_column_id)
|
||||
gtk_tree_model_sort_sort (tree_model_sort);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1391,6 +1394,9 @@ gtk_tree_model_sort_set_default_sort_func (GtkTreeSortable *sortable,
|
||||
tree_model_sort->default_sort_func = func;
|
||||
tree_model_sort->default_sort_data = data;
|
||||
tree_model_sort->default_sort_destroy = destroy;
|
||||
|
||||
if (tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
gtk_tree_model_sort_sort (tree_model_sort);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -2337,6 +2337,8 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
|
||||
/* after with sibling = NULL prepends */
|
||||
g_node_insert_after (parent, NULL, node);
|
||||
}
|
||||
|
||||
handle_b = FALSE;
|
||||
}
|
||||
|
||||
if (handle_b)
|
||||
@ -2409,7 +2411,7 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
|
||||
path = gtk_tree_path_new ();
|
||||
|
||||
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (tree_store),
|
||||
path, NULL, order);
|
||||
path, &parent_iter, order);
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
if (position)
|
||||
@ -2536,7 +2538,12 @@ gtk_tree_store_sort_helper (GtkTreeStore *tree_store,
|
||||
|
||||
node = parent->children;
|
||||
if (node == NULL || node->next == NULL)
|
||||
return;
|
||||
{
|
||||
if (recurse && node && node->children)
|
||||
gtk_tree_store_sort_helper (tree_store, node, TRUE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
g_assert (GTK_TREE_STORE_IS_SORTED (tree_store));
|
||||
|
||||
@ -2815,7 +2822,7 @@ gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable,
|
||||
|
||||
g_return_val_if_fail (GTK_IS_TREE_STORE (sortable), FALSE);
|
||||
|
||||
if (tree_store->sort_column_id == -1)
|
||||
if (tree_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
return FALSE;
|
||||
|
||||
if (sort_column_id)
|
||||
@ -2840,7 +2847,7 @@ gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
(tree_store->order == order))
|
||||
return;
|
||||
|
||||
if (sort_column_id != -1)
|
||||
if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
{
|
||||
GtkTreeDataSortHeader *header = NULL;
|
||||
|
||||
@ -2858,9 +2865,9 @@ gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
tree_store->sort_column_id = sort_column_id;
|
||||
tree_store->order = order;
|
||||
|
||||
gtk_tree_store_sort (tree_store);
|
||||
|
||||
gtk_tree_sortable_sort_column_changed (sortable);
|
||||
|
||||
gtk_tree_store_sort (tree_store);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2907,6 +2914,9 @@ gtk_tree_store_set_sort_func (GtkTreeSortable *sortable,
|
||||
header->func = func;
|
||||
header->data = data;
|
||||
header->destroy = destroy;
|
||||
|
||||
if (tree_store->sort_column_id == sort_column_id)
|
||||
gtk_tree_store_sort (tree_store);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2930,6 +2940,9 @@ gtk_tree_store_set_default_sort_func (GtkTreeSortable *sortable,
|
||||
tree_store->default_sort_func = func;
|
||||
tree_store->default_sort_data = data;
|
||||
tree_store->default_sort_destroy = destroy;
|
||||
|
||||
if (tree_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
|
||||
gtk_tree_store_sort (tree_store);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -2957,6 +2970,3 @@ validate_gnode (GNode* node)
|
||||
iter = iter->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1906,6 +1906,8 @@ gtk_tree_view_button_press (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
tree_view->priv->focus_column = column;
|
||||
|
||||
/* decide if we edit */
|
||||
if (event->type == GDK_BUTTON_PRESS &&
|
||||
!(event->state & gtk_accelerator_get_default_mod_mask ()))
|
||||
@ -1977,7 +1979,6 @@ gtk_tree_view_button_press (GtkWidget *widget,
|
||||
/* select */
|
||||
pre_val = tree_view->priv->vadjustment->value;
|
||||
|
||||
tree_view->priv->focus_column = column;
|
||||
focus_cell = _gtk_tree_view_column_get_cell_at_pos (column, event->x - background_area.x);
|
||||
if (focus_cell)
|
||||
gtk_tree_view_column_focus_cell (column, focus_cell);
|
||||
@ -7969,18 +7970,20 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
|
||||
|
||||
if (tree_view->priv->search_column == -1)
|
||||
{
|
||||
for (i = 0; i < gtk_tree_model_get_n_columns (model); i++)
|
||||
{
|
||||
if (gtk_tree_model_get_column_type (model, i) == G_TYPE_STRING)
|
||||
GType type = gtk_tree_model_get_column_type (model, i);
|
||||
|
||||
if (g_value_type_transformable (type, G_TYPE_STRING))
|
||||
{
|
||||
tree_view->priv->search_column = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_ref (tree_view->priv->model);
|
||||
g_signal_connect (tree_view->priv->model,
|
||||
"row_changed",
|
||||
@ -9628,6 +9631,7 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
|
||||
_gtk_tree_selection_internal_select_node (tree_view->priv->selection,
|
||||
node, tree, path,
|
||||
state, FALSE);
|
||||
|
||||
if (clamp_node)
|
||||
{
|
||||
gtk_tree_view_clamp_node_visible (tree_view, tree, node);
|
||||
@ -10865,10 +10869,22 @@ gtk_tree_view_search_equal_func (GtkTreeModel *model,
|
||||
gchar *case_normalized_string;
|
||||
gchar *case_normalized_key;
|
||||
GValue value = {0,};
|
||||
GValue transformed = {0,};
|
||||
gint key_len;
|
||||
|
||||
gtk_tree_model_get_value (model, iter, column, &value);
|
||||
normalized_string = g_utf8_normalize (g_value_get_string (&value), -1, G_NORMALIZE_ALL);
|
||||
|
||||
g_value_init (&transformed, G_TYPE_STRING);
|
||||
|
||||
if (!g_value_transform (&value, &transformed))
|
||||
{
|
||||
g_value_unset (&value);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_value_unset (&value);
|
||||
|
||||
normalized_string = g_utf8_normalize (g_value_get_string (&transformed), -1, G_NORMALIZE_ALL);
|
||||
normalized_key = g_utf8_normalize (key, -1, G_NORMALIZE_ALL);
|
||||
case_normalized_string = g_utf8_casefold (normalized_string, -1);
|
||||
case_normalized_key = g_utf8_casefold (normalized_key, -1);
|
||||
@ -10878,7 +10894,7 @@ gtk_tree_view_search_equal_func (GtkTreeModel *model,
|
||||
if (!strncmp (case_normalized_key, case_normalized_string, key_len))
|
||||
retval = FALSE;
|
||||
|
||||
g_value_unset (&value);
|
||||
g_value_unset (&transformed);
|
||||
g_free (normalized_key);
|
||||
g_free (normalized_string);
|
||||
g_free (case_normalized_key);
|
||||
@ -11100,6 +11116,7 @@ gtk_tree_view_start_editing (GtkTreeView *tree_view,
|
||||
cursor_path,
|
||||
tree_view->priv->focus_column,
|
||||
&cell_area);
|
||||
|
||||
if (_gtk_tree_view_column_cell_event (tree_view->priv->focus_column,
|
||||
&editable_widget,
|
||||
NULL,
|
||||
|
@ -2109,7 +2109,7 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||
gint sort_column_id)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
|
||||
g_return_if_fail (sort_column_id >= 0);
|
||||
g_return_if_fail (sort_column_id >= -1);
|
||||
|
||||
if (tree_column->sort_column_id == sort_column_id)
|
||||
return;
|
||||
@ -2119,6 +2119,8 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||
/* Handle unsetting the id */
|
||||
if (sort_column_id == -1)
|
||||
{
|
||||
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_column->tree_view));
|
||||
|
||||
if (tree_column->sort_clicked_signal)
|
||||
{
|
||||
g_signal_handler_disconnect (tree_column, tree_column->sort_clicked_signal);
|
||||
@ -2127,12 +2129,13 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||
|
||||
if (tree_column->sort_column_changed_signal)
|
||||
{
|
||||
g_signal_handler_disconnect (tree_column, tree_column->sort_column_changed_signal);
|
||||
g_signal_handler_disconnect (model, tree_column->sort_column_changed_signal);
|
||||
tree_column->sort_column_changed_signal = 0;
|
||||
}
|
||||
|
||||
gtk_tree_view_column_set_sort_order (tree_column, GTK_SORT_ASCENDING);
|
||||
gtk_tree_view_column_set_sort_indicator (tree_column, FALSE);
|
||||
gtk_tree_view_column_set_clickable (tree_column, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user