pidgin/pidgin

Parents 70d33d4dac09
Children 4577958c4c6a
Add a doc check unit test to Pidgin and fix the issues it found

Testing Done:
Ran the unit tests.

Reviewed at https://reviews.imfreedom.org/r/3043/
--- a/doc/reference/pidgin/meson.build Tue Mar 19 01:04:58 2024 -0500
+++ b/doc/reference/pidgin/meson.build Thu Mar 21 00:19:08 2024 -0500
@@ -34,5 +34,19 @@
install : true,
install_dir : docs_dir,
)
+
+ test('doc-check',
+ gidocgen,
+ args: [
+ 'check',
+ '--config', pidgin_toml,
+ '--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/birb/birb'),
+ '--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/gplugin/gplugin'),
+ '--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/gplugin/gplugin-gtk4'),
+ '--add-include-path=@0@'.format(meson.project_build_root() / 'libpurple'),
+ pidgin_gir[0],
+ ],
+ depends: [libpurple_gir[0], pidgin_gir[0]],
+ )
endif
--- a/doc/reference/pidgin/pidgin.toml.in Tue Mar 19 01:04:58 2024 -0500
+++ b/doc/reference/pidgin/pidgin.toml.in Thu Mar 21 00:19:08 2024 -0500
@@ -56,3 +56,27 @@
content_images = [
]
urlmap_file = "urlmap.js"
+
+[[object]]
+pattern = "DEPRECATED_IN_*"
+hidden = true
+
+[[object]]
+name = "DEPRECATED_FOR"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE_MACRO"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE_STATIC_INLINE"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE_TYPE"
+hidden = true
\ No newline at end of file
--- a/pidgin/gtkdialogs.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/gtkdialogs.h Thu Mar 21 00:19:08 2024 -0500
@@ -32,9 +32,25 @@
G_BEGIN_DECLS
+/**
+ * pidgin_dialogs_im_with_user:
+ * @account: The account.
+ * @username: The username.
+ *
+ * Creates an IM conversation with @username on @account if necessary.
+ *
+ * Since: 2.0
+ */
PIDGIN_AVAILABLE_IN_ALL
void pidgin_dialogs_im_with_user(PurpleAccount *account, const char *username);
+/**
+ * pidgin_dialogs_info:
+ *
+ * Creates a dialog to get another user's profile.
+ *
+ * Since: 2.0
+ */
PIDGIN_AVAILABLE_IN_ALL
void pidgin_dialogs_info(void);
--- a/pidgin/gtkmedia.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/gtkmedia.h Thu Mar 21 00:19:08 2024 -0500
@@ -30,6 +30,13 @@
G_BEGIN_DECLS
+/**
+ * pidgin_medias_init:
+ *
+ * Initializes the media API.
+ *
+ * Since: 2.6
+ */
PIDGIN_AVAILABLE_IN_2_6
void pidgin_medias_init(void);
--- a/pidgin/meson.build Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/meson.build Thu Mar 21 00:19:08 2024 -0500
@@ -125,11 +125,15 @@
'pidgin.c'
]
+libpidgin_built_sources = []
+
+libpidgin_built_headers = []
+
pidgin_resource = gnome.compile_resources('pidginresources',
'resources/pidgin.gresource.xml',
source_dir : 'resources',
c_name : 'pidgin')
-libpidgin_SOURCES += pidgin_resource
+libpidgin_built_sources += pidgin_resource
pidgin_filebase = 'pidgin-3'
pidgin_include_base = pidgin_filebase / 'pidgin'
@@ -197,10 +201,7 @@
install_headers(libpidgin_headers, subdir : pidgin_include_base)
install_headers(libpidgin_prefs_headers, subdir : pidgin_include_base / 'prefs')
-libpidgin_built_sources = [
-]
-
-libpidgin_built_headers = [
+libpidgin_built_headers += [
pidgin_h,
pidgin_version_h,
]
--- a/pidgin/pidginabout.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginabout.h Thu Mar 21 00:19:08 2024 -0500
@@ -33,6 +33,14 @@
G_BEGIN_DECLS
+/**
+ * PidginAboutDialog:
+ *
+ * A dialog window that describes what Pidgin is all about.
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_ABOUT_DIALOG (pidgin_about_dialog_get_type())
PIDGIN_AVAILABLE_IN_3_0
--- a/pidgin/pidginaccountchooser.c Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginaccountchooser.c Thu Mar 21 00:19:08 2024 -0500
@@ -109,11 +109,26 @@
obj_class->get_property = pidgin_account_chooser_get_property;
obj_class->set_property = pidgin_account_chooser_set_property;
+ /**
+ * PidginAccountChooser:account:
+ *
+ * The account that is currently selected.
+ *
+ * Since: 3.0
+ */
properties[PROP_ACCOUNT] = g_param_spec_object(
- "account", "Account", "The account that is currently selected.",
+ "account", "Account",
+ "The account that is currently selected.",
PURPLE_TYPE_ACCOUNT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ /**
+ * PidginAccountChooser:filter:
+ *
+ * A filter to be applied to the list of accounts.
+ *
+ * Since: 3.0
+ */
properties[PROP_FILTER] = g_param_spec_object(
"filter", "filter",
"The filter to be applied on the list of accounts.",
--- a/pidgin/pidginaccountchooser.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginaccountchooser.h Thu Mar 21 00:19:08 2024 -0500
@@ -35,6 +35,14 @@
G_BEGIN_DECLS
+/**
+ * PidginAccountChooser:
+ *
+ * A widget that allows the user to pick a [class@Purple.Account] from a list.
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_ACCOUNT_CHOOSER (pidgin_account_chooser_get_type())
PIDGIN_AVAILABLE_IN_3_0
--- a/pidgin/pidginaccountdisplay.c Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginaccountdisplay.c Thu Mar 21 00:19:08 2024 -0500
@@ -140,7 +140,7 @@
obj_class->finalize = pidgin_account_display_finalize;
/**
- * PurpleAccountDisplay:account:
+ * PidginAccountDisplay:account:
*
* The account that is currently displayed.
*
--- a/pidgin/pidginaccountdisplay.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginaccountdisplay.h Thu Mar 21 00:19:08 2024 -0500
@@ -35,6 +35,14 @@
G_BEGIN_DECLS
+/**
+ * PidginAccountDisplay:
+ *
+ * A widget that is used to display a [class@Purple.Account].
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_ACCOUNT_DISPLAY (pidgin_account_display_get_type())
PIDGIN_AVAILABLE_IN_3_0
--- a/pidgin/pidginaccountmanager.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginaccountmanager.h Thu Mar 21 00:19:08 2024 -0500
@@ -60,7 +60,7 @@
GtkWidget *pidgin_account_manager_new(void);
/**
- * pidgin_account_managet_show_overview:
+ * pidgin_account_manager_show_overview:
* @manager: The instance.
*
* Switches @manager to the overview page. This is useful as @manager might
--- a/pidgin/pidginaccountsdisabledmenu.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginaccountsdisabledmenu.h Thu Mar 21 00:19:08 2024 -0500
@@ -36,6 +36,15 @@
G_BEGIN_DECLS
+/**
+ * PidginAccountsDisabledMenu:
+ *
+ * A [class@Gio.MenuModel] that contains all accounts from the default
+ * [class@Purple.AccountManager] that are not enabled.
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_ACCOUNTS_DISABLED_MENU (pidgin_accounts_disabled_menu_get_type())
PIDGIN_AVAILABLE_IN_3_0
--- a/pidgin/pidgincore.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidgincore.h Thu Mar 21 00:19:08 2024 -0500
@@ -36,6 +36,13 @@
# include "win32/gtkwin32dep.h"
#endif
+/**
+ * PIDGIN_PREFS_ROOT:
+ *
+ * A constants for the root of the preferences tree.
+ *
+ * Since: 2.0
+ */
/* change this only when we have a sane upgrade path for old prefs */
#define PIDGIN_PREFS_ROOT "/pidgin"
@@ -61,6 +68,8 @@
*
* Start pidgin with the given command line arguments.
*
+ * Returns: The exit code for the program.
+ *
* Since: 3.0
*/
PIDGIN_AVAILABLE_IN_3_0
--- a/pidgin/pidgindebug.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidgindebug.h Thu Mar 21 00:19:08 2024 -0500
@@ -32,6 +32,14 @@
G_BEGIN_DECLS
+/**
+ * PidginDebugWindow:
+ *
+ * The debug window.
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_DEBUG_WINDOW (pidgin_debug_window_get_type())
PIDGIN_AVAILABLE_IN_3_0
@@ -52,8 +60,10 @@
/**
* pidgin_debug_set_print_enabled:
+ * @enable: Whether or not to use the default GLib logging handler.
*
- * Set whether the debug logging messages are sent the default GLib logging handler.
+ * Set whether the debug logging messages are sent the default GLib logging
+ * handler.
*
* This will print to the console, if Pidgin is run from there.
*
--- a/pidgin/pidgininvitedialog.c Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidgininvitedialog.c Thu Mar 21 00:19:08 2024 -0500
@@ -146,6 +146,13 @@
gtk_widget_class_bind_template_child(widget_class, PidginInviteDialog,
message);
+ /**
+ * PidginInviteDialog:contact:
+ *
+ * The [class@Purple.Contact] that is being invited.
+ *
+ * Since: 3.0
+ */
properties[PROP_CONTACT] = g_param_spec_string(
"contact",
"contact",
@@ -153,6 +160,13 @@
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+ /**
+ * PidginInviteDialog:message:
+ *
+ * A personalized message for the invite.
+ *
+ * Since: 3.0
+ */
properties[PROP_MESSAGE] = g_param_spec_string(
"message",
"message",
@@ -160,6 +174,13 @@
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+ /**
+ * PidginInviteDialog:conversation:
+ *
+ * The [class@Purple.Conversation] that the invite is for.
+ *
+ * Since: 3.0
+ */
properties[PROP_CONVERSATION] = g_param_spec_object(
"conversation",
"conversation",
--- a/pidgin/pidginnotificationauthorizationrequest.c Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginnotificationauthorizationrequest.c Thu Mar 21 00:19:08 2024 -0500
@@ -281,9 +281,9 @@
obj_class->dispose = pidgin_notification_authorization_request_dispose;
/**
- * PidginNotificationAuthorizationRequest:info:
+ * PidginNotificationAuthorizationRequest:notification:
*
- * The [type@Purple.AuthorizationRequestInfo] that this notification is for.
+ * The [class@Purple.Notification] that this notification is for.
*
* Since: 3.0
*/
--- a/pidgin/pidginprotocolchooser.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginprotocolchooser.h Thu Mar 21 00:19:08 2024 -0500
@@ -37,6 +37,14 @@
G_BEGIN_DECLS
+/**
+ * PidginProtocolChooser:
+ *
+ * A widget that lets the user choose a [class@Purple.Protocol].
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_PROTOCOL_CHOOSER (pidgin_protocol_chooser_get_type())
PIDGIN_AVAILABLE_IN_3_0
--- a/pidgin/pidginversion.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/pidginversion.h Thu Mar 21 00:19:08 2024 -0500
@@ -67,6 +67,26 @@
#endif
/**
+ * PIDGIN_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including the `pidgin.h`
+ * header.
+ *
+ * The definition should be one of the predefined Pidgin version macros:
+ * %PIDGIN_VERSION_3_0, %PIDGIN_VERSION_3_1, ...
+ *
+ * This macro defines the earliest version of Pidgin that the package is
+ * required to be able to compile against.
+ *
+ * If the compiler is configured to warn about the use of deprecated functions,
+ * then using functions that were deprecated in version
+ * %PIDGIN_VERSION_MIN_REQUIRED or earlier will cause warnings (but using
+ * functions deprecated in later releases will not).
+ *
+ * Since: 3.0
+ */
+
+/**
* PIDGIN_VERSION_CUR_STABLE:
*
* A macro that evaluates to the current stable version of Pidgin, in a format
--- a/pidgin/prefs/pidginprefs.h Tue Mar 19 01:04:58 2024 -0500
+++ b/pidgin/prefs/pidginprefs.h Thu Mar 21 00:19:08 2024 -0500
@@ -35,6 +35,14 @@
G_BEGIN_DECLS
+/**
+ * PidginPrefsWindow:
+ *
+ * The window that displays all of the preferences.
+ *
+ * Since: 3.0
+ */
+
#define PIDGIN_TYPE_PREFS_WINDOW (pidgin_prefs_window_get_type())
PIDGIN_AVAILABLE_IN_3_0