aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-editor.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-15 02:51:06 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-15 02:51:06 +0800
commit1b233621840ce78f89ab5b91e67f8c9c8f6a09df (patch)
tree22c47a84716711a8510adec2e61cfbf908bf11b2 /src/bookmarks/ephy-bookmarks-editor.c
parent33021c190b07950973747e1891f0a58af675fe2b (diff)
downloadgsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.tar
gsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.tar.gz
gsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.tar.bz2
gsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.tar.lz
gsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.tar.xz
gsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.tar.zst
gsoc2013-epiphany-1b233621840ce78f89ab5b91e67f8c9c8f6a09df.zip
s/galeon/epiphany ;)
2003-04-14 Marco Pesenti Gritti <marco@it.gnome.org> * configure.in: s/galeon/epiphany ;) * src/bookmarks/ephy-bookmarks-editor.c: (reset_search_entry), (keyword_node_selected_cb), (search_entry_changed_cb): * src/bookmarks/ephy-topic-action.c: (build_bookmarks_menu), (build_topics_menu), (build_menu), (button_press_cb): Evil bookmarks menu is back in toolbars eeeeek. And no you cant have more than one level ... too bad. Fix search/node selection interaction.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-editor.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 05a226005..1dbcac36a 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -80,6 +80,8 @@ static void ephy_bookmarks_editor_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
+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,
@@ -674,6 +676,20 @@ key_pressed_cb (GtkWidget *widget,
}
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)
@@ -687,6 +703,7 @@ keyword_node_selected_cb (EphyNodeView *view,
}
else
{
+ reset_search_entry (editor);
bookmarks_filter (editor, node);
}
@@ -707,8 +724,21 @@ keyword_node_show_popup_cb (GtkWidget *view, EphyBookmarksEditor *editor)
static void
search_entry_changed_cb (GtkWidget *entry, EphyBookmarksEditor *editor)
{
+ EphyNode *all;
char *search_text;
+ g_signal_handlers_block_by_func
+ (G_OBJECT (editor->priv->key_view),
+ G_CALLBACK (keyword_node_selected_cb),
+ editor);
+ all = ephy_bookmarks_get_bookmarks (editor->priv->bookmarks);
+ ephy_node_view_select_node (EPHY_NODE_VIEW (editor->priv->key_view),
+ all);
+ g_signal_handlers_unblock_by_func
+ (G_OBJECT (editor->priv->key_view),
+ G_CALLBACK (keyword_node_selected_cb),
+ editor);
+
search_text = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
GDK_THREADS_ENTER ();