pidgin/resources/ContactList/widget.ui

Sun, 19 Nov 2023 01:06:07 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 19 Nov 2023 01:06:07 -0600
changeset 42516
9ac4a8394577
parent 42304
51a419226147
child 42522
011b13928d5e
permissions
-rw-r--r--

Move the contact list item to its own ui file

This makes it easier to read instead of having an embedded ui file.

Testing Done:
Connected the demo account and verified the contacts were still displayed.

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

<?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"/>
  <requires lib="Adw" version="1.0"/>
  <requires lib="pidgin" version="3.0"/>
  <!-- interface-license-type gplv2 -->
  <!-- interface-name Pidgin -->
  <!-- interface-description Internet Messenger -->
  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
  <template class="PidginContactList" parent="GtkBox">
    <property name="orientation">vertical</property>
    <child>
      <object class="GtkSearchBar" id="search_bar">
        <property name="key-capture-widget">PidginContactList</property>
        <property name="show-close-button">1</property>
        <child>
          <object class="GtkSearchEntry" id="search_entry">
            <signal name="search-changed" handler="pidgin_contact_list_search_changed_cb"/>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="GtkListView" id="view">
        <property name="hexpand">1</property>
        <property name="vexpand">1</property>
        <property name="factory">
          <object class="GtkBuilderListItemFactory">
            <property name="resource">/im/pidgin/Pidgin3/contactlistitem.ui</property>
          </object>
        </property>
        <property name="model">
          <object class="GtkSingleSelection">
            <property name="autoselect">1</property>
            <property name="model">
              <object class="GtkFilterListModel" id="filter_model">
                <property name="incremental">0</property>
                <property name="filter">
                  <object class="GtkEveryFilter">
                    <child>
                      <object class="GtkCustomFilter" id="account_connected_filter"/>
                    </child>
                    <child>
                      <object class="GtkCustomFilter" id="search_filter"/>
                    </child>
                  </object>
                </property>
              </object>
            </property>
          </object>
        </property>
        <signal name="activate" handler="pidgin_contact_list_activate_cb"/>
      </object>
    </child>
  </template>
</interface>

mercurial