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/
|
40507
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * purple |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * Purple is the legal property of its developers, whose names are too numerous |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * source distribution. |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * (at your option) any later version. |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * GNU General Public License for more details. |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
40539
2941deda6d8d
Use an https link to gnu.org in the license file headers
Gary Kramlich <grim@reaperworld.com>
parents:
40507
diff
changeset
|
19 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
40507
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | */ |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #include "purpleprotocolim.h" |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | /****************************************************************************** |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | * GObject Implementation |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | *****************************************************************************/ |
|
41024
a2ad2d034162
Set the prereq type for all Protocol interfaces to PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
27 | G_DEFINE_INTERFACE(PurpleProtocolIM, purple_protocol_im, PURPLE_TYPE_PROTOCOL) |
|
40507
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | static void |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | purple_protocol_im_default_init(PurpleProtocolIMInterface *iface) { |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | } |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | /****************************************************************************** |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | * Public API |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | *****************************************************************************/ |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | gint |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | purple_protocol_im_send(PurpleProtocolIM *im, PurpleConnection *gc, |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | PurpleMessage *msg) |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | { |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | PurpleProtocolIMInterface *iface = NULL; |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_IM(im), -1); |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | iface = PURPLE_PROTOCOL_IM_GET_IFACE(im); |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | if(iface && iface->send) { |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | return iface->send(im, gc, msg); |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | } |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | return -1; |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | } |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | guint |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | purple_protocol_im_send_typing(PurpleProtocolIM *im, PurpleConnection *gc, |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | const gchar *name, PurpleIMTypingState state) |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | { |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | PurpleProtocolIMInterface *iface = NULL; |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_IM(im), 0); |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | iface = PURPLE_PROTOCOL_IM_GET_IFACE(im); |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | if(iface && iface->send_typing) { |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | return iface->send_typing(im, gc, name, state); |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | } |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | return 0; |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | } |
|
77d7bc9e5151
Make PurpleProtocolIM a proper interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 |