[Spice-devel] [PATCH spice-gtk 5/5] session: bind path and read-only to webdav server

Marc-André Lureau marcandre.lureau at redhat.com
Fri Feb 20 16:40:16 PST 2015


Keep the server property in sync with the session properties
---
 gtk/spice-session.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 63a455d..e785ceb 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -2650,6 +2650,13 @@ PhodavServer* spice_session_get_webdav_server(SpiceSession *session)
         goto end;
 
     priv->webdav = phodav_server_new(shared_dir);
+    g_object_bind_property(session,  "share-dir-ro",
+                           priv->webdav, "read-only",
+                           G_BINDING_SYNC_CREATE|G_BINDING_BIDIRECTIONAL);
+    g_object_bind_property(session,  "shared-dir",
+                           priv->webdav, "root",
+                           G_BINDING_SYNC_CREATE|G_BINDING_BIDIRECTIONAL);
+
 
  end:
     g_mutex_unlock(&mutex);
-- 
2.1.0



More information about the Spice-devel mailing list