[gtk+] Allow NULL permissions



commit e578489579e0512d50a81389e065bfd7bd95595e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 21 09:12:02 2011 -0400

    Allow NULL permissions
    
    This is useful in some scenarios.

 gtk/gtklockbutton.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c
index 913cfc2..713c2ff 100644
--- a/gtk/gtklockbutton.c
+++ b/gtk/gtklockbutton.c
@@ -660,7 +660,7 @@ gtk_lock_button_get_permission (GtkLockButton *button)
 /**
  * gtk_lock_button_set_permission:
  * @button: a #GtkLockButton
- * @permission: a #GPermission object
+ * @permission: (allow-none): a #GPermission object, or %NULL
  *
  * Sets the #GPermission object that controls @button.
  *
@@ -673,7 +673,7 @@ gtk_lock_button_set_permission (GtkLockButton *button,
   GtkLockButtonPrivate *priv;
 
   g_return_if_fail (GTK_IS_LOCK_BUTTON (button));
-  g_return_if_fail (G_IS_PERMISSION (permission));
+  g_return_if_fail (permission == NULL || G_IS_PERMISSION (permission));
 
   priv = button->priv;
 



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