For some reason, I was activating a row while just selecting it. Reported

Thu Jan 17 16:34:55 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
	some reason, I was activating a row while just selecting it.
	Reported by andersca.
	(gtk_tree_view_size_request): add a
	validate_rows_handler to give us a rough width of the widget.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
	Queue a resize here just in case.  It's needed in over half the
	cases, and I don't want to do a diff to figure out exactly when
	it's needed.
This commit is contained in:
Jonathan Blandford 2002-01-18 00:23:26 +00:00 committed by Jonathan Blandford
parent 841e8424ab
commit 6bc31ea4d9
9 changed files with 108 additions and 5 deletions

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1,3 +1,16 @@
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
some reason, I was activating a row while just selecting it.
Reported by andersca.
(gtk_tree_view_size_request): add a
validate_rows_handler to give us a rough width of the widget.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
Queue a resize here just in case. It's needed in over half the
cases, and I don't want to do a diff to figure out exactly when
it's needed.
2002-01-17 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkinputdialog.c,

View File

@ -1448,6 +1448,9 @@ gtk_tree_view_size_request (GtkWidget *widget,
tree_view = GTK_TREE_VIEW (widget);
/* we validate 50 rows initially just to make sure we have some size */
/* in practice, with a lot of static lists, this should get a good width */
validate_rows_handler (tree_view);
gtk_tree_view_size_request_columns (tree_view);
gtk_tree_view_update_size (GTK_TREE_VIEW (widget));
@ -2348,17 +2351,21 @@ gtk_tree_view_motion_resize_column (GtkWidget *widget,
gint x;
gint new_width;
GtkTreeViewColumn *column;
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (widget), GTK_TREE_VIEW (widget)->priv->drag_pos);
column = gtk_tree_view_get_column (tree_view, tree_view->priv->drag_pos);
if (event->is_hint || event->window != widget->window)
gtk_widget_get_pointer (widget, &x, NULL);
else
x = event->x;
new_width = gtk_tree_view_new_column_width (GTK_TREE_VIEW (widget),
GTK_TREE_VIEW (widget)->priv->drag_pos, &x);
if (x != GTK_TREE_VIEW (widget)->priv->x_drag &&
if (tree_view->priv->hadjustment)
x += tree_view->priv->hadjustment->value;
new_width = gtk_tree_view_new_column_width (tree_view,
tree_view->priv->drag_pos, &x);
if (x != tree_view->priv->x_drag &&
(new_width != column->fixed_width));
{
column->resized_width = new_width;
@ -6278,7 +6285,6 @@ gtk_tree_view_real_select_cursor_row (GtkTreeView *tree_view,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
_gtk_tree_view_queue_draw_node (tree_view, cursor_tree, cursor_node, NULL);
gtk_tree_view_row_activated (tree_view, cursor_path, tree_view->priv->focus_column);
gtk_tree_path_free (cursor_path);
}

View File

@ -723,6 +723,12 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
}
}
}
/* Queue a resize on the assumption that we always want to catch all changes
* and columns don't change all that often.
*/
if (GTK_WIDGET_REALIZED (tree_column->tree_view))
gtk_widget_queue_resize (tree_column->tree_view);
}
/* Button signal handlers