[gnome-control-center] sharing: hides the vino password by default



commit f1d52d7b3fc7da8912d0b66c40e1687e9e0ff264
Author: Jonh Wendell <jonh wendell intel com>
Date:   Mon Jun 24 16:31:58 2013 -0300

    sharing: hides the vino password by default
    
    if the user clicks on 'show password' check box, close
    the dialog and open it again, make sure to hide it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703010

 panels/sharing/cc-sharing-panel.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 10f801e..b66d6a8 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -854,6 +854,15 @@ cc_sharing_panel_check_schema_available (CcSharingPanel *self,
 }
 
 static void
+screen_sharing_show_cb (GtkWidget *widget, CcSharingPanel *self)
+{
+  CcSharingPanelPrivate *priv = self->priv;
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("show-password-checkbutton")),
+                                FALSE);
+}
+
+static void
 cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
 {
   CcSharingPanelPrivate *priv = self->priv;
@@ -909,6 +918,10 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
   g_object_bind_property (WID ("show-password-checkbutton"), "active",
                           WID ("remote-control-password-entry"), "visibility",
                           G_BINDING_SYNC_CREATE);
+
+  /* make sure the password entry is hidden by default */
+  g_signal_connect (priv->screen_sharing_dialog, "show",
+                    G_CALLBACK (screen_sharing_show_cb), self);
 }
 
 static void


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