Sat, 09 Aug 2025 18:12:31 +0800
Add builtin library dependency for introspection
Without specifying, gir defaults to the system pidgin/purple libraries by default,
which fails the build when new symbols were added and gir failed to link for them.
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, write to the Free Software |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | */ |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | |
|
40502
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40300
diff
changeset
|
24 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40300
diff
changeset
|
25 | # error "only <pidgin.h> may be included directly" |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40300
diff
changeset
|
26 | #endif |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40300
diff
changeset
|
27 | |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #ifndef PIDGIN_PROTOCOL_CHOOSER_H |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #define PIDGIN_PROTOCOL_CHOOSER_H |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <gtk/gtk.h> |
|
41649
35733be03440
Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41645
diff
changeset
|
32 | #include <adwaita.h> |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
34 | #include <purple.h> |
|
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
35 | |
|
42465
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41691
diff
changeset
|
36 | #include "pidginversion.h" |
|
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41691
diff
changeset
|
37 | |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | G_BEGIN_DECLS |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
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
|
40 | /** |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
41 | * PidginProtocolChooser: |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
42 | * |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
43 | * A widget that lets the user choose a [class@Purple.Protocol]. |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
44 | * |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
45 | * Since: 3.0 |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
46 | */ |
|
6986f5428d30
Add a doc check unit test to Pidgin and fix the issues it found
Gary Kramlich <grim@reaperworld.com>
parents:
42620
diff
changeset
|
47 | |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | #define PIDGIN_TYPE_PROTOCOL_CHOOSER (pidgin_protocol_chooser_get_type()) |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
42465
b7d530551c1b
Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41691
diff
changeset
|
50 | PIDGIN_AVAILABLE_IN_3_0 |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | G_DECLARE_FINAL_TYPE(PidginProtocolChooser, pidgin_protocol_chooser, PIDGIN, |
|
41691
83849603277b
Convert PidginProtocolChooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41649
diff
changeset
|
52 | PROTOCOL_CHOOSER, AdwComboRow) |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | /** |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * pidgin_protocol_chooser_new: |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * |
|
41649
35733be03440
Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41645
diff
changeset
|
57 | * Creates a drop down for a user to select a protocol from. |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * |
|
43177
595a5f31003a
Annotate Pidgin constructors that return base types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42649
diff
changeset
|
59 | * Returns: (transfer full) (type PidginProtocolChooser): The protocol chooser |
|
595a5f31003a
Annotate Pidgin constructors that return base types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42649
diff
changeset
|
60 | * drop down. |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
62 | * Since: 3.0 |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | */ |
|
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
|
64 | PIDGIN_AVAILABLE_IN_3_0 |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | GtkWidget *pidgin_protocol_chooser_new(void); |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | /** |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
68 | * pidgin_protocol_chooser_get_protocol: |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | * @chooser: The #PidginProtocolChooser instance. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | * |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
71 | * Gets the currently selected protocol from @chooser. |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | * |
|
41649
35733be03440
Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41645
diff
changeset
|
73 | * Returns: (transfer none): The selected [class@Purple.Protocol] or %NULL if |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
74 | * nothing is selected. |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
76 | * Since: 3.0 |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | */ |
|
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
|
78 | PIDGIN_AVAILABLE_IN_3_0 |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
79 | PurpleProtocol *pidgin_protocol_chooser_get_protocol(PidginProtocolChooser *chooser); |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | /** |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
82 | * pidgin_protocol_chooser_set_protocol: |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * @chooser: The #PidginProtocolChooser instance. |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
84 | * @protocol: (transfer none): The protocol to select. |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
85 | * |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
86 | * Sets the currently selected protocol of @chooser to the given |
|
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
87 | * [class@Purple.Protocol]. |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
88 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
89 | * Since: 3.0 |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
90 | */ |
|
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
|
91 | PIDGIN_AVAILABLE_IN_3_0 |
|
41645
fb8bfbd95195
Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41187
diff
changeset
|
92 | void pidgin_protocol_chooser_set_protocol(PidginProtocolChooser *chooser, PurpleProtocol *protocol); |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | G_END_DECLS |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | #endif /* PIDGIN_PROTOCOL_CHOOSER_H */ |