gnome-control-center/panels/network/network-proxy.ui
Georges Basile Stavracas Neto b64c605e69 network: Update Proxy section widgets
According to the lastest mockups [1], the Proxy section is now
composed of a row with the state of the proxy, and a settings
button that leads to a dialog where one can configure the different
proxy settings.

This commit ports the current code to do that, and various changes
took place to made this happen. Namely:

 * A new ProxyMode enum was added to improve readability and
   improve the semantic of the code. No more random numbers
   are present.

 * The current widgets for editing proxy settings were repacked
   into a GtkStack (so that we keep an homogeneous sizing), and
   the GtkStack itself was moved into a new dialog. With that,
   we can just set the stack page, rather than controlling the
   visibility of all individual widgets.

 * Many unused widgets were removed.

 * The combo box was replaced by 3 radio buttons. Now, there's
   no need to deal with GtkTreeIters anymore. Another refactoring
   of the code that led to more readable and smaller code.

Overall, these changes made the code be more readable, smaller
codebase with a smaller surface for mistakes.

https://bugzilla.gnome.org/show_bug.cgi?id=785581
2017-08-09 19:32:43 +02:00

481 lines
22 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment_proxy_port_ftp">
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment_proxy_port_http">
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment_proxy_port_https">
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment_proxy_port_socks">
<property name="upper">65535</property>
<property name="step_increment">1</property>
</object>
<object class="GtkFrame" id="main_widget">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkListBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<property name="margin">12</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Network Proxy</property>
<property name="xalign">0.0</property>
<attributes>
<attribute name="weight" value="bold" />
</attributes>
</object>
</child>
<child>
<object class="GtkLabel" id="status_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<style>
<class name="dim-label" />
</style>
</object>
</child>
<child>
<object class="GtkButton" id="dialog_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkDialog" id="dialog">
<property name="use_header_bar">1</property>
<property name="can_focus">False</property>
<property name="border_width">18</property>
<property name="default_height">350</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
<property name="title" translatable="yes">Network Proxy</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">0</property>
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="radio_automatic">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Automatic</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">radio_none</property>
</object>
</child>
<child>
<object class="GtkRadioButton" id="radio_manual">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Manual</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">radio_none</property>
</object>
</child>
<child>
<object class="GtkRadioButton" id="radio_none">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Disabled</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="transition_type">crossfade</property>
<!-- Disabled (empty box) -->
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="name">disabled</property>
</packing>
</child>
<!-- Manual -->
<child>
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="border_width">12</property>
<property name="row_spacing">10</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkAlignment" id="alignment_proxy_switch">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="valign">start</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heading_proxy_http">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_HTTP Proxy</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_proxy_http</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heading_proxy_https">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">H_TTPS Proxy</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_proxy_https</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heading_proxy_ftp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_FTP Proxy</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_proxy_ftp</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heading_proxy_socks">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Socks Host</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_proxy_socks</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heading_proxy_ignore">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Ignore Hosts</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_proxy_ignore</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">7</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_proxy_http">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton_proxy_http">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="xalign">1</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_proxy_port_http</property>
<child internal-child="accessible">
<object class="AtkObject" id="spinbutton_proxy_http-accessible">
<property name="accessible-name" translatable="yes">HTTP proxy port</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_proxy_https">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_proxy_ftp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_proxy_socks">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">6</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_proxy_ignore">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">7</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton_proxy_https">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="xalign">1</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_proxy_port_https</property>
<child internal-child="accessible">
<object class="AtkObject" id="spinbutton_proxy_https-accessible">
<property name="accessible-name" translatable="yes">HTTPS proxy port</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton_proxy_ftp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="xalign">1</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_proxy_port_ftp</property>
<child internal-child="accessible">
<object class="AtkObject" id="spinbutton_proxy_ftp-accessible">
<property name="accessible-name" translatable="yes">FTP proxy port</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton_proxy_socks">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="xalign">1</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_proxy_port_socks</property>
<child internal-child="accessible">
<object class="AtkObject" id="spinbutton_proxy_socks-accessible">
<property name="accessible-name" translatable="yes">Socks proxy port</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">6</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">manual</property>
</packing>
</child>
<!-- Automatic -->
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">12</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="heading_proxy_url">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Configuration URL</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_proxy_url</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="top_attach">0</property>
<property name="left_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_proxy_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="top_attach">0</property>
<property name="left_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_proxy_warning">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label">WPAD warning…</property>
<property name="wrap">True</property>
<property name="width_chars">50</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="left_attach">0</property>
<property name="width">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">automatic</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>