Thu, 25 Aug 2022 23:25:12 -0500
Replace the style-updated signal with GtkIconTheme:changed
Testing Done:
Ran and make sure the `GWarning` went away.
Reviewed at https://reviews.imfreedom.org/r/1653/
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * purple |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * Purple is the legal property of its developers, whose names are too numerous |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * source distribution. |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * (at your option) any later version. |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * GNU General Public License for more details. |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include "purpleuiinfo.h" |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | struct _PurpleUiInfo { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | GObject parent; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
28 | gchar *id; |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | gchar *name; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | gchar *version; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | gchar *website; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | gchar *support_website; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | gchar *client_type; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | }; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | enum { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | PROP_0, |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
38 | PROP_ID, |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | PROP_NAME, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | PROP_VERSION, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | PROP_WEBSITE, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | PROP_SUPPORT_WEBSITE, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | PROP_CLIENT_TYPE, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | N_PROPERTIES |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | }; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | static GParamSpec *properties[N_PROPERTIES] = { NULL, }; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | /****************************************************************************** |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | * Helpers |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | *****************************************************************************/ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | static void |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
52 | purple_ui_info_set_id(PurpleUiInfo *info, const gchar *id) { |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
53 | g_free(info->id); |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
54 | info->id = g_strdup(id); |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
55 | } |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
56 | |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
57 | static void |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | purple_ui_info_set_name(PurpleUiInfo *info, const gchar *name) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | g_free(info->name); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | info->name = g_strdup(name); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | purple_ui_info_set_version(PurpleUiInfo *info, const gchar *version) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | g_free(info->version); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | info->version = g_strdup(version); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | purple_ui_info_set_website(PurpleUiInfo *info, const gchar *website) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | g_free(info->website); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | info->website = g_strdup(website); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | purple_ui_info_set_support_website(PurpleUiInfo *info, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | const gchar *support_website) |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | g_free(info->support_website); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | info->support_website = g_strdup(support_website); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | purple_ui_info_set_client_type(PurpleUiInfo *info, const gchar *client_type) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | g_free(info->client_type); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | info->client_type = g_strdup(client_type); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | /****************************************************************************** |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | * GObject Implementation |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | *****************************************************************************/ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | G_DEFINE_TYPE(PurpleUiInfo, purple_ui_info, G_TYPE_OBJECT); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | purple_ui_info_get_property(GObject *obj, guint param_id, GValue *value, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | GParamSpec *pspec) |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | PurpleUiInfo *info = PURPLE_UI_INFO(obj); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | switch(param_id) { |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
101 | case PROP_ID: |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
102 | g_value_set_string(value, purple_ui_info_get_id(info)); |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
103 | break; |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | case PROP_NAME: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | g_value_set_string(value, purple_ui_info_get_name(info)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | case PROP_VERSION: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | g_value_set_string(value, purple_ui_info_get_version(info)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | case PROP_WEBSITE: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | g_value_set_string(value, purple_ui_info_get_website(info)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | case PROP_SUPPORT_WEBSITE: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | g_value_set_string(value, purple_ui_info_get_support_website(info)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | case PROP_CLIENT_TYPE: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | g_value_set_string(value, purple_ui_info_get_client_type(info)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | default: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | purple_ui_info_set_property(GObject *obj, guint param_id, const GValue *value, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | GParamSpec *pspec) |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | PurpleUiInfo *info = PURPLE_UI_INFO(obj); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | switch(param_id) { |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
132 | case PROP_ID: |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
133 | purple_ui_info_set_id(info, g_value_get_string(value)); |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
134 | break; |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
135 | case PROP_NAME: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | purple_ui_info_set_name(info, g_value_get_string(value)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | case PROP_VERSION: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | purple_ui_info_set_version(info, g_value_get_string(value)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | case PROP_WEBSITE: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
142 | purple_ui_info_set_website(info, g_value_get_string(value)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
143 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | case PROP_SUPPORT_WEBSITE: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
145 | purple_ui_info_set_support_website(info, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
146 | g_value_get_string(value)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
147 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
148 | case PROP_CLIENT_TYPE: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
149 | purple_ui_info_set_client_type(info, g_value_get_string(value)); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
150 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | default: |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
152 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
153 | break; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
155 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
157 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | purple_ui_info_init(PurpleUiInfo *info) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | purple_ui_info_finalize(GObject *obj) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | PurpleUiInfo *info = PURPLE_UI_INFO(obj); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
165 | g_clear_pointer(&info->id, g_free); |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | g_clear_pointer(&info->name, g_free); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | g_clear_pointer(&info->version, g_free); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | g_clear_pointer(&info->website, g_free); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | g_clear_pointer(&info->support_website, g_free); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | g_clear_pointer(&info->client_type, g_free); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | G_OBJECT_CLASS(purple_ui_info_parent_class)->finalize(obj); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | static void |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | purple_ui_info_class_init(PurpleUiInfoClass *klass) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | obj_class->get_property = purple_ui_info_get_property; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | obj_class->set_property = purple_ui_info_set_property; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
181 | obj_class->finalize = purple_ui_info_finalize; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | /** |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
184 | * PurpleUiInfo:id: |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
185 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
186 | * The identifier of the user interface. |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
187 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
188 | * Since: 3.0.0 |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
189 | */ |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
190 | properties[PROP_ID] = |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
191 | g_param_spec_string("id", "id", "The identifier of the user interface", |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
192 | NULL, |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
193 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
194 | G_PARAM_STATIC_STRINGS); |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
195 | |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
196 | /** |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
197 | * PurpleUiInfo:name: |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
198 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
199 | * The name of the user interface. |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
200 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
201 | * Since: 3.0.0 |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
202 | */ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | properties[PROP_NAME] = |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
204 | g_param_spec_string("name", "name", "The name of the user interface", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
205 | NULL, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
206 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
207 | G_PARAM_STATIC_STRINGS); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
208 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
209 | /** |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
210 | * PurpleUiInfo:version: |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
211 | * |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
212 | * The version of the user interface. |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
213 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
214 | * Since: 3.0.0 |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
215 | */ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
216 | properties[PROP_VERSION] = |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
217 | g_param_spec_string("version", "version", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
218 | "The version of the user interface", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
219 | NULL, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
220 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
221 | G_PARAM_STATIC_STRINGS); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
222 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
223 | /** |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
224 | * PurpleUiInfo:website: |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
225 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
226 | * The website of the user interface. |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
227 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
228 | * Since: 3.0.0 |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
229 | */ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
230 | properties[PROP_WEBSITE] = |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
231 | g_param_spec_string("website", "website", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
232 | "The website of the user interface", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
233 | NULL, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
234 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
235 | G_PARAM_STATIC_STRINGS); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
236 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
237 | /** |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
238 | * PurpleUiInfo:support-website: |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
239 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
240 | * The support website of the user interface. |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
241 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
242 | * Since: 3.0.0 |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
243 | */ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
244 | properties[PROP_SUPPORT_WEBSITE] = |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
245 | g_param_spec_string("support-website", "support-website", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
246 | "The support website of the user interface", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
247 | NULL, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
248 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
249 | G_PARAM_STATIC_STRINGS); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
250 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
251 | /** |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
252 | * PurpleUiInfo:client-type: |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
253 | * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
254 | * The client type of the user interface. |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
255 | * |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
256 | * Since: 3.0.0 |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
257 | */ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
258 | properties[PROP_CLIENT_TYPE] = |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
259 | g_param_spec_string("client-type", "client-type", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
260 | "The client type of the user interface", |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
261 | NULL, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
262 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
263 | G_PARAM_STATIC_STRINGS); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
264 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
265 | g_object_class_install_properties(obj_class, N_PROPERTIES, properties); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
266 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
267 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
268 | /****************************************************************************** |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
269 | * Public API |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
270 | *****************************************************************************/ |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
271 | PurpleUiInfo * |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
272 | purple_ui_info_new(const gchar *id, const gchar *name, |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
273 | const gchar *version, const gchar *website, |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
274 | const gchar *support_website, const gchar *client_type) |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
275 | { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
276 | return g_object_new(PURPLE_TYPE_UI_INFO, |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
277 | "id", id, |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
278 | "name", name, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
279 | "version", version, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
280 | "website", website, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
281 | "support-website", support_website, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
282 | "client-type", client_type, |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
283 | NULL); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
284 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
285 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
286 | const gchar * |
|
41396
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
287 | purple_ui_info_get_id(PurpleUiInfo *info) { |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
288 | g_return_val_if_fail(PURPLE_IS_UI_INFO(info), NULL); |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
289 | |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
290 | return info->id; |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
291 | } |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
292 | |
|
2ef3d6eeffb3
Update purple_core_init to take a PurpleUiInfo instance
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
293 | const gchar * |
|
40312
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
294 | purple_ui_info_get_name(PurpleUiInfo *info) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
295 | g_return_val_if_fail(PURPLE_IS_UI_INFO(info), NULL); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
296 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
297 | return info->name; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
298 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
299 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
300 | const gchar * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
301 | purple_ui_info_get_version(PurpleUiInfo *info) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
302 | g_return_val_if_fail(PURPLE_IS_UI_INFO(info), NULL); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
303 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
304 | return info->version; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
305 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
306 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
307 | const gchar * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
308 | purple_ui_info_get_website(PurpleUiInfo *info) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
309 | g_return_val_if_fail(PURPLE_IS_UI_INFO(info), NULL); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
310 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
311 | return info->website; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
312 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
313 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
314 | const gchar * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
315 | purple_ui_info_get_support_website(PurpleUiInfo *info) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
316 | g_return_val_if_fail(PURPLE_IS_UI_INFO(info), NULL); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
317 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
318 | return info->support_website; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
319 | } |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
320 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
321 | const gchar * |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
322 | purple_ui_info_get_client_type(PurpleUiInfo *info) { |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
323 | g_return_val_if_fail(PURPLE_IS_UI_INFO(info), NULL); |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
324 | |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
325 | return info->client_type; |
|
956745ff3ee8
Replace the ui info GHashTable with a gobject.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
326 | } |