[gnome-control-center/wip/feborges/new-addprinter-dialog: 2/7] printers: Introduce the "authentication-required" signal in PpHost
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/feborges/new-addprinter-dialog: 2/7] printers: Introduce the "authentication-required" signal in PpHost
- Date: Sat, 12 Nov 2016 17:53:47 +0000 (UTC)
commit c0a6396f7657b7b905c47d38fc8538f40e2670a4
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Nov 1 14:35:22 2016 +0100
printers: Introduce the "authentication-required" signal in PpHost
This signal should be emitted by hosts and derivated classes when
it is required to authenticate hosts (ask for credentials).
panels/printers/pp-host.c | 15 +++++++++++++++
panels/printers/pp-host.h | 2 ++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
index eab1c0a..8af77e9 100644
--- a/panels/printers/pp-host.c
+++ b/panels/printers/pp-host.c
@@ -38,6 +38,13 @@ enum {
PROP_PORT,
};
+enum {
+ AUTHENTICATION_REQUIRED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
static void
pp_host_finalize (GObject *object)
{
@@ -123,6 +130,14 @@ pp_host_class_init (PpHostClass *klass)
"The port",
-1, G_MAXINT32, PP_HOST_UNSET_PORT,
G_PARAM_READWRITE));
+
+ signals[AUTHENTICATION_REQUIRED] =
+ g_signal_new ("authentication-required",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (PpHostClass, authentication_required),
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
}
static void
diff --git a/panels/printers/pp-host.h b/panels/printers/pp-host.h
index 5483d85..9cdbfdd 100644
--- a/panels/printers/pp-host.h
+++ b/panels/printers/pp-host.h
@@ -52,6 +52,8 @@ struct _PpHost
struct _PpHostClass
{
GObjectClass parent_class;
+
+ void (*authentication_required) (PpHost *host);
};
GType pp_host_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]