diff options
author | Gary Kramlich <grim@reaperworld.com> | 2021-10-19 00:48:05 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2021-10-19 00:48:05 -0500 |
commit | 1493a25aa3dbfccc166c0e80a58483a976dddfc3 (patch) | |
tree | fb4db49e21f8fa5c607b1ae25c3e4d16fcdb235d | |
parent | cd80d0b6d2320f0424e7d0870f6e31035dafcc0a (diff) | |
download | pidgin-1493a25aa3dbfccc166c0e80a58483a976dddfc3.tar.gz |
Convert finch to gi-docgen
Testing Done:
Ran the docs manually and in convey verfied that they look super!
Reviewed at https://reviews.imfreedom.org/r/1072/
-rw-r--r-- | convey.yaml | 2 | ||||
-rw-r--r-- | doc/reference/finch/finch-docs.xml | 60 | ||||
-rw-r--r-- | doc/reference/finch/finch.toml.in | 48 | ||||
-rw-r--r-- | doc/reference/finch/meson.build | 65 | ||||
-rw-r--r-- | doc/reference/finch/urlmap.js | 10 | ||||
-rw-r--r-- | doc/reference/finch/version.xml.in | 1 | ||||
-rw-r--r-- | finch/gntaccount.h | 7 | ||||
-rw-r--r-- | finch/gntblist.h | 12 | ||||
-rw-r--r-- | finch/gntconn.h | 7 | ||||
-rw-r--r-- | finch/gntconv.h | 7 | ||||
-rw-r--r-- | finch/gntdebug.h | 7 | ||||
-rw-r--r-- | finch/gntidle.h | 7 | ||||
-rw-r--r-- | finch/gntmedia.h | 7 | ||||
-rw-r--r-- | finch/gntmenuutil.h | 7 | ||||
-rw-r--r-- | finch/gntnotify.h | 7 | ||||
-rw-r--r-- | finch/gntplugin.h | 12 | ||||
-rw-r--r-- | finch/gntprefs.h | 7 | ||||
-rw-r--r-- | finch/gntrequest.h | 7 | ||||
-rw-r--r-- | finch/gntstatus.h | 7 | ||||
-rw-r--r-- | finch/gntui.h | 7 | ||||
-rw-r--r-- | finch/gntxfer.h | 7 | ||||
-rw-r--r-- | finch/libfinch.h | 7 | ||||
-rw-r--r-- | finch/meson.build | 15 |
23 files changed, 91 insertions, 232 deletions
diff --git a/convey.yaml b/convey.yaml index a2a354bd1d..cadfb95cae 100644 --- a/convey.yaml +++ b/convey.yaml @@ -45,7 +45,7 @@ tasks: docs-export: type: docker/export files: - - build-docs/doc/reference/finch/html/:finch3-docs + - build-docs/doc/reference/finch/finch/:finch3-docs - build-docs/doc/reference/libpurple/html/:purple3-docs - build-docs/doc/reference/pidgin/html/:pidgin3-docs - build-docs/doc/reference/protocols/facebook/facebook/:facebook3-docs diff --git a/doc/reference/finch/finch-docs.xml b/doc/reference/finch/finch-docs.xml deleted file mode 100644 index c25e77b250..0000000000 --- a/doc/reference/finch/finch-docs.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ - -<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> -<!ENTITY version SYSTEM "version.xml"> -]> -<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> - <bookinfo> - <title>Finch Reference Manual</title> - <abstract> - <title>Finch &version;</title> - <para> - GNT (GLib Ncurses Toolkit) is an ncurses toolkit for creating text-mode - graphical user interfaces in a fast and easy way. - </para> - <para> - Finch is a text-mode frontend to libpurple, built using libgnt. - </para> - </abstract> - </bookinfo> - - <part id="finch"> - <title>Finch API Reference</title> - - <xi:include href="xml/gntaccount.xml" /> - <xi:include href="xml/gntblist.xml" /> - <xi:include href="xml/gntconn.xml" /> - <xi:include href="xml/gntconv.xml" /> - <xi:include href="xml/gntdebug.xml" /> - <xi:include href="xml/gntxfer.xml" /> - <xi:include href="xml/gntidle.xml" /> - <xi:include href="xml/gntmedia.xml" /> - <xi:include href="xml/gntmenuutil.xml" /> - <xi:include href="xml/gntnotify.xml" /> - <xi:include href="xml/gntplugin.xml" /> - <xi:include href="xml/gntprefs.xml" /> - <xi:include href="xml/gntrequest.xml" /> - <xi:include href="xml/gntroomlist.xml" /> - <xi:include href="xml/gntstatus.xml" /> - <xi:include href="xml/gntui.xml" /> - <xi:include href="xml/finch.xml" /> - </part> - - <part> - <title>Appendices</title> - - <index id="api-index-full"> - <title>API Index</title> - <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include> - </index> - - <index id="api-deprecated"> - <title>Index of deprecated symbols</title> - <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include> - </index> - - <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> - </part> -</book> diff --git a/doc/reference/finch/finch.toml.in b/doc/reference/finch/finch.toml.in new file mode 100644 index 0000000000..331f588c94 --- /dev/null +++ b/doc/reference/finch/finch.toml.in @@ -0,0 +1,48 @@ +[library] +version = "@PURPLE_VERSION@" +browse_url = "https://keep.imfreedom.org/pidgin/pidgin/" +repository_url = "https://keep.imfreedom.org/pidgin/pidgin/" +website_url = "https://keep.imfreedom.org/pidgin/pidgin/" +authors = "Pidgin Developers" +logo_url = "" +license = "GPL-2.0-or-later" +description = "Finch Universal Chat Client" +dependencies = [ "GLib-2.0", "GObject-2.0", "GModule-2.0", "Gnt-3.0", "Purple-3.0" ] +devhelp = true +search_index = true + + [dependencies."GLib-2.0"] + name = "GLib" + description = "General-purpose, portable utility library." + docs_url = "https://docs.gtk.org/glib/" + + [dependencies."GObject-2.0"] + name = "GObject" + description = "The base type system library" + docs_url = "https://docs.gtk.org/gobject/" + + [dependencies."Gnt-3.0"] + name = "Gnt" + description = "GLib NCurses Toolkit" + docs_url = "https://docs.imfreedom.org/gnt3/" + + [dependencies."Purple-3.0"] + name = "Purple" + description = "Purple Universal Chat Library" + docs_url = "https://docs.imfreedom.org/purple3/" + +[theme] +name = "basic" +show_index_summary = true +show_class_hierarchy = true + +[source-location] +base_url = "https://keep.imfreedom.org/pidgin/pidgin/file/default/" + +[extra] +# The same order will be used when generating the index +content_files = [ +] +content_images = [ +] +urlmap_file = "urlmap.js" diff --git a/doc/reference/finch/meson.build b/doc/reference/finch/meson.build index f97c2afbed..baa6a06d92 100644 --- a/doc/reference/finch/meson.build +++ b/doc/reference/finch/meson.build @@ -1,39 +1,32 @@ -DOC_MODULE = 'finch' +finch_doc_content_files = [] -# Header files or dirs to ignore when scanning. Use base file/dir names -ignore_hfiles = [ - 'plugins', -] +if get_option('doc') + finch_toml = configure_file( + input : 'finch.toml.in', + output : 'finch.toml', + configuration : version_conf, + install : true, + install_dir : docs_dir / 'finch', + ) -# Extra options to supply to gtkdoc-scan. -scan_args = [ - '--deprecated-guards=PURPLE_DISABLE_DEPRECATED|GNT_DISABLE_DEPRECATED|FINCH_DISABLE_DEPRECATED', - '--rebuild-types', - '--rebuild-sections', - '--ignore-headers=' + ' '.join(ignore_hfiles), -] + finch_doc = custom_target('finch-doc', + input : [ finch_toml, libfinch_gir ], + output : 'finch', + command : [ + gidocgen, + 'generate', + '--quiet', + '--fatal-warnings', + '--config=@INPUT0@', + '--output-dir=@OUTPUT@', + '--no-namespace-dir', + '--content-dir=@0@'.format(meson.current_source_dir()), + '@INPUT1@' + ], + depend_files : [ finch_doc_content_files ], + build_by_default : true, + install : true, + install_dir : docs_dir, + ) +endif -# Extra options to supply to gtkdoc-mkdb. -mkdb_args = [ - '--ignore-files=' + ' '.join(ignore_hfiles), -] - -# Extra options to supply to fixxrefs -fixxref_args = [ - '--extra-dir=../libpurple', -] - -configure_file( - input : 'version.xml.in', - output : 'version.xml', - configuration : version_conf) - -finch_doc = gnome.gtkdoc(DOC_MODULE, - main_xml : DOC_MODULE + '-docs.xml', - src_dir : libfinch_inc, - dependencies : libfinch_dep, - install : true, - scan_args : scan_args, - mkdb_args : mkdb_args, - fixxref_args : fixxref_args, - gobject_typesfile : DOC_MODULE + '.types') diff --git a/doc/reference/finch/urlmap.js b/doc/reference/finch/urlmap.js new file mode 100644 index 0000000000..fa6425ba25 --- /dev/null +++ b/doc/reference/finch/urlmap.js @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2021 GNOME Foundation +// SPDX-License-Identifier: LGPL-2.1-or-later + +// A map between namespaces and base URLs for their online documentation +baseURLs = [ + [ 'GLib', 'https://docs.gtk.org/glib/' ], + [ 'GObject', 'https://docs.gtk.org/gobject/' ], + [ 'Gnt3', 'https://docs.imfreedom.org/gnt3/' ], + [ 'Purple3', 'https://docs.imfreedom.org/purple3/' ], +] diff --git a/doc/reference/finch/version.xml.in b/doc/reference/finch/version.xml.in deleted file mode 100644 index 405528f9af..0000000000 --- a/doc/reference/finch/version.xml.in +++ /dev/null @@ -1 +0,0 @@ -@PURPLE_VERSION@ diff --git a/finch/gntaccount.h b/finch/gntaccount.h index 66d0aff058..819d5f54d8 100644 --- a/finch/gntaccount.h +++ b/finch/gntaccount.h @@ -27,13 +27,6 @@ #ifndef FINCH_ACCOUNT_H #define FINCH_ACCOUNT_H -/** - * SECTION:gntaccount - * @section_id: finch-gntaccount - * @short_description: <filename>gntaccount.h</filename> - * @title: Account API - */ - #include <purple.h> /********************************************************************** diff --git a/finch/gntblist.h b/finch/gntblist.h index 75e2cf238d..7b93ed42f6 100644 --- a/finch/gntblist.h +++ b/finch/gntblist.h @@ -27,13 +27,6 @@ #ifndef FINCH_BLIST_H #define FINCH_BLIST_H -/** - * SECTION:gntblist - * @section_id: finch-gntblist - * @short_description: <filename>gntblist.h</filename> - * @title: Buddy List API - */ - #include <purple.h> #include <gnt.h> @@ -74,11 +67,6 @@ struct _FinchBlistManager gpointer reserved[4]; }; -/** - * finch_blist_manager_get_type: - * - * Returns: The #GType for the #FinchBlistManager boxed structure. - */ GType finch_blist_manager_get_type(void); G_DECLARE_FINAL_TYPE(FinchBuddyList, finch_buddy_list, FINCH, BUDDY_LIST, diff --git a/finch/gntconn.h b/finch/gntconn.h index 0fd104edd8..56dbd36727 100644 --- a/finch/gntconn.h +++ b/finch/gntconn.h @@ -27,13 +27,6 @@ #ifndef FINCH_CONN_H #define FINCH_CONN_H -/** - * SECTION:gntconn - * @section_id: finch-gntconn - * @short_description: <filename>gntconn.h</filename> - * @title: Connection API - */ - #include <purple.h> /********************************************************************** diff --git a/finch/gntconv.h b/finch/gntconv.h index cdd95a896a..527a62f5ea 100644 --- a/finch/gntconv.h +++ b/finch/gntconv.h @@ -27,13 +27,6 @@ #ifndef FINCH_CONV_H #define FINCH_CONV_H -/** - * SECTION:gntconv - * @section_id: finch-gntconv - * @short_description: <filename>gntconv.h</filename> - * @title: Conversation API - */ - #include <gnt.h> #include <purple.h> diff --git a/finch/gntdebug.h b/finch/gntdebug.h index 7f0e011767..7d6e8af84a 100644 --- a/finch/gntdebug.h +++ b/finch/gntdebug.h @@ -27,13 +27,6 @@ #ifndef FINCH_DEBUG_H #define FINCH_DEBUG_H -/** - * SECTION:gntdebug - * @section_id: finch-gntdebug - * @short_description: <filename>gntdebug.h</filename> - * @title: Debug API - */ - #include <purple.h> G_BEGIN_DECLS diff --git a/finch/gntidle.h b/finch/gntidle.h index fefc24971d..d8bcddaff9 100644 --- a/finch/gntidle.h +++ b/finch/gntidle.h @@ -27,13 +27,6 @@ #ifndef FINCH_IDLE_H #define FINCH_IDLE_H -/** - * SECTION:gntidle - * @section_id: finch-gntidle - * @short_description: <filename>gntidle.h</filename> - * @title: Idle API - */ - #include <purple.h> /**************************************************************************/ diff --git a/finch/gntmedia.h b/finch/gntmedia.h index 36cf036b9f..cb0c6d9d50 100644 --- a/finch/gntmedia.h +++ b/finch/gntmedia.h @@ -27,13 +27,6 @@ #ifndef FINCH_MEDIA_H #define FINCH_MEDIA_H -/** - * SECTION:gntmedia - * @section_id: finch-gntmedia - * @short_description: <filename>gntmedia.h</filename> - * @title: Media API - */ - G_BEGIN_DECLS void finch_media_manager_init(void); diff --git a/finch/gntmenuutil.h b/finch/gntmenuutil.h index 05fc0c211f..46b5b30244 100644 --- a/finch/gntmenuutil.h +++ b/finch/gntmenuutil.h @@ -27,13 +27,6 @@ #ifndef FINCH_MENUUTIL_H #define FINCH_MENUUTIL_H -/** - * SECTION:gntmenuutil - * @section_id: finch-gntmenuutil - * @short_description: <filename>gntmenuutil.h</filename> - * @title: Menu Utility functions - */ - #include <purple.h> #include <gnt.h> diff --git a/finch/gntnotify.h b/finch/gntnotify.h index 33d427f7a7..1e61d59343 100644 --- a/finch/gntnotify.h +++ b/finch/gntnotify.h @@ -27,13 +27,6 @@ #ifndef FINCH_NOTIFY_H #define FINCH_NOTIFY_H -/** - * SECTION:gntnotify - * @section_id: finch-gntnotify - * @short_description: <filename>gntnotify.h</filename> - * @title: Notify API - */ - #include <purple.h> /********************************************************************** diff --git a/finch/gntplugin.h b/finch/gntplugin.h index 3132129ba8..5b073572ca 100644 --- a/finch/gntplugin.h +++ b/finch/gntplugin.h @@ -27,13 +27,6 @@ #ifndef FINCH_PLUGIN_H #define FINCH_PLUGIN_H -/** - * SECTION:gntplugin - * @section_id: finch-gntplugin - * @short_description: <filename>gntplugin.h</filename> - * @title: Plugin API - */ - #include <gnt.h> #include <purple.h> @@ -80,11 +73,6 @@ struct _FinchPluginInfoClass { * Plugin Info API **********************************************************************/ -/** - * finch_plugin_info_get_type: - * - * Returns: The #GType for the #FinchPluginInfo object. - */ GType finch_plugin_info_get_type(void); /** diff --git a/finch/gntprefs.h b/finch/gntprefs.h index d5c30f3183..28c8d5b67e 100644 --- a/finch/gntprefs.h +++ b/finch/gntprefs.h @@ -27,13 +27,6 @@ #ifndef FINCH_PREFS_H #define FINCH_PREFS_H -/** - * SECTION:gntprefs - * @section_id: finch-gntprefs - * @short_description: <filename>gntprefs.h</filename> - * @title: Preferences API - */ - /********************************************************************** * GNT Preferences API **********************************************************************/ diff --git a/finch/gntrequest.h b/finch/gntrequest.h index d4a13d2b5f..9af380f2cc 100644 --- a/finch/gntrequest.h +++ b/finch/gntrequest.h @@ -27,13 +27,6 @@ #ifndef FINCH_REQUEST_H #define FINCH_REQUEST_H -/** - * SECTION:gntrequest - * @section_id: finch-gntrequest - * @short_description: <filename>gntrequest.h</filename> - * @title: Request API - */ - #include <purple.h> #include "gnt.h" diff --git a/finch/gntstatus.h b/finch/gntstatus.h index 24b71e0db3..74f64f37a6 100644 --- a/finch/gntstatus.h +++ b/finch/gntstatus.h @@ -27,13 +27,6 @@ #ifndef FINCH_STATUS_H #define FINCH_STATUS_H -/** - * SECTION:gntstatus - * @section_id: finch-gntstatus - * @short_description: <filename>gntstatus.h</filename> - * @title: Status API - */ - #include <purple.h> /********************************************************************** diff --git a/finch/gntui.h b/finch/gntui.h index c37e07dc9a..36597cae56 100644 --- a/finch/gntui.h +++ b/finch/gntui.h @@ -27,13 +27,6 @@ #ifndef FINCH_UI_H #define FINCH_UI_H -/** - * SECTION:gntui - * @section_id: finch-gntui - * @short_description: <filename>gntui.h</filename> - * @title: Startup and Shutdown UI - */ - #include "gnt.h" void finch_ui_init(void); diff --git a/finch/gntxfer.h b/finch/gntxfer.h index 276a458544..3834fe5a8f 100644 --- a/finch/gntxfer.h +++ b/finch/gntxfer.h @@ -27,13 +27,6 @@ #ifndef FINCH_XFER_H #define FINCH_XFER_H -/** - * SECTION:gntxfer - * @section_id: finch-gntxfer - * @short_description: <filename>gntxfer.h</filename> - * @title: File Transfer UI - */ - #include <purple.h> /**************************************************************************/ diff --git a/finch/libfinch.h b/finch/libfinch.h index 00c0ecadbf..21ef2a2d33 100644 --- a/finch/libfinch.h +++ b/finch/libfinch.h @@ -32,13 +32,6 @@ #define FINCH_PREFS_ROOT "/finch" -/** - * SECTION:finch - * @section_id: finch-finch - * @short_description: <filename>libfinch.h</filename> - * @title: UI Definitions and Includes - */ - G_BEGIN_DECLS /** diff --git a/finch/meson.build b/finch/meson.build index 8e4e4c6faa..b2ea9d5634 100644 --- a/finch/meson.build +++ b/finch/meson.build @@ -195,26 +195,17 @@ if enable_consoleui if enable_introspection introspection_sources = libfinch_headers - Finch_gir_includes = [ - 'Gnt-3.0', - 'GPlugin-1.0', - # subproject needs to be before libpurple in the repo so that - # meson will use our variables and not try to discover them from - # libpurple. - libpurple_gir[0], - ] - libfinch_gir = gnome.generate_gir(libfinch, sources : introspection_sources, - includes : Finch_gir_includes, namespace : 'Finch', symbol_prefix : 'finch', + header : 'finch.h', identifier_prefix : 'Finch', - export_packages : 'finch', + export_packages : 'finch-3', nsversion : '@0@.@1@'.format(purple_major_version, purple_minor_version), install : true, - dependencies: [libgnt_dep, gplugin_dep], + dependencies: [libgnt_dep, gplugin_dep, libpurple], extra_args : ['-DFINCH_COMPILATION', '--quiet']) libfinch_generated_sources += libfinch_gir endif |