Thu, 25 Jul 2024 20:53:42 -0500
Use GTask.report_new_error in Purple.ProtocolConversation
Also remove the "empty" `_finish` tests as they don't really make sense now.
Also fixed a few bugs along the way.
Testing Done:
Ran the turtles and ran the `protocol_conversation` tests under valgrind.
Reviewed at https://reviews.imfreedom.org/r/3297/
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | <!-- |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | Pidgin - Internet Messenger |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | This program is free software; you can redistribute it and/or |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | modify it under the terms of the GNU General Public License |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | as published by the Free Software Foundation; either version 2 |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | of the License, or (at your option) any later version. |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | This program is distributed in the hope that it will be useful, |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | GNU General Public License for more details. |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | You should have received a copy of the GNU General Public License |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | --> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | <interface> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | <requires lib="gtk" version="4.0"/> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | <template class="GtkListItem"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | <property name="child"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | <object class="GtkBox"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | <child> |
|
42500
8c3183cb6b7a
Only show the time stamps on messages when the cursor is in the row.
Gary Kramlich <grim@reaperworld.com>
parents:
42380
diff
changeset
|
25 | <object class="GtkEventControllerMotion" id="motion_controller"/> |
|
8c3183cb6b7a
Only show the time stamps on messages when the cursor is in the row.
Gary Kramlich <grim@reaperworld.com>
parents:
42380
diff
changeset
|
26 | </child> |
|
8c3183cb6b7a
Only show the time stamps on messages when the cursor is in the row.
Gary Kramlich <grim@reaperworld.com>
parents:
42380
diff
changeset
|
27 | <child> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | <object class="GtkImage" id="avatar"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | <property name="icon-name">image-missing</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | <property name="visible">0</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | <object class="GtkBox"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | <property name="hexpand">1</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | <property name="orientation">vertical</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | <object class="GtkBox"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | <property name="spacing">8</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | <object class="GtkLabel" id="author"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | <binding name="label"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | <lookup name="author" type="PurpleMessage"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | <lookup name="item">GtkListItem</lookup> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | </lookup> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | </binding> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | <binding name="attributes"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | <closure type="PangoAttrList" function="pidgin_conversation_get_author_attributes"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | <lookup name="item">GtkListItem</lookup> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | </closure> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | </binding> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | <object class="GtkLabel" id="timestamp"> |
|
42500
8c3183cb6b7a
Only show the time stamps on messages when the cursor is in the row.
Gary Kramlich <grim@reaperworld.com>
parents:
42380
diff
changeset
|
56 | <binding name="visible"> |
|
8c3183cb6b7a
Only show the time stamps on messages when the cursor is in the row.
Gary Kramlich <grim@reaperworld.com>
parents:
42380
diff
changeset
|
57 | <lookup name="contains-pointer">motion_controller</lookup> |
|
8c3183cb6b7a
Only show the time stamps on messages when the cursor is in the row.
Gary Kramlich <grim@reaperworld.com>
parents:
42380
diff
changeset
|
58 | </binding> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | <binding name="label"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | <closure type="gchararray" function="pidgin_converation_get_timestamp_string"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | <lookup name="item">GtkListItem</lookup> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | </closure> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | </binding> |
|
42350
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
64 | <property name="has-tooltip">1</property> |
|
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
65 | <signal name="query-tooltip" handler="pidgin_conversation_query_tooltip_timestamp_cb"/> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | <object class="GtkLabel" id="edited"> |
|
42350
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
70 | <binding name="visible"> |
|
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
71 | <lookup name="edited" type="PurpleMessage"> |
|
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
72 | <lookup name="item">GtkListItem</lookup> |
|
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
73 | </lookup> |
|
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
74 | </binding> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | <property name="label" translatable="yes">(edited)</property> |
|
42350
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
76 | <property name="has-tooltip">1</property> |
|
0d5319e4b836
Add tooltips to timestamps in PidginConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42346
diff
changeset
|
77 | <signal name="query-tooltip" handler="pidgin_conversation_query_tooltip_edited_cb"/> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | <object class="GtkLabel" id="content"> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | <property name="wrap">1</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | <property name="wrap-mode">word-char</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | <property name="xalign">0</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | <property name="yalign">0</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | <property name="use-markup">1</property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | <binding name="label"> |
|
42380
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
90 | <!-- this file is used by a GtkItemFactory in |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
91 | PidginConversation which is why the function name has a |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
92 | pidgin_conversation prefix. |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
93 | --> |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
94 | <closure type="gchararray" function="pidgin_conversation_process_message_contents_cb"> |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
95 | <lookup name="contents" type="PurpleMessage"> |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
96 | <lookup name="item">GtkListItem</lookup> |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
97 | </lookup> |
|
165c0b7f3860
Escape message content in Pidgin before displaying it
Gary Kramlich <grim@reaperworld.com>
parents:
42350
diff
changeset
|
98 | </closure> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | </binding> |
|
42531
82fffff36df6
If a message is an action format it with italics
Gary Kramlich <grim@reaperworld.com>
parents:
42500
diff
changeset
|
100 | <binding name="attributes"> |
|
82fffff36df6
If a message is an action format it with italics
Gary Kramlich <grim@reaperworld.com>
parents:
42500
diff
changeset
|
101 | <closure type="PangoAttrList" function="pidgin_conversation_get_message_attributes"> |
|
82fffff36df6
If a message is an action format it with italics
Gary Kramlich <grim@reaperworld.com>
parents:
42500
diff
changeset
|
102 | <lookup name="item">GtkListItem</lookup> |
|
82fffff36df6
If a message is an action format it with italics
Gary Kramlich <grim@reaperworld.com>
parents:
42500
diff
changeset
|
103 | </closure> |
|
82fffff36df6
If a message is an action format it with italics
Gary Kramlich <grim@reaperworld.com>
parents:
42500
diff
changeset
|
104 | </binding> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | </property> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | </template> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | </interface> |