pidgin/resources/Prefs/proxy.ui

Fri, 16 Sep 2022 01:54:11 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 16 Sep 2022 01:54:11 -0500
changeset 41694
83e6692c76a3
parent 41657
c68748c1f42e
child 41856
3c3901fbe549
permissions
-rw-r--r--

Change the credential provider row active indicator to a CheckButton

Because I noticed that Adw has a style that is for this sort of thing.

Testing Done:
Opened Credential prefs, and changed selected provider. Also checked that clicking the check button didn't accidentally change its state without changing the row, and that it could not be selected by keyboard separately from the row.

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

<?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> -->
  <template class="PidginProxyPrefs" parent="AdwPreferencesPage">
    <child>
      <object class="AdwPreferencesGroup" id="gnome">
        <property name="title" translatable="1">Proxy Server</property>
        <property name="description" translatable="1">Proxy preferences are configured in GNOME preferences</property>
        <child>
          <object class="AdwActionRow" id="gnome_not_found">
            <property name="title" translatable="1">Proxy configuration program was not found.</property>
            <property name="css-classes">error</property>
          </object>
        </child>
        <child>
          <object class="AdwActionRow" id="gnome_program">
            <property name="activatable">1</property>
            <property name="title" translatable="1">Configure _Proxy</property>
            <property name="use-underline">1</property>
            <signal name="activated" handler="proxy_row_activated_cb" object="PidginProxyPrefs" swapped="no"/>
            <child>
              <object class="GtkImage">
                <property name="icon-name">go-next-symbolic</property>
                <property name="valign">center</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="AdwPreferencesGroup" id="nongnome">
        <property name="title" translatable="1">Proxy Server</property>
        <child>
          <object class="AdwComboRow" id="type">
            <property name="title" translatable="1">Proxy t_ype</property>
            <property name="use-subtitle">1</property>
            <property name="use-underline">1</property>
            <property name="model">
              <object class="GtkStringList">
                <items>
                  <item>none</item>
                  <item>socks4</item>
                  <item>socks5</item>
                  <item>tor</item>
                  <item>http</item>
                  <item>envvar</item>
                </items>
              </object>
            </property>
            <property name="expression">
              <closure type="gchararray" function="proxy_type_expression_cb"/>
            </property>
          </object>
        </child>
        <child>
          <object class="AdwPreferencesRow" id="options">
            <child>
              <object class="GtkListBox">
                <child>
                  <object class="AdwActionRow">
                    <property name="activatable-widget">host</property>
                    <property name="title" translatable="1">_Host</property>
                    <property name="use-underline">1</property>
                    <child>
                      <object class="GtkEntry" id="host">
                        <property name="focusable">1</property>
                        <property name="hexpand">1</property>
                        <property name="valign">center</property>
                        <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="AdwActionRow">
                    <property name="activatable-widget">port</property>
                    <property name="title" translatable="1">P_ort</property>
                    <property name="use-underline">1</property>
                    <child>
                      <object class="GtkSpinButton" id="port">
                        <property name="focusable">1</property>
                        <property name="text" translatable="1">0</property>
                        <property name="adjustment">
                          <object class="GtkAdjustment">
                            <property name="upper">65535</property>
                            <property name="step-increment">1</property>
                            <property name="page-increment">10</property>
                          </object>
                        </property>
                        <property name="numeric">1</property>
                        <property name="hexpand">1</property>
                        <property name="valign">center</property>
                        <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="AdwActionRow">
                    <property name="activatable-widget">username</property>
                    <property name="title" translatable="1">User_name</property>
                    <property name="use-underline">1</property>
                    <child>
                      <object class="GtkEntry" id="username">
                        <property name="focusable">1</property>
                        <property name="hexpand">1</property>
                        <property name="valign">center</property>
                        <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="AdwActionRow">
                    <property name="activatable-widget">password</property>
                    <property name="title" translatable="1">Pa_ssword</property>
                    <property name="use-underline">1</property>
                    <child>
                      <object class="GtkPasswordEntry" id="password">
                        <property name="focusable">1</property>
                        <property name="hexpand">1</property>
                        <property name="show-peek-icon">1</property>
                        <property name="valign">center</property>
                        <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>

mercurial