Blame SOURCES/0001-network-Make-IPv4-v6-pages-drive-the-scrolledwindow-.patch

9b746a
From 0f7a591fa691bc826cee19ae01a6338145119aee Mon Sep 17 00:00:00 2001
9b746a
From: Carlos Garnacho <carlosg@gnome.org>
9b746a
Date: Thu, 12 Dec 2019 16:20:57 +0100
9b746a
Subject: [PATCH] network: Make IPv4/v6 pages drive the scrolledwindow
9b746a
 adjustments
9b746a
9b746a
Those 2 pages in the connection editor dialog are scrollable, but don't
9b746a
hook focus changes so they drive the adjustments. Make them do so.
9b746a
---
9b746a
 panels/network/connection-editor/ce-page-ip4.c | 3 +++
9b746a
 panels/network/connection-editor/ce-page-ip6.c | 3 +++
9b746a
 panels/network/connection-editor/ip4-page.ui   | 2 +-
9b746a
 panels/network/connection-editor/ip6-page.ui   | 2 +-
9b746a
 4 files changed, 8 insertions(+), 2 deletions(-)
9b746a
9b746a
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
9b746a
index 400dc433d..d79e9a3dd 100644
9b746a
--- a/panels/network/connection-editor/ce-page-ip4.c
9b746a
+++ b/panels/network/connection-editor/ce-page-ip4.c
9b746a
@@ -515,6 +515,9 @@ connect_ip4_page (CEPageIP4 *page)
9b746a
         gboolean disabled;
9b746a
         guint method, i;
9b746a
 
9b746a
+        gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_builder_get_object (CE_PAGE (page)->builder, "main_box")),
9b746a
+                                             gtk_scrolled_window_get_vadjustment (gtk_builder_get_object (CE_PAGE (page)->builder, "page")));
9b746a
+
9b746a
         add_address_section (page);
9b746a
         add_dns_section (page);
9b746a
         add_routes_section (page);
9b746a
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
9b746a
index 995197504..f7105cc5b 100644
9b746a
--- a/panels/network/connection-editor/ce-page-ip6.c
9b746a
+++ b/panels/network/connection-editor/ce-page-ip6.c
9b746a
@@ -485,6 +485,9 @@ connect_ip6_page (CEPageIP6 *page)
9b746a
         gboolean disabled;
9b746a
         guint method, i;
9b746a
 
9b746a
+        gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_builder_get_object (CE_PAGE (page)->builder, "main_box")),
9b746a
+                                             gtk_scrolled_window_get_vadjustment (gtk_builder_get_object (CE_PAGE (page)->builder, "page")));
9b746a
+
9b746a
         add_address_section (page);
9b746a
         add_dns_section (page);
9b746a
         add_routes_section (page);
9b746a
diff --git a/panels/network/connection-editor/ip4-page.ui b/panels/network/connection-editor/ip4-page.ui
9b746a
index fe5d407c9..597987d57 100644
9b746a
--- a/panels/network/connection-editor/ip4-page.ui
9b746a
+++ b/panels/network/connection-editor/ip4-page.ui
9b746a
@@ -10,7 +10,7 @@
9b746a
         <property name="visible">True</property>
9b746a
         <property name="can_focus">False</property>
9b746a
         <child>
9b746a
-          <object class="GtkGrid">
9b746a
+          <object class="GtkGrid" id="main_box">
9b746a
             <property name="visible">True</property>
9b746a
             <property name="can_focus">False</property>
9b746a
             <property name="margin_start">24</property>
9b746a
diff --git a/panels/network/connection-editor/ip6-page.ui b/panels/network/connection-editor/ip6-page.ui
9b746a
index 6d39bd0ec..5164b1004 100644
9b746a
--- a/panels/network/connection-editor/ip6-page.ui
9b746a
+++ b/panels/network/connection-editor/ip6-page.ui
9b746a
@@ -10,7 +10,7 @@
9b746a
         <property name="visible">True</property>
9b746a
         <property name="can_focus">False</property>
9b746a
         <child>
9b746a
-          <object class="GtkGrid">
9b746a
+          <object class="GtkGrid" id="main_box">
9b746a
             <property name="visible">True</property>
9b746a
             <property name="can_focus">False</property>
9b746a
             <property name="margin_start">24</property>
9b746a
-- 
9b746a
2.23.0
9b746a