[epiphany] find: Fix find after 263ebb1dde77e233ba8b94ea0d4ac5f55eac35c5
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] find: Fix find after 263ebb1dde77e233ba8b94ea0d4ac5f55eac35c5
- Date: Sat, 21 Nov 2015 10:17:40 +0000 (UTC)
commit f064aacf84e176d4c1c25363612b80ec014b4b64
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Sat Nov 21 11:11:58 2015 +0100
find: Fix find after 263ebb1dde77e233ba8b94ea0d4ac5f55eac35c5
In 263ebb1dde77e233ba8b94ea0d4ac5f55eac35c5 the virtual signals for next
and previous were removed claiming that they were unused, but they were
indeed used to do the find next/previous. Now we never call
webkit_find_controller_search_next/previous because we simply emit NEXT
and PREVIOUS signals that nobody connect to, and the default handlers
were removed. So, since thouse signals are indeed unused now, I have
removed them and instead ephy_find_toolbar_find_next/previous anc called
directly.
embed/ephy-find-toolbar.c | 36 ++++--------------------------------
1 files changed, 4 insertions(+), 32 deletions(-)
---
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 4dfc9c6..ed524a6 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -65,8 +65,6 @@ static GParamSpec *obj_properties[LAST_PROP];
enum
{
- NEXT,
- PREVIOUS,
CLOSE,
LAST_SIGNAL
};
@@ -169,18 +167,6 @@ tab_search_key_press_cb (WebKitWebView *web_view,
return FALSE;
}
-static void
-find_next_cb (EphyFindToolbar *toolbar)
-{
- g_signal_emit (toolbar, signals[NEXT], 0);
-}
-
-static void
-find_prev_cb (EphyFindToolbar *toolbar)
-{
- g_signal_emit (toolbar, signals[PREVIOUS], 0);
-}
-
static gboolean
str_has_uppercase (const char *str)
{
@@ -317,7 +303,7 @@ entry_key_press_event_cb (GtkEntry *entry,
event->keyval == GDK_KEY_ISO_Enter))
{
handled = TRUE;
- g_signal_emit (toolbar, signals[PREVIOUS], 0);
+ ephy_find_toolbar_find_previous (toolbar);
}
return handled;
@@ -333,7 +319,7 @@ entry_activate_cb (GtkWidget *entry,
}
else
{
- g_signal_emit (toolbar, signals[NEXT], 0);
+ ephy_find_toolbar_find_next (toolbar);
}
}
@@ -470,9 +456,9 @@ ephy_find_toolbar_init (EphyFindToolbar *toolbar)
g_signal_connect (toolbar->entry, "activate",
G_CALLBACK (entry_activate_cb), toolbar);
g_signal_connect_swapped (toolbar->next, "clicked",
- G_CALLBACK (find_next_cb), toolbar);
+ G_CALLBACK (ephy_find_toolbar_find_next), toolbar);
g_signal_connect_swapped (toolbar->prev, "clicked",
- G_CALLBACK (find_prev_cb), toolbar);
+ G_CALLBACK (ephy_find_toolbar_find_previous), toolbar);
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (toolbar),
GTK_ENTRY (toolbar->entry));
@@ -554,20 +540,6 @@ ephy_find_toolbar_class_init (EphyFindToolbarClass *klass)
widget_class->draw = ephy_find_toolbar_draw;
widget_class->grab_focus = ephy_find_toolbar_grab_focus;
- signals[NEXT] =
- g_signal_new ("next",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- 0, NULL, NULL, NULL,
- G_TYPE_NONE, 0);
-
- signals[PREVIOUS] =
- g_signal_new ("previous",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- 0, NULL, NULL, NULL,
- G_TYPE_NONE, 0);
-
signals[CLOSE] =
g_signal_new ("close",
G_OBJECT_CLASS_TYPE (object_class),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]