[X2Go-Commits] [libx2goclient] 25/44: src/x2goclient-network.c: add getter and setters for {write, read}-only properties.

git-admin at x2go.org git-admin at x2go.org
Fri Sep 18 01:55:39 CEST 2020


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository libx2goclient.

commit ddeb5313ffa880e392d1fb103102dc21a9a0864b
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Aug 5 14:26:33 2020 +0200

    src/x2goclient-network.c: add getter and setters for {write,read}-only properties.
    
    Even though the glib system will disallow access to these properties, it
    doesn't hurt to have the infrastructure available in case this ever
    changes.
---
 src/x2goclient-network.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c
index 2ce92a6..d076817 100644
--- a/src/x2goclient-network.c
+++ b/src/x2goclient-network.c
@@ -212,6 +212,10 @@ static void x2goclient_network_set_property (GObject * const object, guint prop_
                                       priv->socket_spec = g_value_dup_boxed (value);
                                       priv->socket = x2goclient_network_parse_sockspec (self, priv->socket_spec);
                                       break;
+    case (X2GO_NET_PROP_SOCKET):
+                                 g_clear_object (&(priv->socket));
+                                 priv->socket = g_value_dup_object (value);
+                                 break;
     case (X2GO_NET_PROP_OPTIONS):
                                   g_clear_object (&(priv->options));
                                   priv->options = g_value_dup_object (value);
@@ -235,6 +239,9 @@ static void x2goclient_network_get_property (GObject * const object, const guint
   X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (self);
 
   switch (prop_id) {
+    case (X2GO_NET_PROP_SOCKET_SPEC):
+                                      g_value_set_boxed (value, priv->socket_spec);
+                                      break;
     case (X2GO_NET_PROP_SOCKET):
                                  g_value_set_object (value, priv->socket);
                                  break;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git


More information about the x2go-commits mailing list