[devhelp/wip/privatize-classes: 3/4] App: first step to make it private



commit 4cbe5d7c50cb9ad10c1f4c3df9c0071a178fc0bb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed May 3 12:53:39 2017 +0200

    App: first step to make it private
    
    DhApp is not re-usable. DhApp is a subclass of GtkApplication. An
    application can have only one GtkApplication instance, so DhApp in the
    current state doesn't make sense as a library.
    
    This is the first step to make DhApp private, it removes the class from
    the public docs.
    
    The gtk-doc comments are removed, because it is not really useful, and
    in other classes the gtk-doc comments contained several errors, so it's
    better to have no comments at all than erroneous comments.

 docs/reference/Makefile.am          |    1 +
 docs/reference/devhelp-docs.xml     |    1 -
 docs/reference/devhelp-sections.txt |   23 --------------
 src/dh-app.c                        |   55 -----------------------------------
 4 files changed, 1 insertions(+), 79 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 0bb68d6..262bd50 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -45,6 +45,7 @@ EXTRA_HFILES =
 # Header files or dirs to ignore when scanning. Use base file/dir names
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
 IGNORE_HFILES = \
+       dh-app.h \
        dh-assistant.h \
        dh-enum-types.h \
        dh-error.h \
diff --git a/docs/reference/devhelp-docs.xml b/docs/reference/devhelp-docs.xml
index 238ea10..0a0fede 100644
--- a/docs/reference/devhelp-docs.xml
+++ b/docs/reference/devhelp-docs.xml
@@ -19,7 +19,6 @@
   <chapter>
     <title>API Reference</title>
     <xi:include href="xml/init.xml"/>
-    <xi:include href="xml/dh-app.xml"/>
     <xi:include href="xml/dh-assistant-view.xml"/>
     <xi:include href="xml/dh-book.xml"/>
     <xi:include href="xml/dh-book-manager.xml"/>
diff --git a/docs/reference/devhelp-sections.txt b/docs/reference/devhelp-sections.txt
index 03dd0d3..ab3e91a 100644
--- a/docs/reference/devhelp-sections.txt
+++ b/docs/reference/devhelp-sections.txt
@@ -5,29 +5,6 @@ dh_init
 </SECTION>
 
 <SECTION>
-<FILE>dh-app</FILE>
-<TITLE>DhApp</TITLE>
-DhApp
-dh_app_new
-dh_app_peek_first_window
-dh_app_peek_assistant
-dh_app_new_window
-dh_app_quit
-dh_app_search
-dh_app_search_assistant
-dh_app_raise
-<SUBSECTION Standard>
-DhAppClass
-DH_APP
-DH_APP_CLASS
-DH_APP_GET_CLASS
-DH_IS_APP
-DH_IS_APP_CLASS
-DH_TYPE_APP
-dh_app_get_type
-</SECTION>
-
-<SECTION>
 <FILE>dh-assistant-view</FILE>
 <TITLE>DhAssistantView</TITLE>
 DhAssistantView
diff --git a/src/dh-app.c b/src/dh-app.c
index 05fc3db..e01695b 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -30,14 +30,6 @@
 
 G_DEFINE_TYPE (DhApp, dh_app, GTK_TYPE_APPLICATION);
 
-/**
- * dh_app_peek_first_window:
- * @app: a #DhApp object
- *
- * Get the first #DhWindow.
- *
- * Returns: (transfer none): the first window
- */
 GtkWindow *
 dh_app_peek_first_window (DhApp *app)
 {
@@ -60,14 +52,6 @@ dh_app_peek_first_window (DhApp *app)
         return dh_app_peek_first_window (app);
 }
 
-/**
- * dh_app_peek_assistant:
- * @app: a #DhApp object
- *
- * Get the associated #DhAssistant.
- *
- * Returns: (transfer none): the assistant
- */
 GtkWindow *
 dh_app_peek_assistant (DhApp *app)
 {
@@ -112,12 +96,6 @@ _dh_app_has_app_menu (DhApp *app)
 /******************************************************************************/
 /* Application action activators */
 
-/**
- * dh_app_new_window:
- * @app: a #DhApp object
- *
- * Create a new #DhWindow.
- */
 void
 dh_app_new_window (DhApp *app)
 {
@@ -126,12 +104,6 @@ dh_app_new_window (DhApp *app)
         g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
 }
 
-/**
- * dh_app_quit:
- * @app: a #DhApp object
- *
- * Quit the application.
- */
 void
 dh_app_quit (DhApp *app)
 {
@@ -140,13 +112,6 @@ dh_app_quit (DhApp *app)
         g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
 }
 
-/**
- * dh_app_search:
- * @app: a #DhApp object
- * @keyword: the search request
- *
- * Search for @keyword in the entire application.
- */
 void
 dh_app_search (DhApp *app,
                const gchar *keyword)
@@ -156,13 +121,6 @@ dh_app_search (DhApp *app,
         g_action_group_activate_action (G_ACTION_GROUP (app), "search", g_variant_new_string (keyword));
 }
 
-/**
- * dh_app_search_assistant:
- * @app: a #DhApp object
- * @keyword: the search request
- *
- * Search for @keyword in the entire application with a #DhAssistant.
- */
 void
 dh_app_search_assistant (DhApp *app,
                          const gchar *keyword)
@@ -172,12 +130,6 @@ dh_app_search_assistant (DhApp *app,
         g_action_group_activate_action (G_ACTION_GROUP (app), "search-assistant", g_variant_new_string 
(keyword));
 }
 
-/**
- * dh_app_raise:
- * @app: a #DhApp object
- *
- * Present the main window of the application.
- */
 void
 dh_app_raise (DhApp *app)
 {
@@ -491,13 +443,6 @@ dh_app_activate (GApplication *application)
 
 /******************************************************************************/
 
-/**
- * dh_app_new:
- *
- * Create a new #DhApp object.
- *
- * Returns: a new #DhApp object
- */
 DhApp *
 dh_app_new (void)
 {


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