summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2019-12-12 16:20:57 +0100
committerFelipe Borges <felipeborges@gnome.org>2021-03-15 11:31:26 +0100
commit17501caaea762b54ecd56a8f947ceefcfb177e13 (patch)
treea21de240007276c6ce54380020682b1c984068c1
parentc3e2fd34a6bce75d915c223171deb1fd0ddd56b5 (diff)
downloadgnome-control-center-network-make-pages-drive-scrolledwindow.tar.gz
network: Make IPv4/v6 pages drive the scrolledwindow adjustmentsnetwork-make-pages-drive-scrolledwindow
Those 2 pages in the connection editor dialog are scrollable, but don't hook focus changes so they drive the adjustments. Make them do so.
-rw-r--r--panels/network/connection-editor/ce-page-ip4.c5
-rw-r--r--panels/network/connection-editor/ce-page-ip6.c5
-rw-r--r--panels/network/connection-editor/ip4-page.ui2
-rw-r--r--panels/network/connection-editor/ip6-page.ui2
4 files changed, 12 insertions, 2 deletions
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index 6de6ce607..140dedd75 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -50,6 +50,7 @@ struct _CEPageIP4
GtkRadioButton *disabled_radio;
GtkEntry *dns_entry;
GtkRadioButton *local_radio;
+ GtkGrid *main_box;
GtkRadioButton *manual_radio;
GtkCheckButton *never_default_check;
GtkBox *routes_box;
@@ -469,6 +470,9 @@ connect_ip4_page (CEPageIP4 *self)
const gchar *str_method;
guint method;
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (self->main_box),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self)));
+
add_address_box (self);
add_dns_section (self);
add_routes_box (self);
@@ -783,6 +787,7 @@ ce_page_ip4_class_init (CEPageIP4Class *klass)
gtk_widget_class_bind_template_child (widget_class, CEPageIP4, disabled_radio);
gtk_widget_class_bind_template_child (widget_class, CEPageIP4, dns_entry);
gtk_widget_class_bind_template_child (widget_class, CEPageIP4, local_radio);
+ gtk_widget_class_bind_template_child (widget_class, CEPageIP4, main_box);
gtk_widget_class_bind_template_child (widget_class, CEPageIP4, manual_radio);
gtk_widget_class_bind_template_child (widget_class, CEPageIP4, never_default_check);
gtk_widget_class_bind_template_child (widget_class, CEPageIP4, routes_box);
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index 2fb61394c..06e1842b5 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -51,6 +51,7 @@ struct _CEPageIP6
GtkRadioButton *disabled_radio;
GtkEntry *dns_entry;
GtkRadioButton *local_radio;
+ GtkGrid *main_box;
GtkRadioButton *manual_radio;
GtkCheckButton *never_default_check;
GtkBox *routes_box;
@@ -443,6 +444,9 @@ connect_ip6_page (CEPageIP6 *self)
const gchar *str_method;
guint method;
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (self->main_box),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self)));
+
add_address_box (self);
add_dns_section (self);
add_routes_box (self);
@@ -756,6 +760,7 @@ ce_page_ip6_class_init (CEPageIP6Class *klass)
gtk_widget_class_bind_template_child (widget_class, CEPageIP6, disabled_radio);
gtk_widget_class_bind_template_child (widget_class, CEPageIP6, dns_entry);
gtk_widget_class_bind_template_child (widget_class, CEPageIP6, local_radio);
+ gtk_widget_class_bind_template_child (widget_class, CEPageIP6, main_box);
gtk_widget_class_bind_template_child (widget_class, CEPageIP6, manual_radio);
gtk_widget_class_bind_template_child (widget_class, CEPageIP6, never_default_check);
gtk_widget_class_bind_template_child (widget_class, CEPageIP6, routes_box);
diff --git a/panels/network/connection-editor/ip4-page.ui b/panels/network/connection-editor/ip4-page.ui
index c390eb8dc..714036b55 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="GtkGrid">
+ <object class="GtkGrid" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">24</property>
diff --git a/panels/network/connection-editor/ip6-page.ui b/panels/network/connection-editor/ip6-page.ui
index 2234cd1f4..06044c468 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="GtkGrid">
+ <object class="GtkGrid" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">24</property>