diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 3695375..a8f810f 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -235,6 +235,7 @@ gtk_public_h_sources =          \
 	gtklayout.h             \
 	gtklinkbutton.h		\
 	gtkliststore.h		\
+	gtklockbutton.h		\
 	gtkmain.h		\
 	gtkmenu.h		\
 	gtkmenubar.h		\
@@ -500,6 +501,7 @@ gtk_base_c_sources =            \
 	gtklayout.c		\
 	gtklinkbutton.c		\
 	gtkliststore.c		\
+	gtklockbutton.c		\
 	gtkmain.c		\
 	gtkmarshalers.c		\
 	gtkmenu.c		\
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 81d9fa2..9474b25 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -118,6 +118,7 @@
 #include <gtk/gtklayout.h>
 #include <gtk/gtklinkbutton.h>
 #include <gtk/gtkliststore.h>
+#include <gtk/gtklockbutton.h>
 #include <gtk/gtkmain.h>
 #include <gtk/gtkmenu.h>
 #include <gtk/gtkmenubar.h>
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 5378217..1f29a4d 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4645,6 +4645,14 @@ gtk_info_bar_get_message_type
 #endif
 #endif
 
+#if IN_HEADER(__GTK_LOCK_BUTTON_H__)
+#if IN_FILE(__GTK_LOCK_BUTTON_C__)
+gtk_lock_button_get_type G_GNUC_CONST
+gtk_lock_button_new
+gtk_lock_button_get_permission
+#endif
+#endif
+
 #ifdef INCLUDE_VARIABLES
 gtk_binary_age
 gtk_interface_age
diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c
new file mode 100644
index 0000000..116157b
--- /dev/null
+++ b/gtk/gtklockbutton.c
@@ -0,0 +1,536 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2010 Red Hat, Inc.
+ * Author: Matthias Clasen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "gtkintl.h"
+#include "gtkbutton.h"
+#include "gtklabel.h"
+#include "gtklockbutton.h"
+
+struct _GtkLockButtonPrivate
+{
+  GPermission *permission;
+
+  gchar *text_lock;
+  gchar *text_unlock;
+  gchar *text_not_authorized;
+
+  gchar *tooltip_lock;
+  gchar *tooltip_unlock;
+  gchar *tooltip_not_authorized;
+
+  GtkWidget *button;
+  GtkWidget *label;
+
+  GCancellable *cancellable;
+
+  gboolean constructed;
+};
+
+enum
+{
+  PROP_0,
+  PROP_PERMISSION,
+  PROP_TEXT_LOCK,
+  PROP_TEXT_UNLOCK,
+  PROP_TEXT_NOT_AUTHORIZED,
+  PROP_TOOLTIP_LOCK,
+  PROP_TOOLTIP_UNLOCK,
+  PROP_TOOLTIP_NOT_AUTHORIZED
+};
+
+enum
+{
+  CHANGED_SIGNAL,
+  LAST_SIGNAL,
+};
+
+static guint signals[LAST_SIGNAL] = {0, };
+
+static void initiate_check (GtkLockButton *button);
+static void do_sync_check (GtkLockButton *button);
+static void update_state (GtkLockButton *button);
+
+static void on_permission_changed (GPermission *permission,
+                                   GParamSpec  *pspec,
+                                   gpointer     user_data);
+
+static void on_clicked (GtkButton *button,
+                        gpointer   user_data);
+
+G_DEFINE_TYPE (GtkLockButton, gtk_lock_button, GTK_TYPE_BOX);
+
+static void
+gtk_lock_button_finalize (GObject *object)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (object);
+  GtkLockButtonPrivate *priv = button->priv;
+
+  g_free (priv->text_lock);
+  g_free (priv->text_unlock);
+  g_free (priv->text_not_authorized);
+
+  g_free (priv->tooltip_lock);
+  g_free (priv->tooltip_unlock);
+  g_free (priv->tooltip_not_authorized);
+
+  if (priv->cancellable != NULL)
+    {
+      g_cancellable_cancel (priv->cancellable);
+      g_object_unref (priv->cancellable);
+    }
+
+  g_signal_handlers_disconnect_by_func (priv->permission,
+                                        on_permission_changed,
+                                        button);
+
+  g_object_unref (priv->permission);
+
+  G_OBJECT_CLASS (gtk_lock_button_parent_class)->finalize (object);
+}
+
+static void
+gtk_lock_button_get_property (GObject    *object,
+                              guint       property_id,
+                              GValue     *value,
+                              GParamSpec *pspec)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (object);
+  GtkLockButtonPrivate *priv = button->priv;
+
+  switch (property_id)
+    {
+    case PROP_PERMISSION:
+      g_value_set_object (value, priv->permission);
+      break;
+
+    case PROP_TEXT_LOCK:
+      g_value_set_string (value, priv->text_lock);
+      break;
+
+    case PROP_TEXT_UNLOCK:
+      g_value_set_string (value, priv->text_unlock);
+      break;
+
+    case PROP_TEXT_NOT_AUTHORIZED:
+      g_value_set_string (value, priv->text_not_authorized);
+      break;
+
+    case PROP_TOOLTIP_LOCK:
+      g_value_set_string (value, priv->tooltip_lock);
+      break;
+
+    case PROP_TOOLTIP_UNLOCK:
+      g_value_set_string (value, priv->tooltip_unlock);
+      break;
+
+    case PROP_TOOLTIP_NOT_AUTHORIZED:
+      g_value_set_string (value, priv->tooltip_not_authorized);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+}
+
+static void
+gtk_lock_button_set_property (GObject      *object,
+                              guint         property_id,
+                              const GValue *value,
+                              GParamSpec   *pspec)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (object);
+  GtkLockButtonPrivate *priv = button->priv;
+
+  switch (property_id)
+    {
+    case PROP_PERMISSION:
+      priv->permission = g_value_get_object (value);
+      break;
+
+    case PROP_TEXT_LOCK:
+      g_free (priv->text_lock);
+      priv->text_lock = g_value_dup_string (value);
+      break;
+
+    case PROP_TEXT_UNLOCK:
+      g_free (priv->text_unlock);
+      priv->text_unlock = g_value_dup_string (value);
+      break;
+
+    case PROP_TEXT_NOT_AUTHORIZED:
+      g_free (priv->text_not_authorized);
+      priv->text_not_authorized = g_value_dup_string (value);
+      break;
+
+    case PROP_TOOLTIP_LOCK:
+      g_free (priv->tooltip_lock);
+      priv->tooltip_lock = g_value_dup_string (value);
+      break;
+
+    case PROP_TOOLTIP_UNLOCK:
+      g_free (priv->tooltip_unlock);
+      priv->tooltip_unlock = g_value_dup_string (value);
+      break;
+
+    case PROP_TOOLTIP_NOT_AUTHORIZED:
+      g_free (priv->tooltip_not_authorized);
+      priv->tooltip_not_authorized = g_value_dup_string (value);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      break;
+    }
+
+  if (priv->constructed)
+    update_state (button);
+}
+
+static void
+gtk_lock_button_init (GtkLockButton *button)
+{
+  button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
+                                              GTK_TYPE_LOCK_BUTTON,
+                                              GtkLockButtonPrivate);
+}
+
+static void
+gtk_lock_button_constructed (GObject *object)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (object);
+  GtkLockButtonPrivate *priv = button->priv;
+
+  priv->constructed = TRUE;
+
+  g_signal_connect (priv->permission, "notify",
+                    G_CALLBACK (on_permission_changed), button);
+
+  gtk_box_set_spacing (GTK_BOX (button), 2);
+
+  priv->button = gtk_button_new ();
+  gtk_button_set_relief (GTK_BUTTON (priv->button), GTK_RELIEF_NONE);
+  /* image is set in update_state() */
+  g_signal_connect (priv->button, "clicked",
+                    G_CALLBACK (on_clicked), button);
+
+  gtk_box_pack_start (GTK_BOX (button), priv->button, FALSE, FALSE, 0);
+
+  priv->label = gtk_label_new ("");
+  gtk_box_pack_start (GTK_BOX (button), priv->label, FALSE, FALSE, 0);
+
+  gtk_widget_set_no_show_all (priv->button, TRUE);
+  gtk_widget_set_no_show_all (priv->label, TRUE);
+
+  update_state (button);
+
+  if (G_OBJECT_CLASS (gtk_lock_button_parent_class)->constructed != NULL)
+    G_OBJECT_CLASS (gtk_lock_button_parent_class)->constructed (object);
+}
+
+static void
+gtk_lock_button_class_init (GtkLockButtonClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->finalize     = gtk_lock_button_finalize;
+  gobject_class->get_property = gtk_lock_button_get_property;
+  gobject_class->set_property = gtk_lock_button_set_property;
+  gobject_class->constructed  = gtk_lock_button_constructed;
+
+  g_type_class_add_private (klass, sizeof (GtkLockButtonPrivate));
+
+  g_object_class_install_property (gobject_class, PROP_PERMISSION,
+    g_param_spec_object ("permission",
+                         P_("Permission"),
+                         P_("The GPermission object controlling this button"),
+                         G_TYPE_PERMISSION,
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT_ONLY |
+                         G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TEXT_LOCK,
+    g_param_spec_string ("text-lock",
+                         P_("Lock Text"),
+                         P_("The text to display when prompting the user to lock."),
+                         _("Click to prevent changes"),
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT |
+                         G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TEXT_UNLOCK,
+    g_param_spec_string ("text-unlock",
+                         P_("Unlock Text"),
+                         P_("The text to display when prompting the user to unlock."),
+                         _("Click to make changes"),
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT |
+                         G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TEXT_NOT_AUTHORIZED,
+    g_param_spec_string ("text-not-authorized",
+                         P_("Not Authorized Text"),
+                         P_("The text to display when prompting the user cannot obtain authorization."),
+                         _("Not authorized to make changes"),
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT |
+                         G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TOOLTIP_LOCK,
+    g_param_spec_string ("tooltip-lock",
+                         P_("Lock Tooltip"),
+                         P_("The tooltip to display when prompting the user to lock."),
+                         _("To prevent further changes, click the lock."),
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT |
+                         G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TOOLTIP_UNLOCK,
+    g_param_spec_string ("tooltip-unlock",
+                         P_("Unlock Tooltip"),
+                         P_("The tooltip to display when prompting the user to unlock."),
+                         _("Authentication is needed to make changes."),
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT |
+                         G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TOOLTIP_NOT_AUTHORIZED,
+    g_param_spec_string ("tooltip-not-authorized",
+                         P_("Not Authorized Tooltip"),
+                         P_("The tooltip to display when prompting the user cannot obtain authorization."),
+                         _("System policy prevents changes. Contact your system administrator."),
+                         G_PARAM_READWRITE |
+                         G_PARAM_CONSTRUCT |
+                         G_PARAM_STATIC_STRINGS));
+
+  signals[CHANGED_SIGNAL] = g_signal_new ("changed",
+                                          G_TYPE_FROM_CLASS (klass),
+                                          G_SIGNAL_RUN_LAST,
+                                          G_STRUCT_OFFSET (GtkLockButtonClass, changed),
+                                          NULL,
+                                          NULL,
+                                          g_cclosure_marshal_VOID__VOID,
+                                          G_TYPE_NONE,
+                                          0);
+}
+
+/**
+ * gtk_lock_button_new:
+ * @permission: a #GPermission
+ *
+ * Creates a new lock button which reflects the @permission.
+ *
+ * Returns: a new #GtkLockButton
+ *
+ * Since: 3.0
+ */
+GtkWidget *
+gtk_lock_button_new (GPermission *permission)
+{
+  g_return_val_if_fail (permission != NULL, NULL);
+
+  return GTK_WIDGET (g_object_new (GTK_TYPE_LOCK_BUTTON,
+                                   "permission", permission,
+                                   NULL));
+}
+
+static void
+update_state (GtkLockButton *button)
+{
+  GtkLockButtonPrivate *priv = button->priv;
+  const gchar *text;
+  const gchar *tooltip;
+  gboolean sensitive;
+  gboolean visible;
+  GtkWidget *image;
+
+  visible = TRUE;
+  sensitive = TRUE;
+
+  if (g_permission_get_allowed (priv->permission))
+    {
+      if (g_permission_get_can_release (priv->permission))
+        {
+          text = priv->text_lock;
+          tooltip = priv->tooltip_lock;
+          sensitive = TRUE;
+        }
+      else
+        {
+          text = "";
+          tooltip = "";
+          visible = FALSE;
+        }
+    }
+  else
+    {
+      if (g_permission_get_can_acquire (priv->permission))
+        {
+          text = button->priv->text_unlock;
+          tooltip = button->priv->tooltip_unlock;
+          sensitive = TRUE;
+        }
+      else
+        {
+          text = button->priv->text_not_authorized;
+          tooltip = button->priv->tooltip_not_authorized;
+          sensitive = FALSE;
+        }
+    }
+
+  image = gtk_image_new_from_icon_name (g_permission_get_allowed (priv->permission) ? "changes-allow" : "changes-prevent",
+                                        GTK_ICON_SIZE_SMALL_TOOLBAR);
+  gtk_button_set_image (GTK_BUTTON (priv->button), image);
+  gtk_label_set_text (GTK_LABEL (priv->label), text);
+  gtk_widget_set_sensitive (priv->button, sensitive);
+
+  gtk_widget_set_tooltip_markup (GTK_WIDGET (priv->label), tooltip);
+  gtk_widget_set_tooltip_markup (GTK_WIDGET (priv->button), tooltip);
+
+  if (visible)
+    {
+      gtk_widget_show (priv->button);
+      gtk_widget_show (priv->label);
+    }
+  else
+    {
+      gtk_widget_hide (priv->button);
+      gtk_widget_hide (priv->label);
+    }
+}
+
+static void
+on_permission_changed (GPermission *permission,
+                       GParamSpec  *pspec,
+                       gpointer     user_data)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (user_data);
+
+  update_state (button);
+}
+
+static void
+acquire_cb (GObject      *source,
+            GAsyncResult *result,
+            gpointer      user_data)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (user_data);
+  GtkLockButtonPrivate *priv = button->priv;
+  GError *error;
+  gboolean res;
+
+  error = NULL;
+  res = g_permission_acquire_finish (priv->permission, result, &error);
+
+  if (error)
+    {
+      g_warning ("Error acquiring permission: %s", error->message);
+      g_error_free (error);
+    }
+
+  g_object_unref (priv->cancellable);
+  priv->cancellable = NULL;
+
+  update_state (button);
+}
+
+static void
+release_cb (GObject      *source,
+            GAsyncResult *result,
+            gpointer      user_data)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (user_data);
+  GtkLockButtonPrivate *priv = button->priv;
+  GError *error;
+  gboolean res;
+
+  error = NULL;
+  res = g_permission_release_finish (priv->permission, result, &error);
+
+  if (error)
+    {
+      g_warning ("Error releasing permission: %s", error->message);
+      g_error_free (error);
+    }
+
+  g_object_unref (priv->cancellable);
+  priv->cancellable = NULL;
+
+  update_state (button);
+}
+
+static void
+on_clicked (GtkButton *_button,
+            gpointer   user_data)
+{
+  GtkLockButton *button = GTK_LOCK_BUTTON (user_data);
+  GtkLockButtonPrivate *priv = button->priv;
+
+  if (!g_permission_get_allowed (priv->permission) &&
+       g_permission_get_can_acquire (priv->permission))
+    {
+      /* if we already have a pending interactive check, then do nothing */
+      if (priv->cancellable != NULL)
+        goto out;
+
+      priv->cancellable = g_cancellable_new ();
+
+      g_permission_acquire_async (priv->permission,
+                                  priv->cancellable,
+                                  acquire_cb,
+                                  button);
+    }
+  else if (g_permission_get_allowed (priv->permission) &&
+           g_permission_get_can_release (priv->permission))
+    {
+      /* if we already have a pending interactive check, then do nothing */
+      if (priv->cancellable != NULL)
+        goto out;
+
+      priv->cancellable = g_cancellable_new ();
+
+      g_permission_release_async (priv->permission,
+                                  priv->cancellable,
+                                  release_cb,
+                                  button);
+    }
+
+ out: ;
+}
+
+/**
+ * gtk_lock_button_get_permission:
+ * @button: a #GtkLockButton
+ *
+ * Obtains the #GPermission object that controls @button.
+ *
+ * Returns: the #GPermission of @button
+ *
+ * Since: 3.0
+ */
+GPermission *
+gtk_lock_button_get_permission (GtkLockButton *button)
+{
+  g_return_val_if_fail (GTK_IS_LOCK_BUTTON (button), NULL);
+
+  return button->priv->permission;
+}
+
diff --git a/gtk/gtklockbutton.h b/gtk/gtklockbutton.h
new file mode 100644
index 0000000..4cd2eb5
--- /dev/null
+++ b/gtk/gtklockbutton.h
@@ -0,0 +1,70 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2010 Red Hat, Inc.
+ * Author: Matthias Clasen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTK_LOCK_BUTTON_H__
+#define __GTK_LOCK_BUTTON_H__
+
+#include <gtk/gtkbox.h>
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_LOCK_BUTTON         (gtk_lock_button_get_type ())
+#define GTK_LOCK_BUTTON(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_LOCK_BUTTON, GtkLockButton))
+#define GTK_LOCK_BUTTON_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), GTK_LOCK_BUTTON,  GtkLockButtonClass))
+#define GTK_IS_LOCK_BUTTON(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_LOCK_BUTTON))
+#define GTK_IS_LOCK_BUTTON_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_LOCK_BUTTON))
+#define GTK_LOCK_BUTTON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_LOCK_BUTTON, GtkLockButtonClass))
+
+typedef struct _GtkLockButton        GtkLockButton;
+typedef struct _GtkLockButtonClass   GtkLockButtonClass;
+typedef struct _GtkLockButtonPrivate GtkLockButtonPrivate;
+
+struct _GtkLockButton
+{
+  GtkBox parent;
+
+  GtkLockButtonPrivate *priv;
+};
+
+struct _GtkLockButtonClass
+{
+  GtkBoxClass parent_class;
+
+  void (*changed) (GtkLockButton *button);
+
+  void (*reserved0) (void);
+  void (*reserved1) (void);
+  void (*reserved2) (void);
+  void (*reserved3) (void);
+  void (*reserved4) (void);
+  void (*reserved5) (void);
+  void (*reserved6) (void);
+  void (*reserved7) (void);
+};
+
+GType        gtk_lock_button_get_type       (void) G_GNUC_CONST;
+GtkWidget   *gtk_lock_button_new            (GPermission   *permission);
+GPermission *gtk_lock_button_get_permission (GtkLockButton *button);
+
+
+G_END_DECLS
+
+#endif  /* __GTK_LOCK_BUTTON_H__ */
diff --git a/po-properties/POTFILES.in b/po-properties/POTFILES.in
index c2f36b7..14c1244 100644
--- a/po-properties/POTFILES.in
+++ b/po-properties/POTFILES.in
@@ -106,6 +106,7 @@ gtk/gtklabel.c
 gtk/gtklayout.c
 gtk/gtklinkbutton.c
 gtk/gtkliststore.c
+gtk/gtklockbutton.c
 gtk/gtkmain.c
 gtk/gtkmenu.c
 gtk/gtkmenubar.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 38baf91..9bb0e63 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -111,6 +111,7 @@ gtk/gtklabel.c
 gtk/gtklayout.c
 gtk/gtklinkbutton.c
 gtk/gtkliststore.c
+gtk/gtklockbutton.c
 gtk/gtkmain.c
 gtk/gtkmenubar.c
 gtk/gtkmenu.c
