aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-node-view.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-03-14 23:31:45 +0800
committerChristian Persch <chpe@src.gnome.org>2005-03-14 23:31:45 +0800
commit0d8dd611e669275c40f3113d22b97d467e3545c4 (patch)
treea356f30de9ab565c1e4ad1bb8bea1f8d9192d26f /lib/widgets/ephy-node-view.c
parent0551f379b4ec62e5399422b0f2034313fd3daf76 (diff)
downloadgsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.tar
gsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.tar.gz
gsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.tar.bz2
gsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.tar.lz
gsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.tar.xz
gsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.tar.zst
gsoc2013-epiphany-0d8dd611e669275c40f3113d22b97d467e3545c4.zip
Remove custom search, and use gtktreeview typeaheadfind. Fixes bug
2005-03-14 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-gui.c: (ephy_gui_is_middle_click): * lib/ephy-gui.h: * lib/widgets/ephy-node-view.c: (ephy_node_view_key_press_cb), (ephy_node_view_add_column), (ephy_node_view_init): Remove custom search, and use gtktreeview typeaheadfind. Fixes bug #118107.
Diffstat (limited to 'lib/widgets/ephy-node-view.c')
-rw-r--r--lib/widgets/ephy-node-view.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 9a4291bdc..a0d229d64 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -69,8 +69,6 @@ struct _EphyNodeViewPrivate
gboolean remove_if_cancelled;
int editable_property;
- int searchable_data_column;
-
gboolean drag_started;
int drag_button;
int drag_x;
@@ -567,9 +565,7 @@ ephy_node_view_key_press_cb (GtkTreeView *treeview,
GdkEventKey *event,
EphyNodeView *view)
{
- guint32 unicode;
-
- unicode = gdk_keyval_to_unicode (event->keyval);
+ gboolean handled = FALSE;
if (event->keyval == GDK_space ||
event->keyval == GDK_Return ||
@@ -582,15 +578,11 @@ ephy_node_view_key_press_cb (GtkTreeView *treeview,
selection = gtk_tree_view_get_selection (treeview);
gtk_tree_selection_selected_foreach
(selection, path_toggled, view);
+ handled = TRUE;
}
}
- else if (view->priv->searchable_data_column != -1 && unicode)
- {
- return ephy_gui_select_row_by_key
- (treeview, view->priv->searchable_data_column, unicode);
- }
- return FALSE;
+ return handled;
}
static void
@@ -1205,12 +1197,6 @@ ephy_node_view_add_column (EphyNodeView *view,
G_CALLBACK (renderer_editing_canceled_cb), view);
}
- if ((flags & EPHY_NODE_VIEW_SEARCHABLE) &&
- (view->priv->searchable_data_column == -1))
- {
- view->priv->searchable_data_column = column;
- }
-
gtk_tree_view_column_pack_start (gcolumn, renderer, TRUE);
gtk_tree_view_column_set_attributes (gcolumn, renderer,
"text", column,
@@ -1237,6 +1223,12 @@ ephy_node_view_add_column (EphyNodeView *view,
gtk_tree_view_column_set_sort_column_id (gcolumn, column);
}
+ if (flags & EPHY_NODE_VIEW_SEARCHABLE)
+ {
+ gtk_tree_view_set_search_column (GTK_TREE_VIEW (view), column);
+ gtk_tree_view_set_enable_search (GTK_TREE_VIEW (view), TRUE);
+ }
+
if (ret != NULL)
*ret = gcolumn;
@@ -1283,7 +1275,6 @@ ephy_node_view_init (EphyNodeView *view)
view->priv = EPHY_NODE_VIEW_GET_PRIVATE (view);
view->priv->toggle_column = -1;
- view->priv->searchable_data_column = -1;
view->priv->priority_column = -1;
view->priv->priority_prop_id = 0;
view->priv->sort_column = -1;