[gnome-flashback] screensaver: show indicator_box only if button is visible



commit dfdd4f9cb44e9b5012c251c09f63305a9d91c45e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Mar 25 23:09:26 2020 +0200

    screensaver: show indicator_box only if button is visible
    
    https://gitlab.gnome.org/GNOME/gnome-flashback/-/issues/45

 gnome-flashback/libscreensaver/gf-unlock-dialog.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/libscreensaver/gf-unlock-dialog.c 
b/gnome-flashback/libscreensaver/gf-unlock-dialog.c
index 7b21c61..ed23c1e 100644
--- a/gnome-flashback/libscreensaver/gf-unlock-dialog.c
+++ b/gnome-flashback/libscreensaver/gf-unlock-dialog.c
@@ -1025,8 +1025,11 @@ gf_unlock_dialog_set_input_sources (GfUnlockDialog *self,
   gtk_container_add (GTK_CONTAINER (self->indicator_box),
                      self->input_source_button);
 
-  gtk_widget_show (self->input_source_button);
-  gtk_widget_show (self->indicator_box);
+  g_object_bind_property (self->input_source_button,
+                          "visible",
+                          self->indicator_box,
+                          "visible",
+                          G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
 }
 
 void


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