Wed, 24 Aug 2022 21:18:06 -0500
Remove the custom css setup for now as it's throwing a GWarning and we need to plan this out more.
Testing Done:
Ran and verified the warning was gone.
Reviewed at https://reviews.imfreedom.org/r/1636/
|
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> |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
33 | #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
|
34 | |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | G_BEGIN_DECLS |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | #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
|
38 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | G_DECLARE_FINAL_TYPE(PidginProtocolChooser, pidgin_protocol_chooser, PIDGIN, |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | PROTOCOL_CHOOSER, GtkComboBox) |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | /** |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * pidgin_protocol_chooser_new: |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * Creates a combo box for a user to select a protocol from. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * Returns: (transfer full): The protocol chooser combo box. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | * Since: 3.0.0 |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | */ |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | 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
|
52 | |
|
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 | * pidgin_protocol_chooser_get_selected: |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * @chooser: The #PidginProtocolChooser instance. |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
57 | * 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
|
58 | * |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
59 | * Returns: (transfer full): The selected #PurpleProtocol or %NULL if nothing |
|
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
60 | * is selected |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * Since: 3.0.0 |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | */ |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
64 | PurpleProtocol *pidgin_protocol_chooser_get_selected(PidginProtocolChooser *chooser); |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | /** |
|
40741
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
67 | * pidgin_protocol_chooser_get_selected_id: |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | * @chooser: The #PidginProtocolChooser instance. |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
69 | * |
|
40741
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
70 | * Gets the id of the currently selected protocol from @chooser. |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
71 | * |
|
41187
3d60432b8a05
Clean up some stuff in PidginProtocolChooser.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
72 | * Returns: The id of the selected #PurpleProtocol or %NULL if nothing is |
|
3d60432b8a05
Clean up some stuff in PidginProtocolChooser.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
73 | * selected. |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
74 | * |
|
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
75 | * Since: 3.0.0 |
|
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
76 | */ |
|
41187
3d60432b8a05
Clean up some stuff in PidginProtocolChooser.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
77 | const gchar *pidgin_protocol_chooser_get_selected_id(PidginProtocolChooser *chooser); |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
78 | |
|
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
79 | /** |
|
40741
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
80 | * pidgin_protocol_chooser_set_selected_id: |
|
40299
e2f8638bac5a
Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents:
40297
diff
changeset
|
81 | * @chooser: The #PidginProtocolChooser instance. |
|
40741
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
82 | * @id: The id of the protocol to select. |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * |
|
40741
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
84 | * Sets the currently selected protocol of @chooser to the #PurpleProtocol with |
|
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
85 | * an id of @id. |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * Since: 3.0.0 |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | */ |
|
40741
850137e8737c
Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
89 | void pidgin_protocol_chooser_set_selected_id(PidginProtocolChooser *chooser, const gchar *id); |
|
40297
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | G_END_DECLS |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | |
|
082c07053a79
Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | #endif /* PIDGIN_PROTOCOL_CHOOSER_H */ |