pidgin/resources/conversationmember.ui

changeset 43163
b650ebd3e157
child 43196
5f82cfe4e2c5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/conversationmember.ui	Wed Jan 29 00:47:33 2025 -0600
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Pidgin - Internet Messenger
+Copyright (C) Pidgin Developers <devel@pidgin.im>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this library; if not, see <https://www.gnu.org/licenses/>.
+-->
+<interface>
+  <requires lib="gtk" version="4.0"/>
+  <template class="PidginConversationMember">
+    <property name="orientation">horizontal</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkImage" id="avatar">
+        <property name="icon-name">image-missing</property>
+        <property name="icon-size">normal</property>
+        <property name="visible">0</property>
+      </object>
+    </child>
+    <child>
+      <object class="PidginBadges">
+        <binding name="badges">
+          <lookup name="badges" type="PurpleConversationMember">
+            <lookup name="conversation-member">PidginConversationMember</lookup>
+          </lookup>
+        </binding>
+        <binding name="visible">
+          <closure type="gboolean" function="pidgin_conversation_member_show_badges_cb">
+            <!-- If we don't do this look up the struct member isn't set for
+                 some reason. This seems to only happen with closures.
+              -->
+            <lookup name="conversation-member">PidginConversationMember</lookup>
+          </closure>
+        </binding>
+      </object>
+    </child>
+    <child>
+      <object class="GtkLabel">
+        <binding name="label">
+          <closure type="gchararray" function="pidgin_conversation_member_get_name_for_display">
+            <!-- If we don't do this look up the struct member isn't set for
+                 some reason. This seems to only happen with closures.
+              -->
+            <lookup name="conversation-member">PidginConversationMember</lookup>
+          </closure>
+        </binding>
+        <binding name="attributes">
+          <closure type="PangoAttrList" function="pidgin_conversation_member_attributes">
+            <!-- If we don't do this look up the struct member isn't set for
+                 some reason. This seems to only happen with closures.
+              -->
+            <lookup name="conversation-member">PidginConversationMember</lookup>
+          </closure>
+        </binding>
+      </object>
+    </child>
+  </template>
+</interface>

mercurial