Sat, 29 Oct 2022 01:14:13 -0500
Convert PidginProxyPrefs to Adwaita 1.2
Testing Done:
Set all the values via the ui and the config file and tested bad values in the port in both as well. Bad values in the ui will store whatever atoi returned, but bad values in the config file will fallback to the default.
Reviewed at https://reviews.imfreedom.org/r/1996/
<?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.2"/> <!-- 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> <property name="focusable">0</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="focusable">1</property> <property name="model"> <object class="GtkStringList"> <items> <!-- the order of this list must be consistent with prefs/pidginproxyprefs.c at all times. --> <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"> <property name="focusable">0</property> <child> <object class="GtkListBox"> <child> <object class="AdwEntryRow" id="host"> <property name="title" translatable="1">_Host</property> <property name="use-underline">1</property> </object> </child> <child> <object class="AdwEntryRow" id="port"> <property name="title" translatable="1">P_ort</property> <property name="use-underline">1</property> <property name="focusable">0</property> <property name="input-purpose">number</property> </object> </child> <child> <object class="AdwEntryRow" id="username"> <property name="title" translatable="1">User_name</property> <property name="use-underline">1</property> <property name="focusable">0</property> </object> </child> <child> <object class="AdwPasswordEntryRow" id="password"> <property name="title" translatable="1">Pa_ssword</property> <property name="use-underline">1</property> <property name="focusable">0</property> </object> </child> </object> </child> </object> </child> </object> </child> </template> </interface>