pidgin/resources/Conversations/conversation.ui

Thu, 25 Jul 2024 20:53:42 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 25 Jul 2024 20:53:42 -0500
changeset 42818
d8b4ef0aa09d
parent 42784
909476a9e569
child 42885
9b0cae94f406
permissions
-rw-r--r--

Use GTask.report_new_error in Purple.ProtocolConversation

Also remove the "empty" `_finish` tests as they don't really make sense now.

Also fixed a few bugs along the way.

Testing Done:
Ran the turtles and ran the `protocol_conversation` tests under valgrind.

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

<?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"/>
  <!-- interface-license-type gplv2 -->
  <!-- interface-name Pidgin -->
  <!-- interface-description Internet Messenger -->
  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
  <template class="PidginConversation" parent="GtkBox">
    <property name="orientation">vertical</property>
    <child>
      <object class="GtkBox">
        <property name="orientation">horizontal</property>
        <property name="vexpand">0</property>
        <child>
          <object class="PidginInfoPane" id="info_pane">
            <property name="hexpand">1</property>
            <binding name="title">
              <lookup name="title-for-display" type="PurpleConversation">
                <lookup name="conversation">PidginConversation</lookup>
              </lookup>
            </binding>
            <binding name="subtitle">
              <closure type="gchararray" function="pidgin_conversation_escape_topic">
                <lookup name="topic" type="PurpleConversation">
                  <lookup name="conversation">PidginConversation</lookup>
                </lookup>
              </closure>
            </binding>
            <binding name="tooltip-markup">
              <closure type="gchararray" function="pidgin_conversation_escape_topic">
                <lookup name="topic" type="PurpleConversation">
                  <lookup name="conversation">PidginConversation</lookup>
                </lookup>
              </closure>
            </binding>
            <property name="child">
              <object class="GtkBox">
                <property name="orientation">horizontal</property>
                <child>
                  <object class="GtkToggleButton" id="toggle_flap">
                    <property name="icon-name">view-dual-symbolic</property>
                    <property name="valign">center</property>
                  </object>
                </child>
              </object>
            </property>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="AdwFlap">
        <property name="flap-position">end</property>
        <property name="fold-policy">auto</property>
        <property name="swipe-to-close">1</property>
        <property name="swipe-to-open">1</property>
        <binding name="reveal-flap">
          <lookup name="active">toggle_flap</lookup>
        </binding>
        <child type="content">
          <object class="GtkScrolledWindow">
            <property name="hexpand">1</property>
            <property name="vadjustment">
              <object class="PidginAutoAdjustment" id="history_adjustment"/>
            </property>
            <property name="vexpand">1</property>
            <child>
              <object class="GtkListView" id="history">
                <property name="hexpand">1</property>
                <property name="vexpand">1</property>
                <property name="factory">
                  <object class="GtkBuilderListItemFactory">
                    <property name="resource">/im/pidgin/Pidgin3/Conversations/message.ui</property>
                  </object>
                </property>
                <property name="model">
                  <object class="GtkNoSelection">
                    <binding name="model">
                      <lookup name="messages" type="PurpleConversation">
                        <lookup name="conversation">PidginConversation</lookup>
                      </lookup>
                    </binding>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
        <child type="flap">
          <object class="GtkScrolledWindow">
            <property name="hscrollbar-policy">never</property>
            <property name="margin-bottom">6</property>
            <property name="margin-end">6</property>
            <property name="margin-start">6</property>
            <property name="margin-top">6</property>
            <property name="vscrollbar-policy">automatic</property>
            <style>
              <class name="sidebar"/>
            </style>
            <child>
              <object class="GtkListView">
                <property name="vexpand">1</property>
                <property name="factory">
                  <object class="GtkBuilderListItemFactory">
                    <property name="resource">/im/pidgin/Pidgin3/conversationmemberlistitem.ui</property>
                  </object>
                </property>
                <property name="model">
                  <object class="GtkSingleSelection">
                    <property name="autoselect">false</property>
                    <property name="model">
                      <object class="GtkSortListModel">
                        <property name="sorter">
                          <object class="GtkCustomSorter" id="memberlist_sorter"/>
                        </property>
                        <binding name="model">
                          <lookup name="members" type="PurpleConversation">
                            <lookup name="conversation">PidginConversation</lookup>
                          </lookup>
                        </binding>
                      </object>
                    </property>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="GtkSeparator"/>
    </child>
    <child>
      <object class="GtkScrolledWindow">
        <property name="vexpand">0</property>
        <child>
          <object class="GtkTextView" id="input">
            <property name="wrap-mode">word-char</property>
            <property name="input-purpose">free-form</property>
            <property name="input-hints">emoji|spellcheck|word-completion</property>
            <child>
              <object class="GtkEventControllerKey">
                <signal name="key-pressed" handler="pidgin_conversation_input_key_pressed_cb"/>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>

mercurial