pidgin/pidgin

Add details to protocol chooser list

20 months ago, Elliott Sales de Andrade
ee44db31a1e3
Parents 83849603277b
Children 82d458ea7c87
Add details to protocol chooser list

Instead of inlining the `list-factory` on the `chooser.ui`, I put it in a separate file, in case for the new-account assistant we decide to go with a `GtkListBox`-type page.

It is mostly a copy of the `factory` version, but with the added details.

Testing Done:
Compiled and checked the protocol chooser list had details.

Reviewed at https://reviews.imfreedom.org/r/1768/
--- a/pidgin/resources/Protocols/chooser.ui Thu Sep 15 23:38:08 2022 -0500
+++ b/pidgin/resources/Protocols/chooser.ui Fri Sep 16 00:46:09 2022 -0500
@@ -63,6 +63,11 @@
</property>
</object>
</property>
+ <property name="list-factory">
+ <object class="GtkBuilderListItemFactory">
+ <property name="resource">/im/pidgin/Pidgin3/Protocols/detailed-view.ui</property>
+ </object>
+ </property>
<property name="model">
<object class="GtkSortListModel" id="sort">
<property name="sorter">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/Protocols/detailed-view.ui Fri Sep 16 00:46:09 2022 -0500
@@ -0,0 +1,70 @@
+<?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 domain="pidgin">
+ <requires lib="gtk" version="4.0"/>
+ <!-- interface-license-type gplv2 -->
+ <!-- interface-name Pidgin -->
+ <!-- interface-description Internet Messenger -->
+ <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
+ <template class="GtkListItem">
+ <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-size">large</property>
+ <binding name="icon-name">
+ <lookup name="icon-name" type="PurpleProtocol">
+ <lookup name="item">GtkListItem</lookup>
+ </lookup>
+ </binding>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="xalign">0</property>
+ <binding name="label">
+ <lookup name="name" type="PurpleProtocol">
+ <lookup name="item">GtkListItem</lookup>
+ </lookup>
+ </binding>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="css-classes">dim-label</property>
+ <property name="xalign">0</property>
+ <binding name="label">
+ <lookup name="description" type="PurpleProtocol">
+ <lookup name="item">GtkListItem</lookup>
+ </lookup>
+ </binding>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </template>
+</interface>
--- a/pidgin/resources/pidgin.gresource.xml Thu Sep 15 23:38:08 2022 -0500
+++ b/pidgin/resources/pidgin.gresource.xml Fri Sep 16 00:46:09 2022 -0500
@@ -36,6 +36,7 @@
<file compressed="true">Prefs/vv.ui</file>
<file compressed="true">Privacy/dialog.ui</file>
<file compressed="true">Protocols/chooser.ui</file>
+ <file compressed="true">Protocols/detailed-view.ui</file>
<file compressed="true">Roomlist/roomlist.ui</file>
<file compressed="true">Status/box.ui</file>
<file compressed="true">Status/editor.ui</file>