[gnome-initial-setup/fix-account-local-enterprise-switch] account: fix hiding Enterprise Login when realmd is missing



commit 342a7f7f7884b22f75857f63c86f2bf0b1414c73
Author: Will Thompson <will willthompson co uk>
Date:   Fri Mar 1 14:51:41 2019 +0000

    account: fix hiding Enterprise Login when realmd is missing
    
    When realmd is not running, GisAccountPageEnterprise makes itself
    invisible. This was previously propagated to the toggle button. But
    6ef744e introduced a stack above the toggle button; as a result, the
    enterprise page hiding itself caused the stack's visible child to be
    hidden, which caused the stack to show its other child, the “Go online
    to set up Enterprise Login.” label.
    
    Toggling the network off and on does not change this, because
    gtk_stack_set_visible_child() is a no-op if the given child is not
    visible, so the label was always shown regardless of whether the network
    is available or not.
    
    The fix is to bind the visibility of the enterprise page to the
    visibility of the stack, not to the toggle within it.

 gnome-initial-setup/pages/account/gis-account-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c 
b/gnome-initial-setup/pages/account/gis-account-page.c
index e485d31..089ab97 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -244,7 +244,7 @@ gis_account_page_constructed (GObject *object)
 
   g_signal_connect (priv->page_toggle, "toggled", G_CALLBACK (toggle_mode), page);
   g_object_bind_property (page, "applying", priv->page_toggle, "sensitive", G_BINDING_INVERT_BOOLEAN);
-  g_object_bind_property (priv->page_enterprise, "visible", priv->page_toggle, "visible", G_BINDING_DEFAULT 
| G_BINDING_SYNC_CREATE);
+  g_object_bind_property (priv->page_enterprise, "visible", priv->offline_stack, "visible", 
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
 
   /* force a refresh by setting to an invalid value */
   priv->mode = NUM_MODES;


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