summaryrefslogtreecommitdiff
path: root/panels/common/cc-permission-infobar.h
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2019-12-19 15:45:23 +0100
committerFelipe Borges <felipeborges@gnome.org>2020-01-06 14:43:11 +0000
commit5d2a884ac7c10516ecf7eda61d31f5c3600b0e61 (patch)
tree888fddf0f8cdd912109c8f94d87e79862aa3ad42 /panels/common/cc-permission-infobar.h
parentf7ac015d7a6aa3ba29c39ab3c518f52e21884535 (diff)
downloadgnome-control-center-5d2a884ac7c10516ecf7eda61d31f5c3600b0e61.tar.gz
common: Introduce "CcPermissionInfobar" widget
The "CcPermissionInfobar" widget is a more descriptive way to communicate that some Settings panel needs authentication in order to perform certain actions. This widget doesn't handle the permissions (as in GPermission) itself. It needs to be binded to an existing instance of GPermission, and it will react to the permission's state (show when the current user is not authorized, and hide when the user is authorized). This is part of a big set of changes that aim to set a consistent authentication method accross Settings panels. See #685, #556, and #771
Diffstat (limited to 'panels/common/cc-permission-infobar.h')
-rw-r--r--panels/common/cc-permission-infobar.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/panels/common/cc-permission-infobar.h b/panels/common/cc-permission-infobar.h
new file mode 100644
index 000000000..4595a8b47
--- /dev/null
+++ b/panels/common/cc-permission-infobar.h
@@ -0,0 +1,34 @@
+/* cc-permission-infobar.h
+ *
+ * Copyright (C) 2020 Red Hat, Inc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s):
+ * Felipe Borges <felipeborges@gnome.org>
+ *
+ */
+#pragma once
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define CC_TYPE_PERMISSION_INFOBAR (cc_permission_infobar_get_type())
+G_DECLARE_FINAL_TYPE (CcPermissionInfobar, cc_permission_infobar, CC, PERMISSION_INFOBAR, GtkRevealer)
+
+void cc_permission_infobar_set_permission (CcPermissionInfobar *self,
+ GPermission *permission);
+
+G_END_DECLS