[devhelp] Window: more consistent utils function names for the WebView search



commit 2e4566767c82cbb901d823462172af5da7347cda
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Feb 2 21:50:33 2018 +0100

    Window: more consistent utils function names for the WebView search

 src/dh-window.c |   48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/dh-window.c b/src/dh-window.c
index 1393d06..b63c313 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -631,25 +631,7 @@ finish_search_in_all_web_views (DhWindow *window)
 }
 
 static void
-search_mode_enabled_notify_cb (GtkSearchBar *search_bar,
-                               GParamSpec   *pspec,
-                               DhWindow     *window)
-{
-        if (gtk_search_bar_get_search_mode (search_bar))
-                launch_search_in_active_web_view (window);
-        else
-                finish_search_in_all_web_views (window);
-}
-
-static void
-search_changed_cb (GtkEntry *entry,
-                   DhWindow *window)
-{
-        launch_search_in_active_web_view (window);
-}
-
-static void
-web_view_search_previous (DhWindow *window)
+search_previous_in_active_web_view (DhWindow *window)
 {
         WebKitWebView *view;
         WebKitFindController *find_controller;
@@ -661,7 +643,7 @@ web_view_search_previous (DhWindow *window)
 }
 
 static void
-web_view_search_next (DhWindow *window)
+search_next_in_active_web_view (DhWindow *window)
 {
         WebKitWebView *view;
         WebKitFindController *find_controller;
@@ -673,24 +655,42 @@ web_view_search_next (DhWindow *window)
 }
 
 static void
+search_mode_enabled_notify_cb (GtkSearchBar *search_bar,
+                               GParamSpec   *pspec,
+                               DhWindow     *window)
+{
+        if (gtk_search_bar_get_search_mode (search_bar))
+                launch_search_in_active_web_view (window);
+        else
+                finish_search_in_all_web_views (window);
+}
+
+static void
+search_changed_cb (GtkEntry *entry,
+                   DhWindow *window)
+{
+        launch_search_in_active_web_view (window);
+}
+
+static void
 search_prev_button_clicked_cb (GtkButton *search_prev_button,
                                DhWindow  *window)
 {
-        web_view_search_previous (window);
+        search_previous_in_active_web_view (window);
 }
 
 static void
 search_next_button_clicked_cb (GtkButton *search_next_button,
                                DhWindow  *window)
 {
-        web_view_search_next (window);
+        search_next_in_active_web_view (window);
 }
 
 static void
 search_entry_activate_cb (GtkEntry *entry,
                           DhWindow *window)
 {
-        web_view_search_next (window);
+        search_next_in_active_web_view (window);
 }
 
 static gboolean
@@ -700,7 +700,7 @@ search_entry_key_press_event_cb (GtkEntry    *entry,
 {
         if (event->keyval == GDK_KEY_Return &&
             event->state & GDK_SHIFT_MASK) {
-                web_view_search_previous (window);
+                search_previous_in_active_web_view (window);
                 return GDK_EVENT_STOP;
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]