[gnome-builder/wip/gtk4-port: 461/736] libide/greeter: fix back button




commit 4b2b704f1dc23ff9872cf07fef46e18e6525fe3c
Author: Christian Hergert <chergert redhat com>
Date:   Wed Apr 6 18:05:43 2022 -0700

    libide/greeter: fix back button

 src/libide/greeter/ide-greeter-workspace.c  |  2 ++
 src/libide/greeter/ide-greeter-workspace.ui | 13 +++----------
 2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/libide/greeter/ide-greeter-workspace.c b/src/libide/greeter/ide-greeter-workspace.c
index 83f1aa702..fcaf3af39 100644
--- a/src/libide/greeter/ide-greeter-workspace.c
+++ b/src/libide/greeter/ide-greeter-workspace.c
@@ -1006,6 +1006,8 @@ ide_greeter_workspace_set_page_name (IdeGreeterWorkspace *self,
     name = "overview";
 
   gtk_stack_set_visible_child_name (self->pages, name);
+  gtk_widget_set_visible (GTK_WIDGET (self->back_button),
+                          !ide_str_equal0 (name, "overview"));
 }
 
 void
diff --git a/src/libide/greeter/ide-greeter-workspace.ui b/src/libide/greeter/ide-greeter-workspace.ui
index 93ea74ab6..52417fb46 100644
--- a/src/libide/greeter/ide-greeter-workspace.ui
+++ b/src/libide/greeter/ide-greeter-workspace.ui
@@ -10,19 +10,12 @@
         </child>
         <child type="left">
           <object class="GtkButton" id="back_button">
-            <property name="action-name">win.surface</property>
-            <property name="action-target">'sections'</property>
+            <property name="action-name">greeter.page</property>
+            <property name="action-target">'overview'</property>
             <property name="has-tooltip">true</property>
             <property name="tooltip-text" translatable="yes">Go back</property>
             <property name="margin-end">6</property>
-            <style>
-              <class name="image-button"/>
-            </style>
-            <child>
-              <object class="GtkImage">
-                <property name="icon-name">go-previous-symbolic</property>
-              </object>
-            </child>
+            <property name="icon-name">go-previous-symbolic</property>
           </object>
         </child>
         <child type="left">


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