pidgin/resources/Prefs/network.ui

Fri, 26 Aug 2022 00:57:06 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 26 Aug 2022 00:57:06 -0500
branch
gtk4
changeset 41602
7a52387e60ae
parent 41581
732b1fcb8e31
child 41623
78cf94d0f8c8
permissions
-rw-r--r--

Use GtkPasswordEntry for passwords

This assumes that entries in a `PurpleRequest` that are masked really mean they are asking for passwords.

Testing Done:
Added a new account so that it prompted for password, checked proxy settings in Preferences, as well as in account settings.

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

<?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="ports_range_end.adjustment">
    <property name="upper">65535</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <object class="GtkAdjustment" id="ports_range_start.adjustment">
    <property name="upper">65535</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <object class="GtkAdjustment" id="turn_port_tcp.adjustment">
    <property name="upper">65535</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <object class="GtkAdjustment" id="turn_port_udp.adjustment">
    <property name="upper">65535</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <template class="PidginNetworkPrefs" parent="AdwPreferencesPage">
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="1">IP Address</property>
        <child>
          <object class="GtkBox">
            <property name="margin-start">12</property>
            <property name="orientation">vertical</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkBox">
                <property name="spacing">6</property>
                <child>
                  <object class="GtkLabel" id="label8">
                    <property name="label" translatable="1">ST_UN server:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">stun_server</property>
                  </object>
                </child>
                <child>
                  <object class="GtkEntry" id="stun_server">
                    <property name="halign">fill</property>
                    <property name="hexpand">1</property>
                    <property name="focusable">1</property>
                    <property name="placeholder-text" translatable="1">Example: stunserver.org</property>
                    <property name="input-purpose">url</property>
                    <child>
                      <object class="GtkEventControllerFocus">
                        <signal name="leave" handler="network_stun_server_changed_cb" object="stun_server" swapped="no"/>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkCheckButton" id="auto_ip">
                <property name="label" translatable="1">Use _automatically detected IP address</property>
                <property name="focusable">1</property>
                <property name="use-underline">1</property>
                <signal name="toggled" handler="auto_ip_button_clicked_cb" after="yes" swapped="no"/>
              </object>
            </child>
            <child>
              <object class="GtkBox" id="public_ip_hbox">
                <property name="spacing">6</property>
                <child>
                  <object class="GtkLabel" id="label9">
                    <property name="label" translatable="1">Public _IP:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">public_ip</property>
                    <property name="xalign">0</property>
                  </object>
                </child>
                <child>
                  <object class="GtkEntry" id="public_ip">
                    <property name="focusable">1</property>
                    <signal name="changed" handler="network_ip_changed" swapped="no"/>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="1">Ports</property>
        <child>
          <object class="GtkBox">
            <property name="margin-start">12</property>
            <property name="orientation">vertical</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkCheckButton" id="map_ports">
                <property name="label" translatable="1">_Enable automatic router port forwarding</property>
                <property name="focusable">1</property>
                <property name="use-underline">1</property>
              </object>
            </child>
            <child>
              <object class="GtkBox">
                <property name="spacing">6</property>
                <child>
                  <object class="GtkCheckButton" id="ports_range_use">
                    <property name="label" translatable="1">_Manually specify range of ports to listen on:</property>
                    <property name="focusable">1</property>
                    <property name="use-underline">1</property>
                  </object>
                </child>
                <child>
                  <object class="GtkBox" id="ports_range_hbox">
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkLabel">
                        <property name="label" translatable="1">_Start:</property>
                        <property name="use-underline">1</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkSpinButton" id="ports_range_start">
                        <property name="focusable">1</property>
                        <property name="text" translatable="1">0</property>
                        <property name="adjustment">ports_range_start.adjustment</property>
                        <property name="numeric">1</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="label" translatable="1">_End:</property>
                        <property name="use-underline">1</property>
                        <property name="mnemonic-widget">ports_range_end</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkSpinButton" id="ports_range_end">
                        <property name="focusable">1</property>
                        <property name="text" translatable="1">0</property>
                        <property name="adjustment">ports_range_end.adjustment</property>
                        <property name="numeric">1</property>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="1">Relay Server (TURN)</property>
        <child>
          <object class="GtkBox">
            <property name="margin-start">12</property>
            <property name="orientation">vertical</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkBox">
                <property name="spacing">6</property>
                <child>
                  <object class="GtkLabel" id="label10">
                    <property name="label" translatable="1">_TURN server:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">turn_server</property>
                    <property name="xalign">0</property>
                  </object>
                </child>
                <child>
                  <object class="GtkEntry" id="turn_server">
                    <property name="focusable">1</property>
                    <child>
                      <object class="GtkEventControllerFocus">
                        <signal name="leave" handler="network_turn_server_changed_cb" swapped="no"/>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="label" translatable="1">_UDP Port:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">turn_port_udp</property>
                  </object>
                </child>
                <child>
                  <object class="GtkSpinButton" id="turn_port_udp">
                    <property name="focusable">1</property>
                    <property name="adjustment">turn_port_udp.adjustment</property>
                    <property name="numeric">1</property>
                  </object>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="label" translatable="1">T_CP Port:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">turn_port_tcp</property>
                  </object>
                </child>
                <child>
                  <object class="GtkSpinButton" id="turn_port_tcp">
                    <property name="focusable">1</property>
                    <property name="adjustment">turn_port_tcp.adjustment</property>
                    <property name="numeric">1</property>
                  </object>
                </child>
              </object>
            </child>
            <child>
              <object class="GtkBox">
                <property name="spacing">6</property>
                <child>
                  <object class="GtkLabel" id="label11">
                    <property name="label" translatable="1">Use_rname:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">turn_username</property>
                    <property name="xalign">0</property>
                  </object>
                </child>
                <child>
                  <object class="GtkEntry" id="turn_username">
                    <property name="focusable">1</property>
                  </object>
                </child>
                <child>
                  <object class="GtkLabel">
                    <property name="label" translatable="1">Pass_word:</property>
                    <property name="use-underline">1</property>
                    <property name="mnemonic-widget">turn_password</property>
                  </object>
                </child>
                <child>
                  <object class="GtkPasswordEntry" id="turn_password">
                    <property name="focusable">1</property>
                    <property name="show-peek-icon">1</property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
  <object class="GtkSizeGroup" id="sg">
    <widgets>
      <widget name="label8"/>
      <widget name="label9"/>
      <widget name="label10"/>
      <widget name="label11"/>
    </widgets>
  </object>
</interface>

mercurial