summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2012-03-20 00:52:38 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2012-03-20 00:52:38 +0100
commit126794d3014df5b0759b02b679e0ca86ba8fc9bc (patch)
tree2a5585ad10050c5a5a786bb8e0901e482c1e43c5
parent51d41732933323a0b32176b3f56aa418a7e7b1d0 (diff)
Add SPICE_DISABLE_DEPRECATED guard
-rw-r--r--doc/reference/Makefile.am6
-rw-r--r--gtk/Makefile.am1
-rw-r--r--gtk/channel-main.h16
-rw-r--r--gtk/spice-audio.h6
-rw-r--r--gtk/spice-widget.h11
-rw-r--r--gtk/spicy.c8
6 files changed, 25 insertions, 23 deletions
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)) {