[gnome-text-editor] window: lock flap when not in use



commit fce6e44fab1cd87d3a724a7f4db9781c21051414
Author: Christian Hergert <chergert redhat com>
Date:   Thu Oct 7 15:49:42 2021 -0700

    window: lock flap when not in use
    
    Fixes #174

 src/editor-window-actions.c | 2 ++
 src/editor-window.ui        | 1 +
 2 files changed, 3 insertions(+)
---
diff --git a/src/editor-window-actions.c b/src/editor-window-actions.c
index 6b357a6..1057e79 100644
--- a/src/editor-window-actions.c
+++ b/src/editor-window-actions.c
@@ -523,6 +523,7 @@ editor_window_actions_show_preferences_cb (GtkWidget  *widget,
 
   g_assert (EDITOR_IS_WINDOW (self));
 
+  adw_flap_set_locked (self->flap, FALSE);
   adw_flap_set_reveal_flap (self->flap, TRUE);
 }
 
@@ -536,6 +537,7 @@ editor_window_actions_hide_preferences_cb (GtkWidget  *widget,
   g_assert (EDITOR_IS_WINDOW (self));
 
   adw_flap_set_reveal_flap (self->flap, FALSE);
+  adw_flap_set_locked (self->flap, TRUE);
 }
 
 void
diff --git a/src/editor-window.ui b/src/editor-window.ui
index 70f45ce..8727e28 100644
--- a/src/editor-window.ui
+++ b/src/editor-window.ui
@@ -124,6 +124,7 @@
             <property name="flap-position">end</property>
             <property name="transition-type">over</property>
             <property name="reveal-flap">false</property>
+            <property name="locked">true</property>
             <child type="separator">
               <object class="GtkSeparator">
                 <property name="orientation">vertical</property>


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