[virt-tools-list] [PATCH virt-viewer 14/17] Remove usage of deprecated property

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jan 27 13:51:33 UTC 2012


---
 configure.ac                    |    2 +-
 src/virt-viewer-display-spice.c |    1 -
 src/virt-viewer-session-spice.c |    5 +++++
 virt-viewer.spec.in             |    4 ++--
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6aaa0dc..0737332 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ LIBVIRT_REQUIRED="0.6.0"
 GTK2_REQUIRED="2.12.0"
 GTK3_REQUIRED="3.0"
 GTK_VNC_REQUIRED="0.4.3"
-SPICE_GTK_REQUIRED="0.6.174"
+SPICE_GTK_REQUIRED="0.8"
 
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
index 2ae40dd..7f4bec4 100644
--- a/src/virt-viewer-display-spice.c
+++ b/src/virt-viewer-display-spice.c
@@ -181,7 +181,6 @@ virt_viewer_display_spice_new(SpiceChannel *channel,
 		     "grab-keyboard", TRUE,
 		     "grab-mouse", TRUE,
 		     "scaling", TRUE,
-		     "auto-clipboard", TRUE,
 		     "resize-guest", TRUE,
 		     NULL);
 
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 763b28d..0f1d387 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -36,6 +36,7 @@ G_DEFINE_TYPE (VirtViewerSessionSpice, virt_viewer_session_spice, VIRT_VIEWER_TY
 
 struct _VirtViewerSessionSpicePrivate {
 	SpiceSession *session;
+	SpiceGtkSession *gtk_session;
 	SpiceAudio *audio;
 };
 
@@ -158,6 +159,9 @@ create_spice_session(VirtViewerSessionSpice *self)
 	self->priv->session = spice_session_new();
 	spice_set_session_option(self->priv->session);
 
+	self->priv->gtk_session = spice_gtk_session_get(self->priv->session);
+	g_object_set(self->priv->gtk_session, "auto-clipboard", TRUE, NULL);
+
 	g_signal_connect(self->priv->session, "channel-new",
 			 G_CALLBACK(virt_viewer_session_spice_channel_new), self);
 	g_signal_connect(self->priv->session, "channel-destroy",
@@ -182,6 +186,7 @@ virt_viewer_session_spice_close(VirtViewerSession *session)
 		spice_session_disconnect(self->priv->session);
 		g_object_unref(self->priv->session);
 		self->priv->session = NULL;
+		self->priv->gtk_session = NULL;
 
 		if (self->priv->audio)
 			g_object_unref(self->priv->audio);
diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
index e27eae6..f29e564 100644
--- a/virt-viewer.spec.in
+++ b/virt-viewer.spec.in
@@ -44,9 +44,9 @@ BuildRequires: gtk-vnc-devel >= 0.4.3
 %endif
 %if %{with_spice}
 %if %{with_gtk3}
-BuildRequires: spice-gtk3-devel >= 0.6
+BuildRequires: spice-gtk3-devel >= 0.8
 %else
-BuildRequires: spice-gtk-devel >= 0.6
+BuildRequires: spice-gtk-devel >= 0.8
 %endif
 %endif
 BuildRequires: /usr/bin/pod2man
-- 
1.7.7.6




More information about the virt-tools-list mailing list