pidgin/resources/ContactList/widget.ui

Fri, 10 Feb 2023 03:00:58 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Fri, 10 Feb 2023 03:00:58 -0600
changeset 42053
742efe62e610
parent 42052
e575534f450d
child 42059
e6dcbf0db616
permissions
-rw-r--r--

Add a name-for-display property to PurplePerson

This will first return the alias of the person if set. If there is no alias set
on the person but there is a priority contact info, the value of
purple_contact_info_get_name_for_display will be called on the priority contact
info, otherwise NULL will be returned.

Testing Done:
Verified everything looked right in the contact list and verified everything looked alright in the docs and ran the unit tests.

Reviewed at https://reviews.imfreedom.org/r/2205/

42011
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 <!--
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 Pidgin - Internet Messenger
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 Copyright (C) Pidgin Developers <devel@pidgin.im>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 This program is free software; you can redistribute it and/or
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 modify it under the terms of the GNU General Public License
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 as published by the Free Software Foundation; either version 2
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 of the License, or (at your option) any later version.
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 This program is distributed in the hope that it will be useful,
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 GNU General Public License for more details.
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 along with this library; if not, see <https://www.gnu.org/licenses/>.
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 -->
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 <interface domain="pidgin">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 <requires lib="gtk" version="4.0"/>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 <requires lib="Adw" version="1.0"/>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 <requires lib="pidgin" version="3.0"/>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 <!-- interface-license-type gplv2 -->
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 <!-- interface-name Pidgin -->
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 <!-- interface-description Internet Messenger -->
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 <template class="PidginContactList" parent="AdwBin">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 <child>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 <object class="GtkListView" id="view">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 <property name="factory">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 <object class="GtkBuilderListItemFactory">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 <property name="bytes">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 <![CDATA[
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 <?xml version="1.0" encoding="UTF-8"?>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 <interface>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 <template class="GtkListItem">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 <property name="child">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 <object class="GtkBox">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 <property name="orientation">horizontal</property>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 <property name="spacing">6</property>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 <child>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 <!-- switch to a PidginAvatar when that can take a PurpleAvatar -->
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 <object class="GtkImage" id="avatar">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 <property name="icon-size">large</property>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 <binding name="paintable">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 <closure type="GdkTexture" function="pidgin_contact_list_avatar_cb">
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 <lookup name="item">GtkListItem</lookup>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 </closure>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 </binding>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 </object>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 </child>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 <child>
42052
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
53 <object class="GtkBox">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
54 <property name="hexpand">1</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
55 <property name="orientation">vertical</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
56 <property name="vexpand">1</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
57 <property name="valign">center</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
58 <child>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
59 <object class="GtkLabel">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
60 <property name="xalign">0</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
61 <property name="use-markup">1</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
62 <binding name="label">
42053
742efe62e610 Add a name-for-display property to PurplePerson
Gary Kramlich <grim@reaperworld.com>
parents: 42052
diff changeset
63 <lookup name="name-for-display" type="PurplePerson">
742efe62e610 Add a name-for-display property to PurplePerson
Gary Kramlich <grim@reaperworld.com>
parents: 42052
diff changeset
64 <lookup name="item">GtkListItem</lookup>
42052
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
65 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
66 </binding>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
67 </object>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
68 </child>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
69 <child>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
70 <object class="GtkLabel" id="status_message">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
71 <style>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
72 <class name="dim-label"/>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
73 </style>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
74 <property name="xalign">0</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
75 <property name="ellipsize">end</property>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
76 <binding name="label">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
77 <lookup name="message" type="PurplePresence">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
78 <lookup name="presence" type="PurpleContactInfo">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
79 <lookup name="priority-contact-info" type="PurplePerson">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
80 <lookup name="item">GtkListItem</lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
81 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
82 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
83 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
84 </binding>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
85 <binding name="visible">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
86 <closure type="gboolean" function="pidgin_contact_list_message_visible_cb">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
87 <lookup name="message" type="PurplePresence">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
88 <lookup name="presence" type="PurpleContactInfo">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
89 <lookup name="priority-contact-info" type="PurplePerson">
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
90 <lookup name="item">GtkListItem</lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
91 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
92 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
93 </lookup>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
94 </closure>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
95 </binding>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
96 </object>
e575534f450d Add status-messages to PidginContactList
Gary Kramlich <grim@reaperworld.com>
parents: 42025
diff changeset
97 </child>
42011
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 </object>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 </child>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 </object>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 </property>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 </template>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 </interface>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 ]]>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 </property>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 </object>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 </property>
42025
f37c11d0200a Create new conversation when activating users in the new contact list
Gary Kramlich <grim@reaperworld.com>
parents: 42011
diff changeset
108 <signal name="activate" handler="pidgin_contact_list_activate_cb" swapped="no"/>
42011
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 </object>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 </child>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 </template>
bb38b9441073 Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 </interface>

mercurial