[devhelp] App: make peek_assistant() a private function



commit f0ade27c003d8bc9e2941e661c5434e45fa90ec2
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Dec 15 13:18:32 2017 +0100

    App: make peek_assistant() a private function
    
    It is used only in dh-app.c.

 src/dh-app.c |    8 +++-----
 src/dh-app.h |    2 --
 2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index 3325644..2c3b970 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -51,13 +51,11 @@ dh_app_peek_first_window (DhApp *app)
         return dh_app_peek_first_window (app);
 }
 
-GtkWindow *
-dh_app_peek_assistant (DhApp *app)
+static GtkWindow *
+peek_assistant (DhApp *app)
 {
         GList *l;
 
-        g_return_val_if_fail (DH_IS_APP (app), NULL);
-
         for (l = gtk_application_get_windows (GTK_APPLICATION (app));
              l;
              l = g_list_next (l)) {
@@ -293,7 +291,7 @@ search_assistant_cb (GSimpleAction *action,
         }
 
         /* Look for an already registered assistant */
-        assistant = dh_app_peek_assistant (app);
+        assistant = peek_assistant (app);
         if (!assistant) {
                 assistant = GTK_WINDOW (dh_assistant_new (app));
                 gtk_application_add_window (GTK_APPLICATION (app), assistant);
diff --git a/src/dh-app.h b/src/dh-app.h
index f0c8430..b235515 100644
--- a/src/dh-app.h
+++ b/src/dh-app.h
@@ -47,8 +47,6 @@ DhApp *         dh_app_new                      (void);
 
 GtkWindow *     dh_app_peek_first_window        (DhApp *app);
 
-GtkWindow *     dh_app_peek_assistant           (DhApp *app);
-
 void            dh_app_new_window               (DhApp *app);
 
 void            dh_app_quit                     (DhApp *app);


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