mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
it's amazing how well things work sometimes, even when they're completely
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered): it's amazing how well things work sometimes, even when they're completely wrong. * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug where you could try to collapse a node w/o it having children. (gtk_tree_view_class_init): remove Shift L<->R as they already existed for expand/collapse.
This commit is contained in:
parent
b852358d0a
commit
2704ea2b58
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Nov 1 15:45:04 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
it's amazing how well things work sometimes, even when they're
|
||||
completely wrong.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
|
||||
where you could try to collapse a node w/o it having children.
|
||||
|
||||
(gtk_tree_view_class_init): remove Shift L<->R as they already
|
||||
existed for expand/collapse.
|
||||
|
||||
Thu Nov 1 12:21:31 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Fix crash
|
||||
|
@ -676,7 +676,7 @@ gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_model,
|
||||
SortLevel *level;
|
||||
GtkTreeIter iter;
|
||||
gint *tmp_array;
|
||||
int i;
|
||||
int i, j;
|
||||
GtkTreePath *path;
|
||||
GtkTreeModelSort *tree_model_sort = GTK_TREE_MODEL_SORT (data);
|
||||
|
||||
@ -716,11 +716,18 @@ gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_model,
|
||||
|
||||
tmp_array = g_new (int, level->array->len);
|
||||
for (i = 0; i < level->array->len; i++)
|
||||
tmp_array[new_order[i]] = g_array_index (level->array, SortElt, i).offset;
|
||||
{
|
||||
for (j = 0; j < level->array->len; j++)
|
||||
{
|
||||
if (g_array_index (level->array, SortElt, i).offset == new_order[j])
|
||||
tmp_array[i] = j;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < level->array->len; i++)
|
||||
g_array_index (level->array, SortElt, i).offset = tmp_array[i];
|
||||
g_free (tmp_array);
|
||||
|
||||
|
||||
if (tree_model_sort->sort_column_id == -1 &&
|
||||
tree_model_sort->default_sort_func == (GtkTreeIterCompareFunc) 0x1)
|
||||
{
|
||||
|
@ -806,14 +806,6 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
|
||||
GTK_TYPE_ENUM, GTK_MOVEMENT_VISUAL_POSITIONS,
|
||||
GTK_TYPE_INT, -1);
|
||||
|
||||
gtk_binding_entry_add_signal (binding_set, GDK_Right, GDK_SHIFT_MASK, "move_cursor", 2,
|
||||
GTK_TYPE_ENUM, GTK_MOVEMENT_VISUAL_POSITIONS,
|
||||
GTK_TYPE_INT, 1);
|
||||
|
||||
gtk_binding_entry_add_signal (binding_set, GDK_Left, GDK_SHIFT_MASK, "move_cursor", 2,
|
||||
GTK_TYPE_ENUM, GTK_MOVEMENT_VISUAL_POSITIONS,
|
||||
GTK_TYPE_INT, -1);
|
||||
|
||||
gtk_binding_entry_add_signal (binding_set, GDK_Right, GDK_CONTROL_MASK|GDK_SHIFT_MASK, "move_cursor", 2,
|
||||
GTK_TYPE_ENUM, GTK_MOVEMENT_VISUAL_POSITIONS,
|
||||
GTK_TYPE_INT, 1);
|
||||
@ -7586,6 +7578,8 @@ gtk_tree_view_real_expand_row (GtkTreeView *tree_view,
|
||||
|
||||
if (node->children)
|
||||
return TRUE;
|
||||
if (! GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT))
|
||||
return FALSE;
|
||||
|
||||
gtk_tree_model_get_iter (tree_view->priv->model, &iter, path);
|
||||
if (! gtk_tree_model_iter_has_child (tree_view->priv->model, &iter))
|
||||
@ -7690,6 +7684,9 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
|
||||
gint x, y;
|
||||
GList *list;
|
||||
|
||||
if (node->children == NULL)
|
||||
return FALSE;
|
||||
|
||||
gtk_tree_model_get_iter (tree_view->priv->model, &iter, path);
|
||||
|
||||
g_signal_emit (G_OBJECT (tree_view), tree_view_signals[TEST_COLLAPSE_ROW], 0, &iter, path, &collapse);
|
||||
|
Loading…
Reference in New Issue
Block a user