[connections/fix-simultaneous-displays-2: 1/6] display-view: Use stack child names for switching visible child




commit ccb29508d610606f3964348b85e999d839c38da2
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Jul 28 11:35:53 2021 +0200

    display-view: Use stack child names for switching visible child

 src/display-view.vala  | 5 +----
 src/ui/display-view.ui | 5 ++++-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/display-view.vala b/src/display-view.vala
index ab8c986..1548fb4 100644
--- a/src/display-view.vala
+++ b/src/display-view.vala
@@ -31,9 +31,6 @@ namespace Connections {
         [GtkChild]
         private unowned Stack stack;
 
-        [GtkChild]
-        private unowned Widget display_widget;
-
         [GtkChild]
         private unowned Label size_label;
         [GtkChild]
@@ -93,7 +90,7 @@ namespace Connections {
         }
 
         private void show_display () {
-            stack.set_visible_child (display_widget);
+            stack.set_visible_child_name ("display");
         }
 
         [GtkCallback]
diff --git a/src/ui/display-view.ui b/src/ui/display-view.ui
index 51a5037..bc5c3b6 100644
--- a/src/ui/display-view.ui
+++ b/src/ui/display-view.ui
@@ -26,7 +26,7 @@
           </child>
 
           <child>
-            <object class="GtkOverlay" id="display_widget">
+            <object class="GtkOverlay">
               <property name="visible">True</property>
 
               <child type="overlay">
@@ -72,6 +72,9 @@
                 </object>
               </child>
             </object>
+            <packing>
+              <property name="name">display</property>
+            </packing>
 
           </child>
         </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]