[gnome-control-center] shell: Don't update the visibility of the lock button



commit 0402e73b8f957921d1bcdf309dce84a7537d1f43
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jun 10 16:52:26 2011 +0200

    shell: Don't update the visibility of the lock button
    
    Currently the lock button's visibility is updated on permission
    changes - if the active panel does provide a permission object,
    the button is shown, otherwise hidden.
    As GtkLockButton itself does manage its visibility, it is not
    necessary to handle it in g-c-c. In fact it is harmful, as the
    more sophisticated handling in GtkLockButton is overwritten: for
    instances, GtkLockButton hides itself if an action is allowed and
    the permission can not be released. By overwriting the behavior,
    gnome-control-center ends up showing a non-functional button.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652299

 shell/gnome-control-center.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 4ffaf92..c4a9289 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -563,23 +563,11 @@ setup_search (GnomeControlCenter *shell)
 }
 
 static void
-permission_changed_cb (GtkWidget *button, GParamSpec *pspec, gpointer data)
-{
-  if (gtk_lock_button_get_permission (GTK_LOCK_BUTTON (button)) != NULL)
-    gtk_widget_show (button);
-  else
-    gtk_widget_hide (button);
-}
-
-static void
 setup_lock (GnomeControlCenter *shell)
 {
   GnomeControlCenterPrivate *priv = shell->priv;
 
   priv->lock_button = W (priv->builder, "lock-button");
-
-  g_signal_connect (priv->lock_button, "notify::permission",
-                    G_CALLBACK (permission_changed_cb), NULL);
 }
 
 static void



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