[vino] Add vino_server_set_notify_on_connect()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vino] Add vino_server_set_notify_on_connect()
- Date: Wed, 25 Apr 2012 06:43:54 +0000 (UTC)
commit 6ee6efc76a611cf7a2483f07c20d53ed7c920f3d
Author: David King <amigadave amigadave com>
Date: Wed Apr 25 07:34:49 2012 +0100
Add vino_server_set_notify_on_connect()
Without the property setter, g_settings_bind() cannot update the
notify-on-connect property when the setting changes.
server/vino-server.c | 18 ++++++++++++++++++
server/vino-server.h | 1 +
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/server/vino-server.c b/server/vino-server.c
index eeb8a2a..bdc0963 100644
--- a/server/vino-server.c
+++ b/server/vino-server.c
@@ -136,6 +136,8 @@ static enum rfbNewClientAction vino_server_auth_client (VinoServer *server,
static void vino_server_setup_framebuffer (VinoServer *server);
static void vino_server_release_framebuffer (VinoServer *server);
static void vino_server_update_security_types (VinoServer *server);
+static void vino_server_set_notify_on_connect (VinoServer *server,
+ gboolean notify_on_connect);
static gpointer parent_class;
@@ -1204,6 +1206,9 @@ vino_server_set_property (GObject *object,
case PROP_DISABLE_XDAMAGE:
vino_server_set_disable_xdamage (server, g_value_get_boolean (value));
break;
+ case PROP_NOTIFY_ON_CONNECT:
+ vino_server_set_notify_on_connect (server, g_value_get_boolean (value));
+ break;
case PROP_REJECT_INCOMING:
vino_server_set_reject_incoming (server, g_value_get_boolean (value));
break;
@@ -1924,6 +1929,19 @@ vino_server_set_lock_screen (VinoServer *server,
}
}
+static void
+vino_server_set_notify_on_connect (VinoServer *server,
+ gboolean notify_on_connect)
+{
+ g_return_if_fail (VINO_IS_SERVER (server));
+
+ if (server->priv->notify_on_connect == notify_on_connect)
+ return;
+
+ server->priv->notify_on_connect = notify_on_connect;
+ g_object_notify (G_OBJECT (server), "notify-on-connect");
+}
+
gboolean
vino_server_get_notify_on_connect (VinoServer *server)
{
diff --git a/server/vino-server.h b/server/vino-server.h
index d3defc8..01fa19e 100644
--- a/server/vino-server.h
+++ b/server/vino-server.h
@@ -120,6 +120,7 @@ gboolean vino_server_get_use_upnp (VinoServer *serve
void vino_server_set_disable_xdamage (VinoServer *server,
gboolean disable_xdamage);
gboolean vino_server_get_disable_xdamage (VinoServer *server);
+gboolean vino_server_get_notify_on_connect (VinoServer *server);
void vino_server_set_reject_incoming (VinoServer *server,
gboolean reject);
gboolean vino_server_get_reject_incoming (VinoServer *server);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]