Tue, 13 May 2025 00:44:44 -0500
Add a preference for toggling whether or not to show formatting
There is no user interface for this right now, but you can manually tweak the
setting in pidgin3.ini. This required turning off use-markup on the content
label because mixing attributes with that caused the label to never remove
attributes.
This means that we broke links which were being handled because
use-markup was true. To fix this, we're going to need to create a new widget
that can handle all of the link logic off of attributes intead.
Testing Done:
Joined an IRC channel and sent a message with formatting from Pidgin 2. Then toggled the setting via the file and verified that formatting was toggled correctly.
Also called in the turtles.
Bugs closed: PIDGIN-18081
Reviewed at https://reviews.imfreedom.org/r/3970/
|
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"/> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
21 | <template class="PidginMessage"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
22 | <property name="orientation">horizontal</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
23 | <child> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
24 | <object class="GtkEventControllerMotion" id="motion_controller"/> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
25 | </child> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
26 | <child> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | <object class="GtkBox"> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
28 | <property name="hexpand">1</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
29 | <property name="orientation">vertical</property> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | <child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | <object class="GtkBox"> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
32 | <property name="spacing">8</property> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | <child> |
|
43163
b650ebd3e157
Create a Pidgin.ConversationMember widget
Gary Kramlich <grim@reaperworld.com>
parents:
43125
diff
changeset
|
34 | <object class="PidginConversationMember"> |
|
b650ebd3e157
Create a Pidgin.ConversationMember widget
Gary Kramlich <grim@reaperworld.com>
parents:
43125
diff
changeset
|
35 | <binding name="conversation-member"> |
|
b650ebd3e157
Create a Pidgin.ConversationMember widget
Gary Kramlich <grim@reaperworld.com>
parents:
43125
diff
changeset
|
36 | <lookup name="author" type="PurpleMessage"> |
|
43125
06367e26ef2f
Hide the badges on Pidgin.Message when the user doesn't have any
Gary Kramlich <grim@reaperworld.com>
parents:
43103
diff
changeset
|
37 | <lookup name="message">PidginMessage</lookup> |
|
43163
b650ebd3e157
Create a Pidgin.ConversationMember widget
Gary Kramlich <grim@reaperworld.com>
parents:
43125
diff
changeset
|
38 | </lookup> |
|
42531
82fffff36df6
If a message is an action format it with italics
Gary Kramlich <grim@reaperworld.com>
parents:
42500
diff
changeset
|
39 | </binding> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | </child> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
42 | <child> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
43 | <object class="GtkLabel" id="edited"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
44 | <binding name="visible"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
45 | <lookup name="edited" type="PurpleMessage"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
46 | <lookup name="message">PidginMessage</lookup> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
47 | </lookup> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
48 | </binding> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
49 | <property name="label" translatable="yes">(edited)</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
50 | <property name="has-tooltip">1</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
51 | <signal name="query-tooltip" handler="pidgin_message_query_tooltip_edited_cb"/> |
|
43094
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
52 | <style> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
53 | <class name="dim-label"/> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
54 | </style> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
55 | </object> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
56 | </child> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
57 | <child> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
58 | <object class="GtkLabel" id="timestamp"> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
59 | <binding name="visible"> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
60 | <lookup name="contains_pointer">motion_controller</lookup> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
61 | </binding> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
62 | <binding name="label"> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
63 | <closure type="gchararray" function="pidgin_message_get_timestamp_string"> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
64 | <lookup name="message">PidginMessage</lookup> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
65 | </closure> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
66 | </binding> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
67 | <property name="has-tooltip">1</property> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
68 | <signal name="query-tooltip" handler="pidgin_message_query_tooltip_timestamp_cb"/> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
69 | </object> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
70 | </child> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
71 | </object> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
72 | </child> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
73 | <child> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
74 | <object class="GtkLabel" id="content"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
75 | <property name="wrap">1</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
76 | <property name="wrap-mode">word-char</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
77 | <property name="xalign">0</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
78 | <property name="yalign">0</property> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
79 | <binding name="label"> |
|
43248
55ff17a82093
Add a preference for toggling whether or not to show formatting
Gary Kramlich <grim@reaperworld.com>
parents:
43163
diff
changeset
|
80 | <lookup name="contents" type="PurpleMessage"> |
|
55ff17a82093
Add a preference for toggling whether or not to show formatting
Gary Kramlich <grim@reaperworld.com>
parents:
43163
diff
changeset
|
81 | <lookup name="message">PidginMessage</lookup> |
|
55ff17a82093
Add a preference for toggling whether or not to show formatting
Gary Kramlich <grim@reaperworld.com>
parents:
43163
diff
changeset
|
82 | </lookup> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
83 | </binding> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
84 | <binding name="attributes"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
85 | <closure type="PangoAttrList" function="pidgin_message_get_message_attributes"> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
86 | <lookup name="message">PidginMessage</lookup> |
|
43248
55ff17a82093
Add a preference for toggling whether or not to show formatting
Gary Kramlich <grim@reaperworld.com>
parents:
43163
diff
changeset
|
87 | <lookup name="show-formatting">PidginMessage</lookup> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
88 | </closure> |
|
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
89 | </binding> |
|
43094
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
90 | <property name="has-tooltip">1</property> |
|
4ff60371673f
A few updates for Pidgin.Message
Gary Kramlich <grim@reaperworld.com>
parents:
43093
diff
changeset
|
91 | <signal name="query-tooltip" handler="pidgin_message_query_tooltip_contents_cb"/> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | </object> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | </child> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | </object> |
|
43093
27f816a512af
Add a PidginMessage widget
Gary Kramlich <grim@reaperworld.com>
parents:
42905
diff
changeset
|
95 | </child> |
|
42346
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | </template> |
|
45d2756d2a14
Replace TalkatuHistory with our own implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | </interface> |