[devhelp/wip/swilmet/privatize-app] DhApp: make it private



commit 353f689acf23cb7bacc12c835b3bff008a32c033
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon May 1 11:07:50 2017 +0200

    DhApp: make it private
    
    DhApp is not meant to be used by an IDE to integrate Devhelp into the
    IDE. There can be only one GtkApplication, and the IDE has already a
    GtkApplication instance. So DhApp is useful only for the Devhelp app,
    not the library.
    
    If it is desirable for an app to launch the Devhelp app, Devhelp can
    already be launched with a command line, or another solution would be to
    provide a D-Bus API.
    
    This commit also removes the gtk-doc comments, it is not really useful,
    and in other classes there were several errors in the gtk-doc comments,
    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 |   24 -------------
 src/Makefile.am                     |    4 +-
 src/dh-app.c                        |   63 -----------------------------------
 5 files changed, 3 insertions(+), 90 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 9f8262e..bb671b9 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-enum-types.h \
        dh-error.h \
        dh-parser.h \
diff --git a/docs/reference/devhelp-docs.xml b/docs/reference/devhelp-docs.xml
index 0a5966e..7e75512 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.xml"/>
     <xi:include href="xml/dh-assistant-view.xml"/>
     <xi:include href="xml/dh-book.xml"/>
diff --git a/docs/reference/devhelp-sections.txt b/docs/reference/devhelp-sections.txt
index 5bdd307..28c220a 100644
--- a/docs/reference/devhelp-sections.txt
+++ b/docs/reference/devhelp-sections.txt
@@ -5,30 +5,6 @@ dh_init
 </SECTION>
 
 <SECTION>
-<FILE>dh-app</FILE>
-<TITLE>DhApp</TITLE>
-DhApp
-dh_app_new
-dh_app_peek_book_manager
-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</FILE>
 <TITLE>DhAssistant</TITLE>
 DhAssistant
diff --git a/src/Makefile.am b/src/Makefile.am
index eb45324..3a4d313 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,7 +52,6 @@ lib_LTLIBRARIES = libdevhelp-3.la
 
 libdevhelp_public_headers =            \
        devhelp.h                       \
-       dh-app.h                        \
        dh-assistant.h                  \
        dh-assistant-view.h             \
        dh-book.h                       \
@@ -65,7 +64,6 @@ libdevhelp_public_headers =           \
        dh-window.h
 
 libdevhelp_public_c_files =            \
-       dh-app.c                        \
        dh-assistant.c                  \
        dh-assistant-view.c             \
        dh-book.c                       \
@@ -79,6 +77,7 @@ libdevhelp_public_c_files =           \
        dh-window.c
 
 libdevhelp_private_headers =           \
+       dh-app.h                        \
        dh-error.h                      \
        dh-parser.h                     \
        dh-preferences.h                \
@@ -86,6 +85,7 @@ libdevhelp_private_headers =          \
        dh-util.h
 
 libdevhelp_private_c_files =           \
+       dh-app.c                        \
        dh-error.c                      \
        dh-parser.c                     \
        dh-preferences.c                \
diff --git a/src/dh-app.c b/src/dh-app.c
index 3bd8135..0278ee7 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -34,14 +34,6 @@ typedef struct {
 
 G_DEFINE_TYPE_WITH_PRIVATE (DhApp, dh_app, GTK_TYPE_APPLICATION);
 
-/**
- * dh_app_peek_book_manager:
- * @app: a #DhApp object
- *
- * Get the associated #DhBookManager.
- *
- * Returns: (transfer none): the book manager associated with this
- */
 DhBookManager *
 dh_app_peek_book_manager (DhApp *app)
 {
@@ -54,14 +46,6 @@ dh_app_peek_book_manager (DhApp *app)
         return priv->book_manager;
 }
 
-/**
- * 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)
 {
@@ -84,14 +68,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)
 {
@@ -136,12 +112,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)
 {
@@ -150,12 +120,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)
 {
@@ -164,13 +128,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)
@@ -180,13 +137,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)
@@ -196,12 +146,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)
 {
@@ -520,13 +464,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]