GtkTreeView::row-activated
- From: Federico Mena Quintero <federico ximian com>
- To: GTK+ development mailing list <gtk-devel-list gnome org>
- Subject: GtkTreeView::row-activated
- Date: Wed, 02 Jun 2004 13:45:39 -0500
Hi,
We have a few bugs like this:
- You have a dialog box with a default button and a tree view.
- Pressing Enter while the tree view is focused doesn't activate the
default button.
So we have hacks for "tree view swallows Enter":
- gtkfontsel.c:list_row_activated()
- gtkfilechooserdefault.c:trap_activate_cb()
I think the culprit is at the end of
gtk_tree_view_real_select_cursor_row():
...
if (!tree_view->priv->shift_pressed)
gtk_tree_view_row_activated (tree_view, cursor_path,
tree_view->priv->focus_column);
gtk_tree_path_free (cursor_path);
return TRUE;
}
That is, this calls gtk_tree_view_row_activated() and unconditionally
returns TRUE. This signal, select-cursor-row, is bound to Enter. This
is the case for non-editable cells, of course; editable ones are handled
fine.
Shouldn't gtk_tree_view_row_activated() and the corresponding row-
activated signal return a boolean value? This would let Enter trickle
upwards if the caller of the tree view does not handle the signal; as a
result, the normal behavior for default buttons would work.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]