pidgin/resources/Prefs/proxy.ui

Tue, 23 Aug 2022 02:54:58 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 23 Aug 2022 02:54:58 -0500
branch
gtk4
changeset 41576
f8771a229df1
parent 41550
a1e1d5c248e4
child 41581
732b1fcb8e31
permissions
-rw-r--r--

Port account manager to GTK4

Testing Done:
Opened manager, clicked on all the dialog buttons, and checked for no warnings. Did not check that adding/removing, or changing options really worked.

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

<?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="port.adjustment">
    <property name="upper">65535</property>
    <property name="step-increment">1</property>
    <property name="page-increment">10</property>
  </object>
  <object class="GtkListStore" id="type.store">
    <columns>
      <!-- column-name text -->
      <column type="gchararray"/>
      <!-- column-name value -->
      <column type="gchararray"/>
    </columns>
    <data>
      <row>
        <col id="0" translatable="yes">No proxy</col>
        <col id="1">none</col>
      </row>
      <row>
        <col id="0" translatable="yes">SOCKS 4</col>
        <col id="1">socks4</col>
      </row>
      <row>
        <col id="0" translatable="yes">SOCKS 5</col>
        <col id="1">socks5</col>
      </row>
      <row>
        <col id="0" translatable="yes">Tor/Privacy (SOCKS 5)</col>
        <col id="1">tor</col>
      </row>
      <row>
        <col id="0" translatable="yes">HTTP</col>
        <col id="1">http</col>
      </row>
      <row>
        <col id="0" translatable="yes">Use Environmental Settings</col>
        <col id="1">envvar</col>
      </row>
    </data>
  </object>
  <template class="PidginProxyPrefs" parent="AdwPreferencesPage">
    <child>
      <object class="AdwPreferencesGroup">
        <property name="title" translatable="yes">Proxy Server</property>
        <child>
          <object class="GtkStack" id="stack">
            <property name="margin-start">12</property>
            <property name="hhomogeneous">0</property>
            <property name="vhomogeneous">0</property>
            <child>
              <object class="GtkStackPage">
                <property name="name">gnome</property>
                <property name="child">
                  <object class="GtkBox">
                    <property name="orientation">vertical</property>
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkLabel">
                        <property name="label" translatable="yes">Proxy preferences are configured in GNOME preferences</property>
                        <property name="xalign">0</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkBox">
                        <property name="spacing">6</property>
                        <child>
                          <object class="GtkLabel" id="gnome_not_found">
                            <property name="label" translatable="yes">Proxy configuration program was not found.</property>
                            <attributes>
                              <attribute name="weight" value="bold"></attribute>
                            </attributes>
                          </object>
                        </child>
                        <child>
                          <object class="GtkButton" id="gnome_program">
                            <property name="label" translatable="yes">Configure _Proxy</property>
                            <property name="focusable">1</property>
                            <property name="receives-default">1</property>
                            <property name="use-underline">1</property>
                            <signal name="clicked" handler="proxy_button_clicked_cb" object="PidginProxyPrefs" swapped="no"/>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="GtkStackPage">
                <property name="name">nongnome</property>
                <property name="position">1</property>
                <property name="child">
                  <object class="GtkBox">
                    <property name="orientation">vertical</property>
                    <property name="spacing">6</property>
                    <child>
                      <object class="GtkCheckButton" id="socks4_remotedns">
                        <property name="label" translatable="yes">Use remote _DNS with SOCKS4 proxies</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="GtkLabel">
                            <property name="label" translatable="yes">Proxy t_ype:</property>
                            <property name="use-underline">1</property>
                            <property name="mnemonic-widget">type.combo</property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkComboBox" id="type.combo">
                            <property name="model">type.store</property>
                            <child>
                              <object class="GtkCellRendererText"/>
                              <attributes>
                                <attribute name="text">0</attribute>
                              </attributes>
                            </child>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <!-- n-columns=4 n-rows=3 -->
                      <object class="GtkGrid" id="options">
                        <property name="row-spacing">10</property>
                        <property name="column-spacing">5</property>
                        <child>
                          <object class="GtkLabel">
                            <property name="label" translatable="yes">_Host:</property>
                            <property name="use-underline">1</property>
                            <property name="mnemonic-widget">host</property>
                            <property name="xalign">1</property>
                            <accessibility>
                              <relation type="label-for" target="host"/>
                            </accessibility>
                            <layout>
                              <property name="column">0</property>
                              <property name="row">0</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkEntry" id="host">
                            <property name="focusable">1</property>
                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                            <layout>
                              <property name="column">1</property>
                              <property name="row">0</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkLabel">
                            <property name="label" translatable="yes">P_ort:</property>
                            <property name="use-underline">1</property>
                            <property name="xalign">1</property>
                            <accessibility>
                              <relation type="label-for" target="port"/>
                            </accessibility>
                            <layout>
                              <property name="column">2</property>
                              <property name="row">0</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkSpinButton" id="port">
                            <property name="focusable">1</property>
                            <property name="text" translatable="yes">0</property>
                            <property name="adjustment">port.adjustment</property>
                            <property name="numeric">1</property>
                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                            <layout>
                              <property name="column">3</property>
                              <property name="row">0</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkLabel">
                            <property name="label" translatable="yes">User_name:</property>
                            <property name="use-underline">1</property>
                            <property name="mnemonic-widget">username</property>
                            <property name="xalign">1</property>
                            <layout>
                              <property name="column">0</property>
                              <property name="row">1</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkEntry" id="username">
                            <property name="focusable">1</property>
                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                            <layout>
                              <property name="column">1</property>
                              <property name="row">1</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkLabel">
                            <property name="label" translatable="yes">Pa_ssword:</property>
                            <property name="use-underline">1</property>
                            <property name="mnemonic-widget">password</property>
                            <property name="xalign">1</property>
                            <accessibility>
                              <relation type="label-for" target="password"/>
                            </accessibility>
                            <layout>
                              <property name="column">2</property>
                              <property name="row">1</property>
                            </layout>
                          </object>
                        </child>
                        <child>
                          <object class="GtkEntry" id="password">
                            <property name="focusable">1</property>
                            <property name="visibility">0</property>
                            <property name="invisible-char">●</property>
                            <property name="input-purpose">password</property>
                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
                            <layout>
                              <property name="column">3</property>
                              <property name="row">1</property>
                            </layout>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>

mercurial