pidgin/resources/Prefs/conversation.ui

Tue, 15 Oct 2024 00:47:42 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 15 Oct 2024 00:47:42 -0500
changeset 43011
ce3144e2bc33
parent 42094
2707c81648a0
child 43012
e34bd482a051
permissions
-rw-r--r--

Port prefs to AdwSwitchRow

Now that we depend on Adwaita 1.4, we can flip the switch on using these (pun intended).

This also simplifies some extra tracking we needed to do for activations and focus, since the Adwaita widgets do that for us.

Testing Done:
Opened prefs, confirmed all the switches were there, and toggled them all without any warnings.

Also used the mnemonics to toggle the switches from the keyboard.

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

<?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 program; if not, see <https://www.gnu.org/licenses/>.
-->
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="Adw" version="1.0"/>
  <!-- interface-license-type gplv2 -->
  <!-- interface-name Pidgin -->
  <!-- interface-description Internet Messenger -->
  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
  <object class="GtkAdjustment" id="minimum_entry_lines.adjustment">
    <property name="lower">1</property>
    <property name="upper">8</property>
    <property name="value">2</property>
    <property name="step-increment">1</property>
    <property name="page-increment">1</property>
  </object>
  <object class="GtkSizeGroup" id="iface.sg"/>
  <template class="PidginConversationPrefs" parent="AdwPreferencesPage">
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="1">Conversations</property>
        <child>
          <object class="AdwSwitchRow" id="show_incoming_formatting">
            <property name="title" translatable="1">Show _formatting on incoming messages</property>
            <property name="use-underline">1</property>
          </object>
        </child>
        <child>
          <object class="AdwSwitchRow" id="im.send_typing">
            <property name="title" translatable="1">_Notify buddies that you are typing to them</property>
            <property name="use-underline">1</property>
          </object>
        </child>
        <child>
          <object class="AdwSwitchRow" id="win32.blink_im">
            <property name="title" translatable="1">F_lash window when IMs are received</property>
            <property name="use-underline">1</property>
          </object>
        </child>
        <child>
          <object class="AdwActionRow">
            <property name="activatable-widget">minimum_entry_lines</property>
            <property name="title" translatable="1">Minimum input area height in lines</property>
            <property name="use-underline">1</property>
            <child>
              <object class="GtkSpinButton" id="minimum_entry_lines">
                <property name="focusable">1</property>
                <property name="adjustment">minimum_entry_lines.adjustment</property>
                <property name="numeric">1</property>
                <property name="valign">center</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>

mercurial