diff options
author | Xan Lopez <xan@src.gnome.org> | 2003-07-13 00:26:19 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2003-07-13 00:26:19 +0800 |
commit | c16f33a0183bf8da7c13eea9f85472d1ef807be0 (patch) | |
tree | aa9425b2280c3d4780e24671bcb04f72e7396d02 /src | |
parent | 61f1dcadb9567d95440a6b0f4ea0863401c2934e (diff) | |
download | gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.tar gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.tar.gz gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.tar.bz2 gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.tar.lz gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.tar.xz gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.tar.zst gsoc2013-epiphany-c16f33a0183bf8da7c13eea9f85472d1ef807be0.zip |
A "fast search" implementation for all node views. Pressing any valid
A "fast search" implementation for all node views. Pressing any valid
unicode character will make ephy select the first entry begining
with that key, or the nearest match (with previous or posterior letters).
Fixes bug #116744 (http://bugzilla.gnome.org/show_bug.cgi?id=116744).
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 15 | ||||
-rw-r--r-- | src/ephy-history-window.c | 6 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 789239ad7..d7a8b0939 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -1011,16 +1011,11 @@ key_pressed_cb (EphyNodeView *view, GdkEventKey *event, EphyBookmarksEditor *editor) { - switch (event->keyval) + if (event->keyval == GDK_Delete || event->keyval == GDK_KP_Delete) { - case GDK_Delete: - case GDK_KP_Delete: cmd_delete (NULL, editor); return TRUE; - - default: - break; - } + } return FALSE; } @@ -1280,7 +1275,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) EPHY_NODE_KEYWORD_PROP_NAME, EPHY_NODE_KEYWORD_PROP_PRIORITY, EPHY_NODE_VIEW_AUTO_SORT | - EPHY_NODE_VIEW_EDITABLE, NULL); + EPHY_NODE_VIEW_EDITABLE | + EPHY_NODE_VIEW_SEARCHABLE, NULL); gtk_container_add (GTK_CONTAINER (scrolled_window), key_view); gtk_widget_set_size_request (key_view, 130, -1); gtk_widget_show (key_view); @@ -1334,7 +1330,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) ephy_node_view_add_column (EPHY_NODE_VIEW (bm_view), _("Title"), G_TYPE_STRING, EPHY_NODE_BMK_PROP_TITLE, -1, EPHY_NODE_VIEW_AUTO_SORT | - EPHY_NODE_VIEW_EDITABLE, + EPHY_NODE_VIEW_EDITABLE | + EPHY_NODE_VIEW_SEARCHABLE, provide_favicon); gtk_container_add (GTK_CONTAINER (scrolled_window), bm_view); gtk_widget_show (bm_view); diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 060cde755..8636557c9 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -1025,7 +1025,8 @@ ephy_history_window_construct (EphyHistoryWindow *editor) G_TYPE_STRING, EPHY_NODE_PAGE_PROP_TITLE, EPHY_NODE_PAGE_PROP_PRIORITY, - EPHY_NODE_VIEW_AUTO_SORT, + EPHY_NODE_VIEW_AUTO_SORT | + EPHY_NODE_VIEW_SEARCHABLE, provide_favicon); gtk_container_add (GTK_CONTAINER (scrolled_window), sites_view); gtk_widget_show (sites_view); @@ -1069,7 +1070,8 @@ ephy_history_window_construct (EphyHistoryWindow *editor) EPHY_NODE_PAGE_PROP_LOCATION); col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Title"), G_TYPE_STRING, EPHY_NODE_PAGE_PROP_TITLE, - -1, EPHY_NODE_VIEW_USER_SORT, NULL); + -1, EPHY_NODE_VIEW_USER_SORT | + EPHY_NODE_VIEW_SEARCHABLE, NULL); gtk_tree_view_column_set_max_width (col, 250); col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Address"), G_TYPE_STRING, EPHY_NODE_PAGE_PROP_LOCATION, |