Sat, 05 Nov 2022 03:13:47 -0500
Use response names in .ui dialog files
Also set the account editor Save button to be the `suggested-action`.
Testing Done:
Opened most dialogs.
Reviewed at https://reviews.imfreedom.org/r/2039/
<?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.38.2 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="Adw" version="1.0"/> <requires lib="gtk" version="4.0"/> <requires lib="pidgin" version="3.0"/> <!-- interface-license-type gplv2 --> <!-- interface-name Pidgin --> <!-- interface-description Internet Messenger --> <!-- interface-copyright Pidgin Developers <devel@pidgin.im> --> <template class="PidginAccountEditor" parent="GtkDialog"> <property name="resizable">0</property> <property name="default-height">600</property> <property name="default-width">400</property> <property name="title" translatable="1">Edit Account</property> <signal name="response" handler="pidgin_account_editor_response_cb" swapped="no"/> <child internal-child="content_area"> <object class="GtkBox"> <property name="vexpand">1</property> <child> <object class="AdwPreferencesPage"> <property name="vexpand">1</property> <property name="hexpand">1</property> <child> <object class="AdwPreferencesGroup" id="login_options"> <property name="title" translatable="1">Login Options</property> <child> <object class="PidginProtocolChooser" id="protocol"> <property name="title" translatable="1">Pro_tocol</property> <property name="use-underline">1</property> <signal name="notify::protocol" handler="pidgin_account_editor_protocol_changed_cb" object="PidginAccountEditor" swapped="no"/> </object> </child> <child> <object class="AdwPreferencesRow"> <property name="focusable">0</property> <child> <object class="GtkListBox" id="user_splits"> <property name="focusable">0</property> <child> <object class="AdwEntryRow" id="username"> <property name="focusable">0</property> <property name="title" translatable="1">_Username</property> <property name="use-underline">1</property> <signal name="changed" handler="pidgin_account_editor_username_changed_cb" object="PidginAccountEditor" swapped="no"/> </object> </child> </object> </child> </object> </child> <child> <object class="AdwActionRow" id="require_password_row"> <property name="activatable-widget">avatar</property> <property name="focusable">0</property> <property name="title" translatable="1">Require _password</property> <property name="subtitle" translatable="1">This account has an optional password, setting this will make it required</property> <property name="use-underline">1</property> <property name="visible">0</property> <child type="suffix"> <object class="GtkSwitch" id="require_password"> <property name="valign">center</property> </object> </child> </object> </child> </object> </child> <child> <object class="AdwPreferencesGroup"> <property name="title" translatable="1">User Options</property> <child> <object class="AdwEntryRow" id="alias"> <property name="focusable">0</property> <property name="title" translatable="1">_Local alias</property> <property name="use-underline">1</property> </object> </child> <child> <object class="AdwActionRow" id="avatar_row"> <property name="activatable-widget">avatar</property> <property name="focusable">0</property> <property name="title" translatable="1">Use custom _avatar</property> <property name="use-underline">1</property> <property name="visible">0</property> <child type="prefix"> <object class="GtkSwitch" id="use_custom_avatar"> <property name="valign">center</property> </object> </child> <child> <object class="GtkButton"> <property name="css-classes">flat</property> <property name="valign">center</property> <binding name="sensitive"> <lookup name="active">use_custom_avatar</lookup> </binding> <child> <object class="GtkImage" id="avatar"> <property name="icon-name">select-avatar</property> <property name="icon-size">large</property> </object> </child> <signal name="clicked" handler="pidgin_account_editor_avatar_set_clicked_cb" object="PidginAccountEditor" swapped="no"/> </object> </child> <child> <object class="GtkButton" id="remove"> <property name="label" translatable="1">_Remove</property> <property name="use-underline">1</property> <property name="valign">center</property> <binding name="sensitive"> <lookup name="active">use_custom_avatar</lookup> </binding> <signal name="clicked" handler="pidgin_account_editor_avatar_remove_clicked_cb" object="PidginAccountEditor" swapped="no"/> </object> </child> </object> </child> </object> </child> <child> <object class="AdwPreferencesGroup" id="advanced_group"> <property name="title" translatable="1">Advanced Options</property> <property name="description" translatable="1">Additional options for this account.</property> <property name="visible">0</property> <child type="header-suffix"> <object class="GtkSwitch" id="advanced_toggle"> <property name="active">0</property> <property name="valign">center</property> </object> </child> </object> </child> <child> <object class="AdwPreferencesGroup"> <property name="title" translatable="1">Proxy</property> <child> <object class="AdwComboRow" id="proxy_type"> <property name="title" translatable="1">Proxy t_ype</property> <property name="use-underline">1</property> <property name="use-subtitle">1</property> <property name="model"> <object class="GtkStringList"> <items> <item>global</item> <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="pidgin_account_editor_proxy_type_expression_cb"/> </property> <signal name="notify::selected" handler="pidgin_account_editor_proxy_type_changed_cb" object="PidginAccountEditor" swapped="no"/> </object> </child> <child> <object class="AdwPreferencesRow" id="proxy_options"> <property name="focusable">0</property> <property name="visible">0</property> <child> <object class="GtkListBox"> <property name="focusable">0</property> <child> <object class="AdwEntryRow" id="proxy_host"> <property name="focusable">0</property> <property name="title" translatable="1">_Host</property> <property name="use-underline">1</property> </object> </child> <child> <object class="AdwEntryRow" id="proxy_port"> <property name="focusable">0</property> <property name="title" translatable="1">P_ort</property> <property name="use-underline">1</property> <property name="input-purpose">number</property> </object> </child> <child> <object class="AdwEntryRow" id="proxy_username"> <property name="focusable">0</property> <property name="title" translatable="1">User_name</property> <property name="use-underline">1</property> </object> </child> <child> <object class="AdwPasswordEntryRow" id="proxy_password"> <property name="focusable">0</property> <property name="title" translatable="1">Pa_ssword</property> <property name="use-underline">1</property> </object> </child> </object> </child> </object> </child> </object> </child> </object> </child> </object> </child> <child type="action"> <object class="GtkButton" id="button1"> <property name="label" translatable="1">_Cancel</property> <property name="receives-default">1</property> <property name="use-underline">1</property> </object> </child> <child type="action"> <object class="GtkButton" id="button2"> <property name="css-classes">suggested-action</property> <property name="label" translatable="1">_Save</property> <property name="receives-default">1</property> <property name="sensitive">0</property> <property name="use-underline">1</property> </object> </child> <action-widgets> <action-widget response="cancel">button1</action-widget> <action-widget response="apply">button2</action-widget> </action-widgets> </template> </interface>