[gnome-control-center] Add a cc_panel_get_permission method



commit 9cdd557ecac496bb22907e311cc54daa91b4e457
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 20 21:24:43 2011 -0400

    Add a cc_panel_get_permission method
    
    This is in preparation for moving lock buttons to the toolbar.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650292

 libgnome-control-center/cc-panel.c |   10 ++++++++++
 libgnome-control-center/cc-panel.h |    3 +++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-control-center/cc-panel.c b/libgnome-control-center/cc-panel.c
index 0ed5627..f408f2b 100644
--- a/libgnome-control-center/cc-panel.c
+++ b/libgnome-control-center/cc-panel.c
@@ -221,3 +221,13 @@ cc_panel_get_shell (CcPanel *panel)
   return panel->priv->shell;
 }
 
+GPermission *
+cc_panel_get_permission (CcPanel *panel)
+{
+  CcPanelClass *class = CC_PANEL_GET_CLASS (panel);
+
+  if (class->get_permission)
+    return class->get_permission (panel);
+
+  return NULL;
+}
diff --git a/libgnome-control-center/cc-panel.h b/libgnome-control-center/cc-panel.h
index b1518c8..1666b51 100644
--- a/libgnome-control-center/cc-panel.h
+++ b/libgnome-control-center/cc-panel.h
@@ -66,12 +66,15 @@ struct _CcPanelClass
 {
   /*< private >*/
   GtkBinClass parent_class;
+
+  GPermission * (* get_permission) (CcPanel *panel);
 };
 
 GType        cc_panel_get_type         (void);
 
 CcShell*     cc_panel_get_shell        (CcPanel     *panel);
 
+GPermission *cc_panel_get_permission   (CcPanel     *panel);
 
 G_END_DECLS
 



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