aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-08 02:53:22 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-08 02:53:22 +0800
commit2831e21efc64d249e62b5432933680233e3a1673 (patch)
tree152c35ccf47b17848fa8cf654ba75fd1ade3717b /src/bookmarks
parent80cd8d8b0e4e09a3e6f8628097cd6c9876053387 (diff)
downloadgsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.tar
gsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.tar.gz
gsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.tar.bz2
gsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.tar.lz
gsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.tar.xz
gsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.tar.zst
gsoc2013-epiphany-2831e21efc64d249e62b5432933680233e3a1673.zip
Remove some leftovers.
2003-06-07 Marco Pesenti Gritti <marco@it.gnome.org> * embed/mozilla/mozilla-notifiers.cpp: Remove some leftovers. * lib/widgets/Makefile.am: * lib/widgets/ephy-search-entry.c: (ephy_search_entry_get_type), (ephy_search_entry_class_init), (ephy_search_entry_timeout_cb), (ephy_search_entry_changed_cb), (ephy_search_entry_focus_out_event_cb), (ephy_search_entry_init), (ephy_search_entry_finalize), (ephy_search_entry_new), (ephy_search_entry_clear): * lib/widgets/ephy-search-entry.h: * src/bookmarks/ephy-bookmarks-editor.c: (keyword_node_selected_cb), (search_entry_search_cb), (build_search_box): * src/ephy-history-window.c: (site_node_selected_cb), (search_entry_search_cb), (build_search_box): Implement a search entry that delays searches a bit after the user pressed key, to have autoapply but make it interactive enough. (Based on rhythmbox one)
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 81e6e1e4b..616fa10b9 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -53,6 +53,7 @@
#include "ephy-debug.h"
#include "ephy-gui.h"
#include "ephy-stock-icons.h"
+#include "ephy-search-entry.h"
static GtkTargetEntry topic_drag_dest_types [] =
{
@@ -90,8 +91,6 @@ static void ephy_bookmarks_editor_get_property (GObject *object,
GParamSpec *pspec);
static void ephy_bookmarks_editor_update_menu (EphyBookmarksEditor *editor);
-static void search_entry_changed_cb (GtkWidget *entry,
- EphyBookmarksEditor *editor);
static void cmd_open_bookmarks_in_tabs (EggAction *action,
EphyBookmarksEditor *editor);
static void cmd_open_bookmarks_in_browser (EggAction *action,
@@ -925,20 +924,6 @@ key_pressed_cb (EphyNodeView *view,
}
static void
-reset_search_entry (EphyBookmarksEditor *editor)
-{
- g_signal_handlers_block_by_func
- (G_OBJECT (editor->priv->search_entry),
- G_CALLBACK (search_entry_changed_cb),
- editor);
- gtk_entry_set_text (GTK_ENTRY (editor->priv->search_entry), "");
- g_signal_handlers_unblock_by_func
- (G_OBJECT (editor->priv->search_entry),
- G_CALLBACK (search_entry_changed_cb),
- editor);
-}
-
-static void
keyword_node_selected_cb (EphyNodeView *view,
EphyNode *node,
EphyBookmarksEditor *editor)
@@ -952,7 +937,7 @@ keyword_node_selected_cb (EphyNodeView *view,
}
else
{
- reset_search_entry (editor);
+ ephy_search_entry_clear (EPHY_SEARCH_ENTRY (editor->priv->search_entry));
bookmarks_filter (editor, node);
}
}
@@ -969,10 +954,9 @@ keyword_node_show_popup_cb (GtkWidget *view, EphyBookmarksEditor *editor)
}
static void
-search_entry_changed_cb (GtkWidget *entry, EphyBookmarksEditor *editor)
+search_entry_search_cb (GtkWidget *entry, const char *search_text, EphyBookmarksEditor *editor)
{
EphyNode *all;
- char *search_text;
g_signal_handlers_block_by_func
(G_OBJECT (editor->priv->key_view),
@@ -1004,8 +988,6 @@ search_entry_changed_cb (GtkWidget *entry, EphyBookmarksEditor *editor)
ephy_node_filter_done_changing (editor->priv->bookmarks_filter);
GDK_THREADS_LEAVE ();
-
- g_free (search_text);
}
static GtkWidget *
@@ -1020,11 +1002,11 @@ build_search_box (EphyBookmarksEditor *editor)
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_widget_show (box);
- entry = gtk_entry_new ();
+ entry = ephy_search_entry_new ();
editor->priv->search_entry = entry;
gtk_widget_show (entry);
- g_signal_connect (G_OBJECT (entry), "changed",
- G_CALLBACK (search_entry_changed_cb),
+ g_signal_connect (G_OBJECT (entry), "search",
+ G_CALLBACK (search_entry_search_cb),
editor);
add_entry_monitor (editor, entry);
add_focus_monitor (editor, entry);