[Spice-commits] 5 commits - doc/reference git.mk gtk/channel-cursor.h gtk/channel-display.h gtk/channel-inputs.h gtk/channel-main.h gtk/channel-playback.h gtk/channel-record.h gtk/channel-smartcard.h gtk/channel-usbredir.h gtk/controller gtk/Makefile.am gtk/spice-audio.h gtk/spice-channel.c gtk/spice-widget.c gtk/spice-widget-cairo.c gtk/spice-widget.h gtk/spicy.c gtk/usb-device-manager.h gtk/usb-device-widget.h Makefile.am spice-protocol

Marc-André Lureau elmarco at kemper.freedesktop.org
Mon Mar 19 18:23:29 PDT 2012


 Makefile.am                          |    8 ++
 doc/reference/Makefile.am            |  118 ++++++++++-------------------------
 doc/reference/spice-gtk-sections.txt |   39 ++++++++++-
 git.mk                               |   45 ++++++++++---
 gtk/Makefile.am                      |   79 ++++++++++++-----------
 gtk/channel-cursor.h                 |    1 
 gtk/channel-display.h                |    1 
 gtk/channel-inputs.h                 |    1 
 gtk/channel-main.h                   |   17 ++---
 gtk/channel-playback.h               |    1 
 gtk/channel-record.h                 |    1 
 gtk/channel-smartcard.h              |    1 
 gtk/channel-usbredir.h               |    1 
 gtk/controller/Makefile.am           |   38 ++++++-----
 gtk/spice-audio.h                    |    7 +-
 gtk/spice-channel.c                  |    4 -
 gtk/spice-widget-cairo.c             |    3 
 gtk/spice-widget.c                   |   30 ++++----
 gtk/spice-widget.h                   |   11 ++-
 gtk/spicy.c                          |    8 --
 gtk/usb-device-manager.h             |    1 
 gtk/usb-device-widget.h              |   22 ++----
 spice-protocol                       |    2 
 23 files changed, 224 insertions(+), 215 deletions(-)

New commits:
commit b9b658f6ea41a2473853149b41fef2cb808ec4f2
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Tue Mar 20 01:13:40 2012 +0100

    doc: gtk-doc cleanup
    
    Fix all the unused symbols and a few warnings (a lot left)

diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index 2549119..372850a 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -1,113 +1,63 @@
-## Process this file with automake to produce Makefile.in
+NULL =
 
-# We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
+DOC_MODULE = spice-gtk
 
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
+# The top-level SGML file
+DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
 
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=spice-gtk
-
-# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
-
-
-# The top-level SGML file. You can change this if you want to.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
-
-# Directories containing the source code, relative to $(srcdir).
-# gtk-doc will search all .c and .h files beneath these paths
-# for inline comments documenting functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk ../../../gdk
-DOC_SOURCE_DIR=../../gtk
-
-# Extra options to pass to gtkdoc-scangobj. Not normally needed.
-SCANGOBJ_OPTIONS=
+# Source code location
+DOC_SOURCE_DIR = $(top_srcdir)/gtk
 
 # Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS= \
+SCAN_OPTIONS = \
 	--deprecated-guards="SPICE_DISABLE_DEPRECATED" \
 	--ignore-decorators="G_GNUC_INTERNAL"
 
 # Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--xml-mode --output-format=xml
-
-# Extra options to supply to gtkdoc-mktmpl
-# e.g. MKTMPL_OPTIONS=--only-section-tmpl
-MKTMPL_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref. Not normally needed.
-# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
-FIXXREF_OPTIONS=
+MKDB_OPTIONS = --xml-mode --output-format=xml
 
 # Used for dependencies. The docs will be rebuilt if any of these change.
-# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
-# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=$(top_srcdir)/gtk/*.h
-CFILE_GLOB=$(top_srcdir)/gtk/*.c
-
-# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
-# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
-EXTRA_HFILES=
+HFILE_GLOB = $(top_srcdir)/gtk/*.h
+CFILE_GLOB = $(top_srcdir)/gtk/*.c
 
 # Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES= \
-	spice-display-mjpeg.h			\
+IGNORE_HFILES=					\
+	bio-gsocket.h				\
 	channel-display-priv.h			\
-	spice-channel-priv.h			\
+	channel-usbredir-priv.h			\
 	continuation.h				\
+	controller				\
 	coroutine.h				\
 	decode.h				\
+	display					\
 	gio-coroutine.h				\
+	glib-compat.h				\
+	smartcard-manager-priv.h		\
+	spice-audio-priv.h			\
 	spice-channel-cache.h			\
+	spice-channel-priv.h			\
+	spice-cmdline.h				\
+	spice-common.h				\
+	spice-gstaudio.h			\
+	spice-gtk-session-priv.h		\
 	spice-marshal.h				\
 	spice-pulse.h				\
 	spice-session-priv.h			\
-	spice-types.h				\
-	spice-cmdline.h				\
-	tcp.h					\
-	vncdisplaykeymap.h
-
-# Images to copy into HTML directory.
-# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
-HTML_IMAGES=
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files=
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files=
+	spice-util-priv.h			\
+	spice-widget-priv.h			\
+	usb-acl-helper.h			\
+	usb-device-manager-priv.h		\
+	usbutil.h				\
+	vncdisplaykeymap.h			\
+	$(NULL)
 
 # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-# Only needed if you are using gtkdoc-scangobj to dynamically query widget
-# signals and properties.
-# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
-# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/gtk -I$(top_builddir)/gtk $(SPICE_GLIB_CFLAGS) $(SPICE_GTK_CFLAGS)
-GTKDOC_LIBS=$(top_builddir)/gtk/libspice-client-glib-2.0.la $(top_builddir)/gtk/libspice-client-gtk-$(SPICE_GTK_API_VERSION).la
+GTKDOC_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/gtk -I$(top_builddir)/gtk $(SPICE_GLIB_CFLAGS) $(SPICE_GTK_CFLAGS)
+GTKDOC_LIBS = $(top_builddir)/gtk/libspice-client-glib-2.0.la $(top_builddir)/gtk/libspice-client-gtk-$(SPICE_GTK_API_VERSION).la
 
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
 include $(top_srcdir)/gtk-doc.make
 
-# Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST +=
-
-# Files not to distribute
-# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
-# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
-#DISTCLEANFILES +=
-
 # Comment this out if you want 'make check' to test you doc status
 # and run some sanity checks
 if ENABLE_GTK_DOC
diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
index 3e5ce0b..a339d32 100644
--- a/doc/reference/spice-gtk-sections.txt
+++ b/doc/reference/spice-gtk-sections.txt
@@ -3,6 +3,7 @@
 <TITLE>SpicePlaybackChannel</TITLE>
 SpicePlaybackChannel
 SpicePlaybackChannelClass
+spice_playback_channel_set_delay
 <SUBSECTION Standard>
 SPICE_PLAYBACK_CHANNEL
 SPICE_IS_PLAYBACK_CHANNEL
@@ -25,11 +26,17 @@ spice_session_connect
 spice_session_open_fd
 spice_session_disconnect
 spice_session_get_channels
+spice_session_get_read_only
+spice_session_has_channel_type
 <SUBSECTION>
 SpiceSessionMigration
 SpiceSessionVerify
 spice_get_option_group
 spice_set_session_option
+<SUBSECTION>
+SpiceClientError
+SPICE_CLIENT_ERROR
+spice_client_error_quark
 <SUBSECTION Standard>
 SPICE_SESSION
 SPICE_IS_SESSION
@@ -40,6 +47,10 @@ SPICE_IS_SESSION_CLASS
 SPICE_SESSION_GET_CLASS
 SPICE_TYPE_SESSION_VERIFY
 spice_session_verify_get_type
+SPICE_TYPE_SESSION_MIGRATION
+spice_session_migration_get_type
+<SUBSECTION Private>
+SpiceSessionPrivate
 </SECTION>
 
 <SECTION>
@@ -48,8 +59,9 @@ spice_session_verify_get_type
 SpiceMainChannel
 SpiceMainChannelClass
 <SUBSECTION>
-spice_main_channel
 spice_main_set_display
+spice_main_set_display_enabled
+spice_main_send_monitor_config
 spice_main_agent_test_capability
 spice_main_clipboard_selection_grab
 spice_main_clipboard_selection_notify
@@ -67,13 +79,14 @@ spice_main_channel_get_type
 SPICE_MAIN_CHANNEL_CLASS
 SPICE_IS_MAIN_CHANNEL_CLASS
 SPICE_MAIN_CHANNEL_GET_CLASS
+<SUBSECTION Private>
+SpiceMainChannelPrivate
 </SECTION>
 
 <SECTION>
 <FILE>spice-channel</FILE>
 <TITLE>SpiceChannel</TITLE>
 SpiceChannelEvent
-SpiceChannelVerify
 SpiceChannel
 SpiceChannelClass
 <SUBSECTION>
@@ -83,6 +96,8 @@ spice_channel_connect
 spice_channel_open_fd
 spice_channel_disconnect
 spice_channel_test_capability
+spice_channel_test_common_capability
+spice_channel_type_to_string
 spice_channel_set_capability
 <SUBSECTION Standard>
 SPICE_TYPE_CHANNEL_EVENT
@@ -95,6 +110,9 @@ SPICE_CHANNEL_CLASS
 SPICE_IS_CHANNEL_CLASS
 SPICE_CHANNEL_GET_CLASS
 <SUBSECTION Private>
+SpiceMsgIn
+SpiceMsgOut
+SpiceChannelPrivate
 spice_msg_handler
 spice_msg_in
 spice_msg_out
@@ -106,6 +124,7 @@ spice_msg_out
 SpiceAudio
 SpiceAudioClass
 <SUBSECTION>
+spice_audio_get
 spice_audio_new
 <SUBSECTION Standard>
 SPICE_AUDIO
@@ -115,6 +134,8 @@ spice_audio_get_type
 SPICE_AUDIO_CLASS
 SPICE_IS_AUDIO_CLASS
 SPICE_AUDIO_GET_CLASS
+<SUBSECTION Private>
+SpiceAudioPrivate
 </SECTION>
 
 <SECTION>
@@ -268,10 +289,13 @@ SpiceUsbDeviceManagerClass
 spice_usb_device_manager_get
 spice_usb_device_manager_get_devices
 spice_usb_device_manager_is_device_connected
-spice_usb_device_manager_connect_device
 spice_usb_device_manager_disconnect_device
-spice_usb_device_get_description
+spice_usb_device_manager_can_redirect_device
+spice_usb_device_manager_connect_device_async
+spice_usb_device_manager_connect_device_finish
+<SUBSECTION>
 SpiceUsbDevice
+spice_usb_device_get_description
 <SUBSECTION Standard>
 SPICE_USB_DEVICE_MANAGER
 SPICE_IS_USB_DEVICE_MANAGER
@@ -302,7 +326,7 @@ SPICE_GTK_SESSION_CLASS
 SPICE_IS_GTK_SESSION_CLASS
 SPICE_GTK_SESSION_GET_CLASS
 <SUBSECTION Private>
-SpiceGtkSectionPrivate
+SpiceGtkSessionPrivate
 </SECTION>
 
 <SECTION>
@@ -356,8 +380,11 @@ spice_usb_device_widget_get_type
 SPICE_USB_DEVICE_WIDGET_CLASS
 SPICE_IS_USB_DEVICE_WIDGET_CLASS
 SPICE_USB_DEVICE_WIDGET_GET_CLASS
+SPICE_TYPE_USB_DEVICE_WIDGET
 <SUBSECTION Private>
 SpiceUsbDeviceWidgetPrivate
+SpiceGtkBox
+SpiceGtkBoxClass
 </SECTION>
 
 <SECTION>
@@ -368,5 +395,7 @@ spice_util_get_version_string
 SPICE_DEBUG
 spice_util_get_debug
 SPICE_RESERVED_PADDING
+SPICE_DEPRECATED_FOR
+spice_g_signal_connect_object
 </SECTION>
 
diff --git a/gtk/channel-cursor.h b/gtk/channel-cursor.h
index 6c9e72d..5b5ed47 100644
--- a/gtk/channel-cursor.h
+++ b/gtk/channel-cursor.h
@@ -35,7 +35,6 @@ typedef struct _SpiceCursorChannelPrivate SpiceCursorChannelPrivate;
 
 /**
  * SpiceCursorChannel:
- * @parent: Parent instance.
  *
  * The #SpiceCursorChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-display.h b/gtk/channel-display.h
index db72fc9..b8d7679 100644
--- a/gtk/channel-display.h
+++ b/gtk/channel-display.h
@@ -35,7 +35,6 @@ typedef struct _SpiceDisplayChannelPrivate SpiceDisplayChannelPrivate;
 
 /**
  * SpiceDisplayChannel:
- * @parent: Parent instance.
  *
  * The #SpiceDisplayChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-inputs.h b/gtk/channel-inputs.h
index 64f3e5b..9968b3b 100644
--- a/gtk/channel-inputs.h
+++ b/gtk/channel-inputs.h
@@ -41,7 +41,6 @@ typedef enum {
 
 /**
  * SpiceInputsChannel:
- * @parent: Parent instance.
  *
  * The #SpiceInputsChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-main.h b/gtk/channel-main.h
index d212a50..1a5ab54 100644
--- a/gtk/channel-main.h
+++ b/gtk/channel-main.h
@@ -35,7 +35,6 @@ typedef struct _SpiceMainChannelPrivate SpiceMainChannelPrivate;
 
 /**
  * SpiceMainChannel:
- * @parent: Parent instance.
  *
  * The #SpiceMainChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-playback.h b/gtk/channel-playback.h
index a1f0529..6341cac 100644
--- a/gtk/channel-playback.h
+++ b/gtk/channel-playback.h
@@ -35,7 +35,6 @@ typedef struct _SpicePlaybackChannelPrivate SpicePlaybackChannelPrivate;
 
 /**
  * SpicePlaybackChannel:
- * @parent: Parent instance.
  *
  * The #SpicePlaybackChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-record.h b/gtk/channel-record.h
index 26511cb..73bdb76 100644
--- a/gtk/channel-record.h
+++ b/gtk/channel-record.h
@@ -35,7 +35,6 @@ typedef struct _SpiceRecordChannelPrivate SpiceRecordChannelPrivate;
 
 /**
  * SpiceRecordChannel:
- * @parent: Parent instance.
  *
  * The #SpiceRecordChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-smartcard.h b/gtk/channel-smartcard.h
index ec1ed2e..28c8b88 100644
--- a/gtk/channel-smartcard.h
+++ b/gtk/channel-smartcard.h
@@ -35,7 +35,6 @@ typedef struct _SpiceSmartcardChannelPrivate SpiceSmartcardChannelPrivate;
 
 /**
  * SpiceSmartcardChannel:
- * @parent: Parent instance.
  *
  * The #SpiceSmartcardChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/channel-usbredir.h b/gtk/channel-usbredir.h
index c7263b9..0cc4fbf 100644
--- a/gtk/channel-usbredir.h
+++ b/gtk/channel-usbredir.h
@@ -38,7 +38,6 @@ typedef struct _SpiceUsbredirChannelPrivate SpiceUsbredirChannelPrivate;
 
 /**
  * SpiceUsbredirChannel:
- * @parent: Parent instance.
  *
  * The #SpiceUsbredirChannel struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/spice-audio.h b/gtk/spice-audio.h
index 8296ed2..732fea1 100644
--- a/gtk/spice-audio.h
+++ b/gtk/spice-audio.h
@@ -47,7 +47,6 @@ typedef struct _SpiceAudioPrivate SpiceAudioPrivate;
 
 /**
  * SpiceAudio:
- * @parent: Parent instance.
  *
  * The #SpiceAudio struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 0b7dff8..783b94a 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2473,7 +2473,7 @@ static gboolean test_capability(GArray *caps, guint32 cap)
 
 /**
  * spice_channel_test_capability:
- * @self:
+ * @channel:
  * @cap:
  *
  * Test availability of remote "channel kind capability".
@@ -2492,7 +2492,7 @@ gboolean spice_channel_test_capability(SpiceChannel *self, guint32 cap)
 
 /**
  * spice_channel_test_common_capability:
- * @self:
+ * @channel:
  * @cap:
  *
  * Test availability of remote "common channel capability".
diff --git a/gtk/usb-device-manager.h b/gtk/usb-device-manager.h
index de0e2ba..ba917da 100644
--- a/gtk/usb-device-manager.h
+++ b/gtk/usb-device-manager.h
@@ -43,7 +43,6 @@ typedef struct _SpiceUsbDevice SpiceUsbDevice;
 
 /**
  * SpiceUsbDeviceManager:
- * @parent: Parent instance.
  *
  * The #SpiceUsbDeviceManager struct is opaque and should not be accessed directly.
  */
diff --git a/gtk/usb-device-widget.h b/gtk/usb-device-widget.h
index 71e7911..b0513c4 100644
--- a/gtk/usb-device-widget.h
+++ b/gtk/usb-device-widget.h
@@ -37,19 +37,22 @@ typedef struct _SpiceUsbDeviceWidget SpiceUsbDeviceWidget;
 typedef struct _SpiceUsbDeviceWidgetClass SpiceUsbDeviceWidgetClass;
 typedef struct _SpiceUsbDeviceWidgetPrivate SpiceUsbDeviceWidgetPrivate;
 
+#if GTK_CHECK_VERSION(3,0,0)
+typedef GtkBox SpiceGtkBox;
+typedef GtkBoxClass SpiceGtkBoxClass;
+#else
+typedef GtkVBox SpiceGtkBox;
+typedef GtkVBoxClass SpiceGtkBoxClass;
+#endif
+
 /**
  * SpiceUsbDeviceWidget:
- * @parent: Parent instance.
  *
  * The #SpiceUsbDeviceWidget struct is opaque and should not be accessed directly.
  */
 struct _SpiceUsbDeviceWidget
 {
-#if GTK_CHECK_VERSION(3,0,0)
-    GtkBox parent;
-#else
-    GtkVBox parent;
-#endif
+    SpiceGtkBox parent;
 
     /*< private >*/
     SpiceUsbDeviceWidgetPrivate *priv;
@@ -58,18 +61,13 @@ struct _SpiceUsbDeviceWidget
 
 /**
  * SpiceUsbDeviceWidgetClass:
- * @parent_class: Parent class.
  * @connect_failed: Signal class handler for the #SpiceUsbDeviceWidget::connect-failed signal.
  *
  * Class structure for #SpiceUsbDeviceWidget.
  */
 struct _SpiceUsbDeviceWidgetClass
 {
-#if GTK_CHECK_VERSION(3,0,0)
-    GtkBoxClass parent_class;
-#else
-    GtkVBoxClass parent_class;
-#endif
+    SpiceGtkBoxClass parent_class;
 
     /* signals */
     void (*connect_failed) (SpiceUsbDeviceWidget *widget,
commit 126794d3014df5b0759b02b679e0ca86ba8fc9bc
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Tue Mar 20 00:52:38 2012 +0100

    Add SPICE_DISABLE_DEPRECATED guard

diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index 4007ba4..2549119 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -28,11 +28,11 @@ DOC_SOURCE_DIR=../../gtk
 SCANGOBJ_OPTIONS=
 
 # Extra options to supply to gtkdoc-scan.
-# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
-SCAN_OPTIONS=
+SCAN_OPTIONS= \
+	--deprecated-guards="SPICE_DISABLE_DEPRECATED" \
+	--ignore-decorators="G_GNUC_INTERNAL"
 
 # Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
 MKDB_OPTIONS=--xml-mode --output-format=xml
 
 # Extra options to supply to gtkdoc-mktmpl
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 9510d8d..cd6da20 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -383,6 +383,7 @@ spicy_CPPFLAGS =			\
 	$(AM_CPPFLAGS)			\
 	$(XRANDR_CFLAGS)		\
 	$(GTHREAD_CFLAGS)		\
+	-DSPICE_DISABLE_DEPRECATED	\
 	$(NULL)
 
 
diff --git a/gtk/channel-main.h b/gtk/channel-main.h
index 197c8d5..d212a50 100644
--- a/gtk/channel-main.h
+++ b/gtk/channel-main.h
@@ -73,6 +73,14 @@ void spice_main_set_display(SpiceMainChannel *channel, int id,
 void spice_main_set_display_enabled(SpiceMainChannel *channel, int id, gboolean enabled);
 gboolean spice_main_send_monitor_config(SpiceMainChannel *channel);
 
+void spice_main_clipboard_selection_grab(SpiceMainChannel *channel, guint selection, guint32 *types, int ntypes);
+void spice_main_clipboard_selection_release(SpiceMainChannel *channel, guint selection);
+void spice_main_clipboard_selection_notify(SpiceMainChannel *channel, guint selection, guint32 type, const guchar *data, size_t size);
+void spice_main_clipboard_selection_request(SpiceMainChannel *channel, guint selection, guint32 type);
+
+gboolean spice_main_agent_test_capability(SpiceMainChannel *channel, guint32 cap);
+
+#ifndef SPICE_DISABLE_DEPRECATED
 SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_grab)
 void spice_main_clipboard_grab(SpiceMainChannel *channel, guint32 *types, int ntypes);
 SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_release)
@@ -81,13 +89,7 @@ SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_notify)
 void spice_main_clipboard_notify(SpiceMainChannel *channel, guint32 type, const guchar *data, size_t size);
 SPICE_DEPRECATED_FOR(spice_main_clipboard_selection_request)
 void spice_main_clipboard_request(SpiceMainChannel *channel, guint32 type);
-
-void spice_main_clipboard_selection_grab(SpiceMainChannel *channel, guint selection, guint32 *types, int ntypes);
-void spice_main_clipboard_selection_release(SpiceMainChannel *channel, guint selection);
-void spice_main_clipboard_selection_notify(SpiceMainChannel *channel, guint selection, guint32 type, const guchar *data, size_t size);
-void spice_main_clipboard_selection_request(SpiceMainChannel *channel, guint selection, guint32 type);
-
-gboolean spice_main_agent_test_capability(SpiceMainChannel *channel, guint32 cap);
+#endif
 
 G_END_DECLS
 
diff --git a/gtk/spice-audio.h b/gtk/spice-audio.h
index ab8a1be..8296ed2 100644
--- a/gtk/spice-audio.h
+++ b/gtk/spice-audio.h
@@ -73,10 +73,12 @@ struct _SpiceAudioClass {
 
 GType spice_audio_get_type(void);
 
+SpiceAudio* spice_audio_get(SpiceSession *session, GMainContext *context);
+
+#ifndef SPICE_DISABLE_DEPRECATED
 SPICE_DEPRECATED_FOR(spice_audio_get)
 SpiceAudio* spice_audio_new(SpiceSession *session, GMainContext *context, const char *name);
-
-SpiceAudio* spice_audio_get(SpiceSession *session, GMainContext *context);
+#endif
 
 G_END_DECLS
 
diff --git a/gtk/spice-widget.h b/gtk/spice-widget.h
index b7f185f..3f6a785 100644
--- a/gtk/spice-widget.h
+++ b/gtk/spice-widget.h
@@ -72,16 +72,19 @@ GType	        spice_display_get_type(void);
 
 SpiceDisplay* spice_display_new(SpiceSession *session, int id);
 void spice_display_mouse_ungrab(SpiceDisplay *display);
-SPICE_DEPRECATED_FOR(spice_gtk_session_copy_to_guest)
-void spice_display_copy_to_guest(SpiceDisplay *display);
-SPICE_DEPRECATED_FOR(spice_gtk_session_paste_from_guest)
-void spice_display_paste_from_guest(SpiceDisplay *display);
 void spice_display_set_grab_keys(SpiceDisplay *display, SpiceGrabSequence *seq);
 SpiceGrabSequence *spice_display_get_grab_keys(SpiceDisplay *display);
 void spice_display_send_keys(SpiceDisplay *display, const guint *keyvals,
                              int nkeyvals, SpiceDisplayKeyEvent kind);
 GdkPixbuf *spice_display_get_pixbuf(SpiceDisplay *display);
 
+#ifndef SPICE_DISABLE_DEPRECATED
+SPICE_DEPRECATED_FOR(spice_gtk_session_copy_to_guest)
+void spice_display_copy_to_guest(SpiceDisplay *display);
+SPICE_DEPRECATED_FOR(spice_gtk_session_paste_from_guest)
+void spice_display_paste_from_guest(SpiceDisplay *display);
+#endif
+
 G_END_DECLS
 
 #endif /* __SPICE_CLIENT_WIDGET_H__ */
diff --git a/gtk/spicy.c b/gtk/spicy.c
index d3f2f29..f44642f 100644
--- a/gtk/spicy.c
+++ b/gtk/spicy.c
@@ -1530,10 +1530,8 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
     }
 
     if (SPICE_IS_PLAYBACK_CHANNEL(channel)) {
-        if (conn->audio != NULL)
-            return;
         SPICE_DEBUG("new audio channel");
-        conn->audio = spice_audio_new(s, NULL, NULL);
+        conn->audio = spice_audio_get(s, NULL);
     }
 
     if (SPICE_IS_USBREDIR_CHANNEL(channel)) {
@@ -1563,10 +1561,6 @@ static void channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer dat
 
     if (SPICE_IS_PLAYBACK_CHANNEL(channel)) {
         SPICE_DEBUG("zap audio channel");
-        if (conn->audio != NULL) {
-            g_object_unref(conn->audio);
-            conn->audio = NULL;
-        }
     }
 
     if (SPICE_IS_USBREDIR_CHANNEL(channel)) {
commit 51d41732933323a0b32176b3f56aa418a7e7b1d0
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Mar 19 12:58:45 2012 +0100

    build-sys: improve maintainer clean

diff --git a/Makefile.am b/Makefile.am
index 8ab020a..334752b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,7 +43,13 @@ MAINTAINERCLEANFILES =				\
 	ABOUT-NLS				\
 	aclocal.m4				\
 	config.h.in				\
-	m4/*.m4					\
+	m4/gtk-doc.m4				\
+	m4/intltool.m4				\
+	m4/libtool.m4				\
+	m4/ltoptions.m4				\
+	m4/ltsugar.m4				\
+	m4/ltversion.m4				\
+	m4/lt~obsolete.m4			\
 	build-aux/compile			\
 	build-aux/config.guess			\
 	build-aux/config.rpath			\
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 50ef747..9510d8d 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -2,21 +2,49 @@ NULL =
 
 SUBDIRS = controller
 
-COMMON_DIR=$(SPICE_COMMON_SRCDIR)
-CLIENT_DIR=$(top_srcdir)/client
+COMMON_DIR = $(SPICE_COMMON_SRCDIR)
 
-EXTRA_DIST =					\
-	spice-marshal.txt			\
-	keymap-gen.pl				\
-	keymaps.csv				\
-	decode-glz-tmpl.c			\
-	map-file				\
+# Avoid need for python(pyparsing) by end users
+MARSHALLERS =					\
 	generated_demarshallers.c		\
 	generated_demarshallers1.c		\
 	generated_marshallers.c			\
 	generated_marshallers1.c		\
-	spice-client-gtk.override		\
+	$(NULL)
+
+# Avoid need for perl(Text::CSV) by end users
+KEYMAPS =					\
+	vncdisplaykeymap_xorgevdev2xtkbd.c	\
+	vncdisplaykeymap_xorgkbd2xtkbd.c	\
+	vncdisplaykeymap_xorgxquartz2xtkbd.c	\
+	vncdisplaykeymap_xorgxwin2xtkbd.c	\
+	vncdisplaykeymap_osx2xtkbd.c		\
+	vncdisplaykeymap_win322xtkbd.c		\
+	$(NULL)
+
+# End users build dependencies can be cleaned
+GLIBGENS =					\
+	spice-glib-enums.c			\
+	spice-glib-enums.h			\
+	spice-marshal.c				\
+	spice-marshal.h				\
+	spice-widget-enums.c			\
+	spice-widget-enums.h			\
+	$(NULL)
+
+CLEANFILES = $(GLIBGENS)
+BUILT_SOURCES = $(GLIBGENS) $(KEYMAPS) $(MARSHALLERS)
+
+EXTRA_DIST =					\
+	$(MARSHALLERS)				\
+	$(KEYMAPS)				\
+	decode-glz-tmpl.c			\
+	keymap-gen.pl				\
+	keymaps.csv				\
+	map-file				\
 	spice-client-gtk-manual.defs		\
+	spice-client-gtk.override		\
+	spice-marshal.txt			\
 	$(NULL)
 
 bin_PROGRAMS = spicy snappy spicy-stats
@@ -25,15 +53,12 @@ acldir = $(ACL_HELPER_DIR)
 acl_PROGRAMS = spice-client-glib-usb-acl-helper
 endif
 
-lib_LTLIBRARIES = \
-	libspice-client-glib-2.0.la
+lib_LTLIBRARIES = libspice-client-glib-2.0.la
 
 if HAVE_GTK_2
-lib_LTLIBRARIES += \
-	libspice-client-gtk-2.0.la
+lib_LTLIBRARIES += libspice-client-gtk-2.0.la
 else
-lib_LTLIBRARIES += \
-	libspice-client-gtk-3.0.la
+lib_LTLIBRARIES += libspice-client-gtk-3.0.la
 endif
 
 if HAVE_LD_VERSION_SCRIPT
@@ -44,17 +69,6 @@ endif
 
 KEYMAP_GEN = $(srcdir)/keymap-gen.pl
 
-KEYMAPS = \
-	vncdisplaykeymap_xorgevdev2xtkbd.c \
-	vncdisplaykeymap_xorgkbd2xtkbd.c \
-	vncdisplaykeymap_xorgxquartz2xtkbd.c \
-	vncdisplaykeymap_xorgxwin2xtkbd.c \
-	vncdisplaykeymap_osx2xtkbd.c \
-	vncdisplaykeymap_win322xtkbd.c
-
-# Avoid need for perl(Text::CSV) by end users
-EXTRA_DIST += $(KEYMAPS)
-
 SPICE_COMMON_CPPFLAGS = \
 	-DG_LOG_DOMAIN=\"GSpice\"       \
 	-DSPICE_NO_DEPRECATED		\
@@ -263,10 +277,7 @@ libspice_client_glib_2_0_la_SOURCES =	\
 	$(NULL)
 
 nodist_libspice_client_glib_2_0_la_SOURCES =	\
-	generated_demarshallers.c	\
-	generated_demarshallers1.c	\
-	generated_marshallers.c		\
-	generated_marshallers1.c	\
+	$(MARSHALLERS)			\
 	spice-glib-enums.c		\
 	spice-marshal.c			\
 	spice-marshal.h			\
@@ -538,13 +549,6 @@ vncdisplaykeymap_osx2xtkbd.c:
 vncdisplaykeymap_win322xtkbd.c:
 	$(AM_V_GEN)$(KEYMAP_GEN) $(srcdir)/keymaps.csv win32 xtkbd > $@ || rm $@
 
-CLEANFILES = spice-marshal.c spice-marshal.h \
-	spice-glib-enums.c spice-glib-enums.h \
-	spice-widget-enums.c spice-widget-enums.h
-MAINTAINERCLEANFILES = $(KEYMAPS)
-
-BUILT_SOURCES = $(CLEANFILES) $(MAINTAINERCLEANFILES)
-
 if WITH_PYTHON
 pyexec_LTLIBRARIES = SpiceClientGtk.la
 
diff --git a/gtk/controller/Makefile.am b/gtk/controller/Makefile.am
index 916309e..639a1e0 100644
--- a/gtk/controller/Makefile.am
+++ b/gtk/controller/Makefile.am
@@ -22,20 +22,29 @@ AM_VALAFLAGS =							\
 lib_LTLIBRARIES = libspice-controller.la
 noinst_PROGRAMS = test-controller spice-controller-dump
 
-BUILT_SOURCES = controller.vala.stamp
-
 libspice_controller_la_VALASOURCES =		\
 	menu.vala				\
 	controller.vala				\
 	foreign-menu.vala			\
 	$(NULL)
-libspice_controller_la_SOURCES =		\
-	custom.h				\
-	spice-controller-listener.c		\
-	spice-controller-listener.h		\
-	spice-foreign-menu-listener.c		\
-	spice-foreign-menu-listener.h		\
-	$(libspice_controller_la_VALASOURCES:.vala=.c) \
+
+libspice_controller_la_BUILT_SOURCES =			\
+	$(libspice_controller_la_VALASOURCES:.vala=.c)	\
+	spice-controller.h				\
+	$(NULL)
+
+BUILT_SOURCES =						\
+	$(libspice_controller_la_BUILT_SOURCES)		\
+	controller.vala.stamp				\
+	$(NULL)
+
+libspice_controller_la_SOURCES =			\
+	$(libspice_controller_la_BUILT_SOURCES)		\
+	custom.h					\
+	spice-controller-listener.c			\
+	spice-controller-listener.h			\
+	spice-foreign-menu-listener.c			\
+	spice-foreign-menu-listener.h			\
 	$(NULL)
 
 if OS_WIN32
@@ -50,7 +59,7 @@ libspice_controller_la_SOURCES +=		\
 endif
 libspice_controller_la_LDFLAGS =		\
 	$(AM_LDFLAGS)				\
-	-version-number 0:0:0			\
+	-version-info 0:0:0			\
 	$(NULL)
 
 libspice_controllerincludedir = $(includedir)/spice-controller
@@ -74,18 +83,13 @@ controller.vala.stamp: $(libspice_controller_la_VALASOURCES) custom.vapi
 	$(VALA_V)$(VALAC) $(VALAFLAGS) $(AM_VALAFLAGS) $(libspice_controller_la_VALASOURCES) -H spice-controller.h
 	@touch $@
 
-spice-controller.h: controller.vala.stamp
-menu.c: controller.vala.stamp
-controller.c: controller.vala.stamp
+$(libspice_controller_la_BUILT_SOURCES): controller.vala.stamp
 
 EXTRA_DIST =					\
 	$(libspice_controller_la_VALASOURCES)	\
 	controller.vala.stamp			\
 	custom.vapi				\
 	gio-windows-2.0.vapi			\
-	spice-controller.h			\
 	$(NULL)
 
-vala-clean:
-	rm -f `find . -name "*.stamp"`
-
+-include $(top_srcdir)/git.mk
commit 5b67c33c110df0736279a3b69c2d74efe7fefaee
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Mar 19 22:59:31 2012 +0100

    build-sys: use new git.mk

diff --git a/git.mk b/git.mk
index 5ab41ba..8aebb8d 100644
--- a/git.mk
+++ b/git.mk
@@ -1,18 +1,20 @@
 # git.mk
 #
 # Copyright 2009, Red Hat, Inc.
+# Copyright 2010,2011 Behdad Esfahbod
 # Written by Behdad Esfahbod
 #
 # Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
+# is permitted in any medium without royalty provided the copyright
 # notice and this notice are preserved.
 #
-# The canonical source for this file is pango/git.mk, or whereever the
-# header of pango/git.mk suggests in the future.
+# The canonical source for this file is https://github.com/behdad/git.mk.
 #
 # To use in your project, import this file in your git repo's toplevel,
 # then do "make -f git.mk".  This modifies all Makefile.am files in
-# your project to include git.mk.
+# your project to -include git.mk.  Remember to add that line to new
+# Makefile.am files you create in your project, or just rerun the
+# "make -f git.mk".
 #
 # This enables automatic .gitignore generation.  If you need to ignore
 # more files, add them to the GITIGNOREFILES variable in your Makefile.am.
@@ -22,7 +24,7 @@
 #
 # The only case that you need to manually add a file to GITIGNOREFILES is
 # when remove files in one of mostlyclean-local, clean-local, distclean-local,
-# or maintainer-clean-local.
+# or maintainer-clean-local make targets.
 #
 # Note that for files like editor backup, etc, there are better places to
 # ignore them.  See "man gitignore".
@@ -30,17 +32,17 @@
 # If "make maintainer-clean" removes the files but they are not recognized
 # by this script (that is, if "git status" shows untracked files still), send
 # me the output of "git status" as well as your Makefile.am and Makefile for
-# the directories involved.
+# the directories involved and I'll diagnose.
 #
 # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
-# pango/Makefile.am.
+# Makefile.am.sample in the git.mk git repo.
 #
 # Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
 # not tarballs.  It serves no useful purpose in tarballs and clutters the
 # build dir.
 #
 # This file knows how to handle autoconf, automake, libtool, gtk-doc,
-# gnome-doc-utils, intltool.
+# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu.
 #
 #
 # KNOWN ISSUES:
@@ -57,7 +59,8 @@ git-all: git-mk-install
 
 git-mk-install:
 	@echo Installing git makefile
-	@any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
+	@any_failed=; \
+		find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \
 		if grep 'include .*/git.mk' $$x >/dev/null; then \
 			echo $$x already includes git.mk; \
 		else \
@@ -93,18 +96,33 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
 				xml html \
 			; do echo /$$x; done; \
 		fi; \
-		if test "x$(DOC_MODULE)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
+		if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
 			for x in \
 				$(_DOC_C_DOCS) \
 				$(_DOC_LC_DOCS) \
 				$(_DOC_OMF_ALL) \
 				$(_DOC_DSK_ALL) \
 				$(_DOC_HTML_ALL) \
+				$(_DOC_MOFILES) \
 				$(_DOC_POFILES) \
+				$(DOC_H_FILE) \
 				"*/.xml2po.mo" \
 				"*/*.omf.out" \
 			; do echo /$$x; done; \
 		fi; \
+		if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
+			for x in \
+				$(_HELP_LC_FILES) \
+				$(_HELP_LC_STAMPS) \
+				$(_HELP_MOFILES) \
+			; do echo /$$x; done; \
+		fi; \
+		if test "x$(gsettings_SCHEMAS)" = x; then :; else \
+			for x in \
+				$(gsettings_SCHEMAS:.xml=.valid) \
+				$(gsettings__enum_file) \
+			; do echo /$$x; done; \
+		fi; \
 		if test -f $(srcdir)/po/Makefile.in.in; then \
 			for x in \
 				po/Makefile.in.in \
@@ -131,6 +149,12 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
 				config.lt \
 			; do echo /$$x; done; \
 		fi; \
+		if test "x$(DEJATOOL)" = x; then :; else \
+			for x in \
+				$(DEJATOOL) \
+			; do echo /$$x.sum; echo /$$x.log; done; \
+			echo /site.exp; \
+		fi; \
 		for x in \
 			.gitignore \
 			$(GITIGNOREFILES) \
@@ -159,6 +183,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
 			"*.bak" \
 			"*~" \
 			".*.sw[nop]" \
+			".dirstamp" \
 		; do echo /$$x; done; \
 	} | \
 	sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
diff --git a/spice-protocol b/spice-protocol
index 1a3b563..32da251 160000
--- a/spice-protocol
+++ b/spice-protocol
@@ -1 +1 @@
-Subproject commit 1a3b563171ad81f6b44f6e5ef6f244b169419704
+Subproject commit 32da251a6572e3463cff040d106bb47a04e5a905
commit 13f5ebbf07a369c7460a2539b87be9a55375d0c6
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Mon Mar 19 19:50:45 2012 +0100

    Hide cursor when it is on a different screen in server mode
    
    When the cursor shape is changed, all the cursor channels are
    updated. The current code assumed that the "set" of the shape should
    show the cursor, but it should stay hidden instead.
    
    Also, when the cursor is hidden, we must invalidate its current
    region to redraw display.
    
    Fix: https://bugzilla.redhat.com/show_bug.cgi?id=804308

diff --git a/gtk/spice-widget-cairo.c b/gtk/spice-widget-cairo.c
index 3fc2a22..2f1ef75 100644
--- a/gtk/spice-widget-cairo.c
+++ b/gtk/spice-widget-cairo.c
@@ -103,7 +103,8 @@ void spicex_draw_event(SpiceDisplay *display, cairo_t *cr)
         }
         cairo_paint(cr);
 
-        if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER) {
+        if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER &&
+            !d->show_cursor) {
             GdkPixbuf *image = d->mouse_pixbuf;
             if (image != NULL) {
                 gdk_cairo_set_source_pixbuf(cr, image,
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 850fd5b..2e5ce41 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1594,19 +1594,10 @@ static void cursor_set(SpiceCursorChannel *channel,
 {
     SpiceDisplay *display = data;
     SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
+    GdkCursor *cursor = NULL;
 
     cursor_invalidate(display);
 
-    if (d->show_cursor) {
-        gdk_cursor_unref(d->show_cursor);
-        d->show_cursor = NULL;
-    }
-
-    if (d->mouse_cursor) {
-        gdk_cursor_unref(d->mouse_cursor);
-        d->mouse_cursor = NULL;
-    }
-
     if (d->mouse_pixbuf) {
         g_object_unref(d->mouse_pixbuf);
         d->mouse_pixbuf = NULL;
@@ -1622,15 +1613,23 @@ static void cursor_set(SpiceCursorChannel *channel,
                                                    (GdkPixbufDestroyNotify)g_free, NULL);
         d->mouse_hotspot.x = hot_x;
         d->mouse_hotspot.y = hot_y;
+        cursor = gdk_cursor_new_from_pixbuf(gtk_widget_get_display(GTK_WIDGET(display)),
+                                            d->mouse_pixbuf, hot_x, hot_y);
+    } else
+        g_warn_if_reached();
 
-        /* gdk_cursor_new_from_pixbuf() will copy pixbuf data on
-           x11/win32/macos. No worries if rgba pointer is freed
-           after. */
-        d->mouse_cursor = gdk_cursor_new_from_pixbuf(gtk_widget_get_display(GTK_WIDGET(display)),
-                                                     d->mouse_pixbuf, hot_x, hot_y);
+    if (d->show_cursor) {
+        /* keep hidden cursor */
+        gdk_cursor_unref(d->show_cursor);
+        d->show_cursor = cursor;
+    } else {
+        gdk_cursor_unref(d->mouse_cursor);
+        d->mouse_cursor = cursor;
     }
 
     update_mouse_pointer(display);
+
+    cursor_invalidate(display);
 }
 
 static void cursor_hide(SpiceCursorChannel *channel, gpointer data)
@@ -1641,6 +1640,7 @@ static void cursor_hide(SpiceCursorChannel *channel, gpointer data)
     if (d->show_cursor != NULL) /* then we are already hidden */
         return;
 
+    cursor_invalidate(display);
     d->show_cursor = d->mouse_cursor;
     d->mouse_cursor = get_blank_cursor();
     update_mouse_pointer(display);


More information about the Spice-commits mailing list