Fri, 10 Mar 2023 16:37:41 -0600
Make PurpleRequestFieldChoice into a GObject
This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff.
I wonder if this should implement `GListModel`, but the values are currently arbitrary pointers, so it won't work right now.
Testing Done:
Compiled and opened Request Fields from Demo protocol.
Reviewed at https://reviews.imfreedom.org/r/2335/
| 66 | 1 | /* |
| 15884 | 2 | * purple |
| 66 | 3 | * |
| 15884 | 4 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 6 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6478
diff
changeset
|
7 | * |
| 66 | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19769
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 66 | 21 | */ |
|
40441
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
22 | |
|
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
23 | #include <glib/gi18n-lib.h> |
|
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
24 | |
|
40853
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
25 | #include <purpleconversationuiops.h> |
|
12216
d80739091a63
[gaim-migrate @ 14518]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12018
diff
changeset
|
26 | |
|
40853
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
27 | /****************************************************************************** |
|
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
28 | * Helpers |
|
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
29 | *****************************************************************************/ |
| 35572 | 30 | static PurpleConversationUiOps * |
| 31 | purple_conversation_ui_ops_copy(PurpleConversationUiOps *ops) | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
32 | { |
| 35572 | 33 | PurpleConversationUiOps *ops_new; |
| 34 | ||
| 35 | g_return_val_if_fail(ops != NULL, NULL); | |
| 36 | ||
| 37 | ops_new = g_new(PurpleConversationUiOps, 1); | |
| 38 | *ops_new = *ops; | |
| 39 | ||
| 40 | return ops_new; | |
| 41 | } | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
42 | |
|
40853
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
43 | /****************************************************************************** |
|
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
44 | * Public API |
|
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40804
diff
changeset
|
45 | *****************************************************************************/ |
| 35572 | 46 | GType |
| 47 | purple_conversation_ui_ops_get_type(void) | |
| 48 | { | |
| 49 | static GType type = 0; | |
| 50 | ||
| 51 | if (type == 0) { | |
| 52 | type = g_boxed_type_register_static("PurpleConversationUiOps", | |
| 53 | (GBoxedCopyFunc)purple_conversation_ui_ops_copy, | |
|
35597
7fcfcf147b99
Use g_free as UiOps structures GBoxed free function
Ankit Vani <a@nevitus.org>
parents:
35572
diff
changeset
|
54 | (GBoxedFreeFunc)g_free); |
| 35572 | 55 | } |
| 56 | ||
| 57 | return type; | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
58 | } |