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



commit 651bdc8db8376ee20f84c63e000d91d836ab49b4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed May 3 12:43:57 2017 +0200

    Window: first step to make it private
    
    DhWindow is not re-usable. It depends on DhApp, and 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 DhWindow 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.
    
    The comment for _dh_window_display_uri() is restored to the state before
    commit 6e745075da7a5713646fa9f02831c0775fbac500.

 docs/reference/Makefile.am          |    3 ++-
 docs/reference/devhelp-docs.xml     |    1 -
 docs/reference/devhelp-sections.txt |   20 --------------------
 src/dh-window.c                     |   31 +------------------------------
 src/dh-window.h                     |   10 ----------
 5 files changed, 3 insertions(+), 62 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 0dd920f..0bb68d6 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -52,7 +52,8 @@ IGNORE_HFILES = \
        dh-preferences.h \
        dh-resources.h \
        dh-settings.h \
-       dh-util.h
+       dh-util.h \
+       dh-window.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
diff --git a/docs/reference/devhelp-docs.xml b/docs/reference/devhelp-docs.xml
index 9504c55..238ea10 100644
--- a/docs/reference/devhelp-docs.xml
+++ b/docs/reference/devhelp-docs.xml
@@ -28,7 +28,6 @@
     <xi:include href="xml/dh-language.xml"/>
     <xi:include href="xml/dh-link.xml"/>
     <xi:include href="xml/dh-sidebar.xml"/>
-    <xi:include href="xml/dh-window.xml"/>
   </chapter>
 
   <chapter id="object-tree">
diff --git a/docs/reference/devhelp-sections.txt b/docs/reference/devhelp-sections.txt
index 94a8772..03dd0d3 100644
--- a/docs/reference/devhelp-sections.txt
+++ b/docs/reference/devhelp-sections.txt
@@ -198,23 +198,3 @@ DH_SIDEBAR_CLASS
 DH_TYPE_SIDEBAR
 dh_sidebar_get_type
 </SECTION>
-
-<SECTION>
-<FILE>dh-window</FILE>
-<TITLE>DhWindow</TITLE>
-DhWindow
-DhOpenLinkFlags
-dh_window_new
-dh_window_search
-<SUBSECTION Standard>
-DhWindowClass
-DH_IS_WINDOW
-DH_IS_WINDOW_CLASS
-DH_TYPE_WINDOW
-DH_WINDOW
-DH_WINDOW_CLASS
-DH_WINDOW_GET_CLASS
-DH_TYPE_OPEN_LINK_FLAGS
-dh_window_get_type
-dh_open_link_flags_get_type
-</SECTION>
diff --git a/src/dh-window.c b/src/dh-window.c
index 280f30f..8103113 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -734,12 +734,6 @@ dh_window_class_init (DhWindowClass *klass)
 
         klass->open_link = dh_window_open_link;
 
-        /**
-         * DhWindow::open-link:
-         * @window: a #DhWindow object
-         * @location: the location of the link
-         * @flags: a #DhOpenLinkFlags
-         */
         signals[OPEN_LINK] =
                 g_signal_new ("open-link",
                               G_TYPE_FROM_CLASS (klass),
@@ -1555,14 +1549,6 @@ window_tab_set_title (DhWindow      *window,
         }
 }
 
-/**
- * dh_window_new:
- * @application: the #DhApp owning this window
- *
- * Create a new #DhWindow object.
- *
- * Returns: a new #DhWindow object
- */
 GtkWidget *
 dh_window_new (DhApp *application)
 {
@@ -1590,13 +1576,6 @@ dh_window_new (DhApp *application)
         return GTK_WIDGET (window);
 }
 
-/**
- * dh_window_search:
- * @window: a #DhWindow object
- * @str: the string to search
- *
- * Search for @str in the current window.
- */
 void
 dh_window_search (DhWindow    *window,
                   const gchar *str)
@@ -1610,15 +1589,7 @@ dh_window_search (DhWindow    *window,
         dh_sidebar_set_search_string (priv->sidebar, str);
 }
 
-/*< private >
- * _dh_window_display_uri:
- * @window: a #DhWindow object
- * @uri: the uri to display
- *
- * Open the @uri in the current window.
- *
- * Only call this with a URI that is known to be in the docs.
- */
+/* Only call this with a URI that is known to be in the docs. */
 void
 _dh_window_display_uri (DhWindow    *window,
                         const gchar *uri)
diff --git a/src/dh-window.h b/src/dh-window.h
index a0abdec..c73c009 100644
--- a/src/dh-window.h
+++ b/src/dh-window.h
@@ -36,11 +36,6 @@ G_BEGIN_DECLS
 typedef struct _DhWindow       DhWindow;
 typedef struct _DhWindowClass  DhWindowClass;
 
-/**
- * DhOpenLinkFlags:
- * @DH_OPEN_LINK_NEW_WINDOW: Open the link in a new window
- * @DH_OPEN_LINK_NEW_TAB: Open the link in a new tab
- */
 typedef enum
 {
         DH_OPEN_LINK_NEW_WINDOW = 1 << 0,
@@ -51,11 +46,6 @@ struct _DhWindow {
         GtkApplicationWindow parent_instance;
 };
 
-/**
- * DhWindowClass:
- * @parent_class: The parent class
- * @open_link: Class handler for the #DhWindow::open-link signal
- */
 struct _DhWindowClass {
         GtkApplicationWindowClass parent_class;
 


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