[gnome-control-center/wip/gbsneto/connection-editor: 49/53] network: Use radio buttons instead of a combobox in IP pages
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/connection-editor: 49/53] network: Use radio buttons instead of a combobox in IP pages
- Date: Tue, 13 Jun 2017 14:31:08 +0000 (UTC)
commit 971090167a196c6911e3679a5d8fb08c87be7b89
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue May 23 01:56:08 2017 -0300
network: Use radio buttons instead of a combobox in IP pages
Per the latest mockups [1], the IP pages use a set of four radio
buttons to control the method, rather than a switch + a combobox,
which is what the current implementation uses.
This patch, then, adapts the IP pages of the connection editor
dialog to use a set of radio buttons at the top of the page.
[1]
https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/network/aday2/network-wires.png
https://bugzilla.gnome.org/show_bug.cgi?id=779841
panels/network/connection-editor/ce-page-ip4.c | 117 ++++++++---------
panels/network/connection-editor/ce-page-ip4.h | 15 +-
panels/network/connection-editor/ce-page-ip6.c | 126 +++++++++---------
panels/network/connection-editor/ce-page-ip6.h | 15 +-
panels/network/connection-editor/ip4-page.ui | 153 ++++++++++------------
panels/network/connection-editor/ip6-page.ui | 167 ++++++++++++------------
6 files changed, 289 insertions(+), 304 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index 0a7528e..3488657 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -32,6 +32,8 @@
#include "ce-page-ip4.h"
#include "ui-helpers.h"
+#define RADIO_IS_ACTIVE(x) (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object(CE_PAGE
(page)->builder, x))))
+
G_DEFINE_TYPE (CEPageIP4, ce_page_ip4, CE_TYPE_PAGE)
enum {
@@ -48,32 +50,21 @@ enum {
};
static void
-method_changed (GtkComboBox *combo, CEPageIP4 *page)
+method_changed (GtkToggleButton *radio, CEPageIP4 *page)
{
gboolean addr_enabled;
gboolean dns_enabled;
gboolean routes_enabled;
- guint method;
GtkWidget *widget;
- method = gtk_combo_box_get_active (combo);
- switch (method) {
- case IP4_METHOD_AUTO:
- addr_enabled = FALSE;
- dns_enabled = TRUE;
- routes_enabled = TRUE;
- break;
- case IP4_METHOD_MANUAL:
- addr_enabled = TRUE;
- dns_enabled = TRUE;
- routes_enabled = TRUE;
- break;
- case IP4_METHOD_LINK_LOCAL:
- default:
+ if (RADIO_IS_ACTIVE ("radio_disabled")) {
addr_enabled = FALSE;
dns_enabled = FALSE;
routes_enabled = FALSE;
- break;
+ } else {
+ addr_enabled = RADIO_IS_ACTIVE ("radio_manual");
+ dns_enabled = !RADIO_IS_ACTIVE ("radio_local");
+ routes_enabled = !RADIO_IS_ACTIVE ("radio_local");
}
widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "address_section"));
@@ -593,50 +584,38 @@ add_routes_section (CEPageIP4 *page)
gtk_widget_show_all (widget);
}
+enum
+{
+ RADIO_AUTOMATIC,
+ RADIO_LOCAL,
+ RADIO_MANUAL,
+ RADIO_DISABLED,
+ N_RADIO
+};
+
static void
connect_ip4_page (CEPageIP4 *page)
{
+ GtkToggleButton *radios[N_RADIO];
GtkWidget *content;
const gchar *str_method;
gboolean disabled;
- GtkListStore *store;
- GtkTreeIter iter;
- guint method;
+ guint method, i;
add_address_section (page);
add_dns_section (page);
add_routes_section (page);
- page->enabled = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "switch_enable"));
- g_signal_connect (page->enabled, "notify::active", G_CALLBACK (switch_toggled), page);
+ page->disabled = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_disabled"));
str_method = nm_setting_ip_config_get_method (page->setting);
disabled = g_strcmp0 (str_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0;
- gtk_switch_set_active (page->enabled, !disabled);
- g_signal_connect_swapped (page->enabled, "notify::active", G_CALLBACK (ce_page_changed), page);
+ gtk_toggle_button_set_active (page->disabled, disabled);
+ g_signal_connect_swapped (page->disabled, "notify::active", G_CALLBACK (ce_page_changed), page);
content = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "page_content"));
- g_object_bind_property (page->enabled, "active",
+ g_object_bind_property (page->disabled, "active",
content, "sensitive",
- G_BINDING_SYNC_CREATE);
-
- page->method = GTK_COMBO_BOX (gtk_builder_get_object (CE_PAGE (page)->builder, "combo_addresses"));
-
- store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_UINT);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Automatic (DHCP)"),
- METHOD_COL_METHOD, IP4_METHOD_AUTO,
- -1);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Manual"),
- METHOD_COL_METHOD, IP4_METHOD_MANUAL,
- -1);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Link-Local Only"),
- METHOD_COL_METHOD, IP4_METHOD_LINK_LOCAL,
- -1);
-
- gtk_combo_box_set_model (page->method, GTK_TREE_MODEL (store));
- g_object_unref (G_OBJECT (store));
+ G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN);
method = IP4_METHOD_AUTO;
if (g_strcmp0 (str_method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL) == 0) {
@@ -654,9 +633,33 @@ connect_ip4_page (CEPageIP4 *page)
nm_setting_ip_config_get_never_default (page->setting));
g_signal_connect_swapped (page->never_default, "toggled", G_CALLBACK (ce_page_changed), page);
- g_signal_connect (page->method, "changed", G_CALLBACK (method_changed), page);
- if (method != IP4_METHOD_SHARED && method != IP4_METHOD_DISABLED)
- gtk_combo_box_set_active (page->method, method);
+ /* Connect radio buttons */
+ radios[RADIO_AUTOMATIC] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_automatic"));
+ radios[RADIO_LOCAL] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_local"));
+ radios[RADIO_MANUAL] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_manual"));
+ radios[RADIO_DISABLED] = page->disabled;
+
+ for (i = RADIO_AUTOMATIC; i < RADIO_DISABLED; i++)
+ g_signal_connect (radios[i], "toggled", G_CALLBACK (method_changed), page);
+
+ switch (method) {
+ case IP4_METHOD_AUTO:
+ gtk_toggle_button_set_active (radios[RADIO_AUTOMATIC], TRUE);
+ break;
+ case IP4_METHOD_LINK_LOCAL:
+ gtk_toggle_button_set_active (radios[RADIO_LOCAL], TRUE);
+ break;
+ case IP4_METHOD_MANUAL:
+ gtk_toggle_button_set_active (radios[RADIO_MANUAL], TRUE);
+ break;
+ case IP4_METHOD_DISABLED:
+ gtk_toggle_button_set_active (radios[RADIO_DISABLED], TRUE);
+ break;
+ default:
+ break;
+ }
+
+ method_changed (NULL, page);
}
static gboolean
@@ -699,21 +702,15 @@ ui_to_setting (CEPageIP4 *page)
gboolean ret = TRUE;
const char *default_gateway = NULL;
- if (!gtk_switch_get_active (page->enabled)) {
+ if (gtk_toggle_button_get_active (page->disabled)) {
method = NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
} else {
- switch (gtk_combo_box_get_active (page->method)) {
- case IP4_METHOD_MANUAL:
- method = NM_SETTING_IP4_CONFIG_METHOD_MANUAL;
- break;
- case IP4_METHOD_LINK_LOCAL:
- method = NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL;
- break;
- default:
- case IP4_METHOD_AUTO:
+ if (RADIO_IS_ACTIVE ("radio_automatic"))
method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
- break;
- }
+ else if (RADIO_IS_ACTIVE ("radio_local"))
+ method = NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL;
+ else if (RADIO_IS_ACTIVE ("radio_manual"))
+ method = NM_SETTING_IP4_CONFIG_METHOD_MANUAL;
}
addresses = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_ip_address_unref);
diff --git a/panels/network/connection-editor/ce-page-ip4.h b/panels/network/connection-editor/ce-page-ip4.h
index 3dbca5d..07aa1d7 100644
--- a/panels/network/connection-editor/ce-page-ip4.h
+++ b/panels/network/connection-editor/ce-page-ip4.h
@@ -45,14 +45,13 @@ struct _CEPageIP4
NMSettingIPConfig *setting;
- GtkSwitch *enabled;
- GtkComboBox *method;
- GtkWidget *address_list;
- GtkSwitch *auto_dns;
- GtkWidget *dns_list;
- GtkSwitch *auto_routes;
- GtkWidget *routes_list;
- GtkWidget *never_default;
+ GtkToggleButton *disabled;
+ GtkWidget *address_list;
+ GtkSwitch *auto_dns;
+ GtkWidget *dns_list;
+ GtkSwitch *auto_routes;
+ GtkWidget *routes_list;
+ GtkWidget *never_default;
};
struct _CEPageIP4Class
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index abf9f69..c67f4a1 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -32,6 +32,8 @@
#include "ce-page-ip6.h"
#include "ui-helpers.h"
+#define RADIO_IS_ACTIVE(x) (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object(CE_PAGE
(page)->builder, x))))
+
G_DEFINE_TYPE (CEPageIP6, ce_page_ip6, CE_TYPE_PAGE)
enum {
@@ -49,33 +51,21 @@ enum {
};
static void
-method_changed (GtkComboBox *combo, CEPageIP6 *page)
+method_changed (GtkToggleButton *button, CEPageIP6 *page)
{
gboolean addr_enabled;
gboolean dns_enabled;
gboolean routes_enabled;
- guint method;
GtkWidget *widget;
- method = gtk_combo_box_get_active (combo);
- switch (method) {
- case IP6_METHOD_AUTO:
- case IP6_METHOD_DHCP:
- addr_enabled = FALSE;
- dns_enabled = TRUE;
- routes_enabled = TRUE;
- break;
- case IP6_METHOD_MANUAL:
- addr_enabled = TRUE;
- dns_enabled = TRUE;
- routes_enabled = TRUE;
- break;
- case IP6_METHOD_LINK_LOCAL:
- default:
+ if (RADIO_IS_ACTIVE ("radio_disabled")) {
addr_enabled = FALSE;
dns_enabled = FALSE;
routes_enabled = FALSE;
- break;
+ } else {
+ addr_enabled = RADIO_IS_ACTIVE ("radio_manual");
+ dns_enabled = !RADIO_IS_ACTIVE ("radio_local");
+ routes_enabled = !RADIO_IS_ACTIVE ("radio_local");
}
widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "address_section"));
@@ -551,54 +541,39 @@ add_routes_section (CEPageIP6 *page)
gtk_widget_show_all (widget);
}
+enum
+{
+ RADIO_AUTOMATIC,
+ RADIO_DHCP,
+ RADIO_LOCAL,
+ RADIO_MANUAL,
+ RADIO_DISABLED,
+ N_RADIO
+};
+
static void
connect_ip6_page (CEPageIP6 *page)
{
+ GtkToggleButton *radios[N_RADIO];
GtkWidget *content;
const gchar *str_method;
gboolean disabled;
- GtkListStore *store;
- GtkTreeIter iter;
- guint method;
+ guint method, i;
add_address_section (page);
add_dns_section (page);
add_routes_section (page);
- page->enabled = GTK_SWITCH (gtk_builder_get_object (CE_PAGE (page)->builder, "switch_enable"));
- g_signal_connect (page->enabled, "notify::active", G_CALLBACK (switch_toggled), page);
+ page->disabled = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_disabled"));
str_method = nm_setting_ip_config_get_method (page->setting);
disabled = g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0;
- gtk_switch_set_active (page->enabled, !disabled);
- g_signal_connect_swapped (page->enabled, "notify::active", G_CALLBACK (ce_page_changed), page);
+ gtk_toggle_button_set_active (page->disabled, disabled);
+ g_signal_connect_swapped (page->disabled, "notify::active", G_CALLBACK (ce_page_changed), page);
content = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "page_content"));
- g_object_bind_property (page->enabled, "active",
+ g_object_bind_property (page->disabled, "active",
content, "sensitive",
- G_BINDING_SYNC_CREATE);
-
- page->method = GTK_COMBO_BOX (gtk_builder_get_object (CE_PAGE (page)->builder, "combo_addresses"));
-
- store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_UINT);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Automatic"),
- METHOD_COL_METHOD, IP6_METHOD_AUTO,
- -1);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Automatic, DHCP only"),
- METHOD_COL_METHOD, IP6_METHOD_DHCP,
- -1);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Manual"),
- METHOD_COL_METHOD, IP6_METHOD_MANUAL,
- -1);
- gtk_list_store_insert_with_values (store, &iter, -1,
- METHOD_COL_NAME, _("Link-Local Only"),
- METHOD_COL_METHOD, IP6_METHOD_LINK_LOCAL,
- -1);
-
- gtk_combo_box_set_model (page->method, GTK_TREE_MODEL (store));
- g_object_unref (G_OBJECT (store));
+ G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN);
method = IP6_METHOD_AUTO;
if (g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) == 0) {
@@ -618,9 +593,38 @@ connect_ip6_page (CEPageIP6 *page)
nm_setting_ip_config_get_never_default (page->setting));
g_signal_connect_swapped (page->never_default, "toggled", G_CALLBACK (ce_page_changed), page);
- g_signal_connect (page->method, "changed", G_CALLBACK (method_changed), page);
- if (method != IP6_METHOD_SHARED && method != IP6_METHOD_IGNORE)
- gtk_combo_box_set_active (page->method, method);
+
+ /* Connect radio buttons */
+ radios[RADIO_AUTOMATIC] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_automatic"));
+ radios[RADIO_DHCP] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_dhcp"));
+ radios[RADIO_LOCAL] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_local"));
+ radios[RADIO_MANUAL] = GTK_TOGGLE_BUTTON (gtk_builder_get_object (CE_PAGE (page)->builder,
"radio_manual"));
+ radios[RADIO_DISABLED] = page->disabled;
+
+ for (i = RADIO_AUTOMATIC; i < RADIO_DISABLED; i++)
+ g_signal_connect (radios[i], "toggled", G_CALLBACK (method_changed), page);
+
+ switch (method) {
+ case IP6_METHOD_AUTO:
+ gtk_toggle_button_set_active (radios[RADIO_AUTOMATIC], TRUE);
+ break;
+ case IP6_METHOD_DHCP:
+ gtk_toggle_button_set_active (radios[RADIO_DHCP], TRUE);
+ break;
+ case IP6_METHOD_LINK_LOCAL:
+ gtk_toggle_button_set_active (radios[RADIO_LOCAL], TRUE);
+ break;
+ case IP6_METHOD_MANUAL:
+ gtk_toggle_button_set_active (radios[RADIO_MANUAL], TRUE);
+ break;
+ case IP6_METHOD_IGNORE:
+ gtk_toggle_button_set_active (radios[RADIO_DISABLED], TRUE);
+ break;
+ default:
+ break;
+ }
+
+ method_changed (NULL, page);
}
static gboolean
@@ -633,23 +637,17 @@ ui_to_setting (CEPageIP6 *page)
GList *children, *l;
gboolean ret = TRUE;
- if (!gtk_switch_get_active (page->enabled)) {
+ if (gtk_toggle_button_get_active (page->disabled)) {
method = NM_SETTING_IP6_CONFIG_METHOD_IGNORE;
} else {
- switch (gtk_combo_box_get_active (page->method)) {
- case IP6_METHOD_MANUAL:
+ if (RADIO_IS_ACTIVE ("radio_manual")) {
method = NM_SETTING_IP6_CONFIG_METHOD_MANUAL;
- break;
- case IP6_METHOD_LINK_LOCAL:
+ } else if (RADIO_IS_ACTIVE ("radio_local")) {
method = NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL;
- break;
- case IP6_METHOD_DHCP:
+ } else if (RADIO_IS_ACTIVE ("radio_dhcp")) {
method = NM_SETTING_IP6_CONFIG_METHOD_DHCP;
- break;
- default:
- case IP6_METHOD_AUTO:
+ } else if (RADIO_IS_ACTIVE ("radio_automatic")) {
method = NM_SETTING_IP6_CONFIG_METHOD_AUTO;
- break;
}
}
diff --git a/panels/network/connection-editor/ce-page-ip6.h b/panels/network/connection-editor/ce-page-ip6.h
index bda432b..93ec846 100644
--- a/panels/network/connection-editor/ce-page-ip6.h
+++ b/panels/network/connection-editor/ce-page-ip6.h
@@ -45,14 +45,13 @@ struct _CEPageIP6
NMSettingIPConfig *setting;
- GtkSwitch *enabled;
- GtkComboBox *method;
- GtkWidget *address_list;
- GtkSwitch *auto_dns;
- GtkWidget *dns_list;
- GtkSwitch *auto_routes;
- GtkWidget *routes_list;
- GtkWidget *never_default;
+ GtkToggleButton *disabled;
+ GtkWidget *address_list;
+ GtkSwitch *auto_dns;
+ GtkWidget *dns_list;
+ GtkSwitch *auto_routes;
+ GtkWidget *routes_list;
+ GtkWidget *never_default;
};
struct _CEPageIP6Class
diff --git a/panels/network/connection-editor/ip4-page.ui b/panels/network/connection-editor/ip4-page.ui
index 740cf48..61e7afd 100644
--- a/panels/network/connection-editor/ip4-page.ui
+++ b/panels/network/connection-editor/ip4-page.ui
@@ -10,7 +10,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">20</property>
@@ -18,46 +18,78 @@
<property name="margin_top">10</property>
<property name="margin_bottom">10</property>
<property name="orientation">vertical</property>
- <property name="spacing">10</property>
+ <property name="row-spacing">12</property>
+ <property name="column-spacing">12</property>
<child>
- <object class="GtkBox" id="box5">
+ <object class="GtkLabel" id="heading_enable">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="heading_enable">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">IPv_4</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">switch_enable</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="switch_enable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">IPv_4 Method</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">radio_disabled</property>
+ <property name="xalign">0.0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_automatic">
+ <property name="label" translatable="yes">Automatic (DHCP)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_local">
+ <property name="label" translatable="yes">Link-Local Only</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_manual">
+ <property name="label" translatable="yes">Manual</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
+ </object>
+ <packing>
+ <property name="top-attach">1</property>
+ <property name="left-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_disabled">
+ <property name="label" translatable="yes">Disable</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="top-attach">1</property>
+ <property name="left-attach">2</property>
</packing>
</child>
<child>
@@ -67,49 +99,6 @@
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
- <object class="GtkBox" id="box7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="heading_addresses">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Addresses</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">combo_addresses</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="combo_addresses">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkBox" id="address_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -293,9 +282,9 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="top-attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="width">3</property>
</packing>
</child>
</object>
diff --git a/panels/network/connection-editor/ip6-page.ui b/panels/network/connection-editor/ip6-page.ui
index db5648d..0c44f41 100644
--- a/panels/network/connection-editor/ip6-page.ui
+++ b/panels/network/connection-editor/ip6-page.ui
@@ -10,7 +10,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkBox" id="box2">
+ <object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">20</property>
@@ -18,46 +18,92 @@
<property name="margin_top">10</property>
<property name="margin_bottom">10</property>
<property name="orientation">vertical</property>
- <property name="spacing">10</property>
+ <property name="row-spacing">12</property>
+ <property name="column-spacing">12</property>
<child>
- <object class="GtkBox" id="box5">
+ <object class="GtkLabel" id="heading_enable">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="heading_enable">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">IPv_6</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">switch_enable</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="switch_enable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">IPv_6 Method</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">radio_disabled</property>
+ <property name="xalign">0.0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_automatic">
+ <property name="label" translatable="yes">Automatic</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_dhcp">
+ <property name="label" translatable="yes">Automatic, DHCP only</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
+ </object>
+ <packing>
+ <property name="top-attach">0</property>
+ <property name="left-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_local">
+ <property name="label" translatable="yes">Link-Local Only</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
+ </object>
+ <packing>
+ <property name="top-attach">1</property>
+ <property name="left-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_manual">
+ <property name="label" translatable="yes">Manual</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="top-attach">1</property>
+ <property name="left-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_disabled">
+ <property name="label" translatable="yes">Disable</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_automatic</property>
+ </object>
+ <packing>
+ <property name="top-attach">2</property>
+ <property name="left-attach">1</property>
</packing>
</child>
<child>
@@ -67,49 +113,6 @@
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
- <object class="GtkBox" id="box7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="heading_addresses">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Addresses</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">combo_addresses</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="combo_addresses">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkBox" id="address_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -293,9 +296,9 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="top-attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="width">3</property>
</packing>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]