Thu, 21 Mar 2024 00:19:08 -0500
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/
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_ACCOUNT_MANAGER_H |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PIDGIN_ACCOUNT_MANAGER_H |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <gtk/gtk.h> |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
42465
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42151
diff
changeset
|
32 | #include "pidginversion.h" |
|
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42151
diff
changeset
|
33 | |
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | G_BEGIN_DECLS |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | /** |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * PidginAccountManager: |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * A singleton dialog for managing accounts. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
41 | * Since: 3.0 |
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | */ |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | #define PIDGIN_TYPE_ACCOUNT_MANAGER (pidgin_account_manager_get_type()) |
|
42465
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42151
diff
changeset
|
45 | |
|
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42151
diff
changeset
|
46 | PIDGIN_AVAILABLE_IN_3_0 |
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | G_DECLARE_FINAL_TYPE(PidginAccountManager, pidgin_account_manager, PIDGIN, |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | ACCOUNT_MANAGER, GtkDialog) |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | /** |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * pidgin_account_manager_new: |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * Creates a new account manager dialog. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | * |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * Returns: (transfer full): The dialog. |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
57 | * Since: 3.0 |
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | */ |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42465
diff
changeset
|
59 | PIDGIN_AVAILABLE_IN_3_0 |
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | GtkWidget *pidgin_account_manager_new(void); |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | |
|
42151
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
62 | /** |
|
42649
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
63 | * pidgin_account_manager_show_overview: |
|
42151
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
64 | * @manager: The instance. |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
65 | * |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
66 | * Switches @manager to the overview page. This is useful as @manager might |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
67 | * already be visible but editing an account. |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
68 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
69 | * Since: 3.0 |
|
42151
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
70 | */ |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42465
diff
changeset
|
71 | PIDGIN_AVAILABLE_IN_3_0 |
|
42151
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
72 | void pidgin_account_manager_show_overview(PidginAccountManager *manager); |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
73 | |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
74 | /** |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
75 | * pidgin_account_manager_edit_account: |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
76 | * @manager: The instance. |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
77 | * @account: The account to edit. |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
78 | * |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
79 | * Opens the account editor in @manager for the given account. |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
80 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
81 | * Since: 3.0 |
|
42151
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
82 | */ |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42465
diff
changeset
|
83 | PIDGIN_AVAILABLE_IN_3_0 |
|
42151
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
84 | void pidgin_account_manager_edit_account(PidginAccountManager *manager, PurpleAccount *account); |
|
41b9c5be8965
Embed PidginAccountEditor into PidginAccountManager
Gary Kramlich <grim@reaperworld.com>
parents:
41310
diff
changeset
|
85 | |
|
41310
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | G_END_DECLS |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | |
|
53e4815ef254
Create a new PidginAccountManager that replaces the manually built one.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | #endif /* PIDGIN_ACCOUNT_MANAGER_H */ |