[devhelp] App: make search() and search_assistant() private functions



commit ffc7d62ecfa1494301e78c25f96ced961682253e
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Dec 15 13:29:40 2017 +0100

    App: make search() and search_assistant() private functions

 src/dh-app.c |   28 ++++++++++++++--------------
 src/dh-app.h |    6 ------
 2 files changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index 1bfb0a2..9c6d71f 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -101,22 +101,22 @@ dh_app_new_window (DhApp *app)
         g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
 }
 
-void
-dh_app_search (DhApp *app,
-               const gchar *keyword)
+static void
+search (DhApp       *app,
+        const gchar *keyword)
 {
-        g_return_if_fail (DH_IS_APP (app));
-
-        g_action_group_activate_action (G_ACTION_GROUP (app), "search", g_variant_new_string (keyword));
+        g_action_group_activate_action (G_ACTION_GROUP (app),
+                                        "search",
+                                        g_variant_new_string (keyword));
 }
 
-void
-dh_app_search_assistant (DhApp *app,
-                         const gchar *keyword)
+static void
+search_assistant (DhApp       *app,
+                  const gchar *keyword)
 {
-        g_return_if_fail (DH_IS_APP (app));
-
-        g_action_group_activate_action (G_ACTION_GROUP (app), "search-assistant", g_variant_new_string 
(keyword));
+        g_action_group_activate_action (G_ACTION_GROUP (app),
+                                        "search-assistant",
+                                        g_variant_new_string (keyword));
 }
 
 void
@@ -507,9 +507,9 @@ dh_app_command_line (GApplication            *app,
         } else if (option_quit) {
                 g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
         } else if (option_search) {
-                dh_app_search (DH_APP (app), option_search);
+                search (DH_APP (app), option_search);
         } else if (option_search_assistant) {
-                dh_app_search_assistant (DH_APP (app), option_search_assistant);
+                search_assistant (DH_APP (app), option_search_assistant);
         } else {
                 dh_app_raise (DH_APP (app));
         }
diff --git a/src/dh-app.h b/src/dh-app.h
index 21af0e8..fb90224 100644
--- a/src/dh-app.h
+++ b/src/dh-app.h
@@ -49,12 +49,6 @@ GtkWindow *     dh_app_peek_first_window        (DhApp *app);
 
 void            dh_app_new_window               (DhApp *app);
 
-void            dh_app_search                   (DhApp       *app,
-                                                 const gchar *keyword);
-
-void            dh_app_search_assistant         (DhApp       *app,
-                                                 const gchar *keyword);
-
 void            dh_app_raise                    (DhApp *app);
 
 gboolean        _dh_app_has_app_menu            (DhApp *app);


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