mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-28 07:06:04 +00:00
Add spice_get_option_group()
This commit is contained in:
parent
392b69b6db
commit
15b9f669a7
@ -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"
|
||||
SPICE_GTK_REQUIRED="0.6.174"
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
@ -90,6 +90,9 @@ main(int argc, char **argv)
|
||||
g_option_context_add_group (context, gtk_get_option_group (TRUE));
|
||||
#ifdef HAVE_GTK_VNC
|
||||
g_option_context_add_group (context, vnc_display_get_option_group ());
|
||||
#endif
|
||||
#ifdef HAVE_SPICE_GTK
|
||||
g_option_context_add_group (context, spice_get_option_group ());
|
||||
#endif
|
||||
g_option_context_parse (context, &argc, &argv, &error);
|
||||
if (error) {
|
||||
|
||||
@ -25,11 +25,12 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_GTK_VNC
|
||||
#include <vncdisplay.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SPICE_GTK
|
||||
#include <spice-option.h>
|
||||
#endif
|
||||
#include "virt-viewer.h"
|
||||
|
||||
static void virt_viewer_version(void)
|
||||
@ -93,6 +94,9 @@ int main(int argc, char **argv)
|
||||
g_option_context_add_group (context, gtk_get_option_group (TRUE));
|
||||
#ifdef HAVE_GTK_VNC
|
||||
g_option_context_add_group (context, vnc_display_get_option_group ());
|
||||
#endif
|
||||
#ifdef HAVE_SPICE_GTK
|
||||
g_option_context_add_group (context, spice_get_option_group ());
|
||||
#endif
|
||||
g_option_context_parse (context, &argc, &argv, &error);
|
||||
if (error) {
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
*/
|
||||
|
||||
#include <spice-audio.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <spice-option.h>
|
||||
#include "virt-viewer-util.h"
|
||||
#include "virt-viewer-session-spice.h"
|
||||
#include "virt-viewer-display-spice.h"
|
||||
@ -154,7 +154,9 @@ virt_viewer_session_spice_close(VirtViewerSession *session)
|
||||
self->priv->audio = NULL;
|
||||
}
|
||||
|
||||
/* FIXME: version 0.7 of spice-gtk allows reuse of session */
|
||||
self->priv->session = spice_session_new();
|
||||
spice_set_session_option(self->priv->session);
|
||||
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",
|
||||
@ -351,6 +353,8 @@ virt_viewer_session_spice_new(void)
|
||||
self = g_object_new(VIRT_VIEWER_TYPE_SESSION_SPICE, NULL);
|
||||
|
||||
self->priv->session = spice_session_new();
|
||||
spice_set_session_option(self->priv->session);
|
||||
|
||||
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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user