diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/channel-usbredir.c | 6 | ||||
-rw-r--r-- | gtk/spice-gtk-session.c | 2 | ||||
-rw-r--r-- | gtk/spicy.c | 2 | ||||
-rw-r--r-- | gtk/usb-device-manager.c | 28 | ||||
-rw-r--r-- | gtk/usb-device-manager.h | 1 |
5 files changed, 5 insertions, 34 deletions
diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c index bb3303e..cc08af9 100644 --- a/gtk/channel-usbredir.c +++ b/gtk/channel-usbredir.c @@ -210,8 +210,7 @@ static gboolean spice_usbredir_channel_open_device( if (!spice_usb_device_manager_start_event_listening( spice_usb_device_manager_get( - spice_channel_get_session(SPICE_CHANNEL(channel)), - NULL, NULL), + spice_channel_get_session(SPICE_CHANNEL(channel)), NULL), err)) { usbredirhost_close(priv->host); priv->host = NULL; @@ -363,8 +362,7 @@ void spice_usbredir_channel_disconnect(SpiceUsbredirChannel *channel) */ spice_usb_device_manager_stop_event_listening( spice_usb_device_manager_get( - spice_channel_get_session(SPICE_CHANNEL(channel)), - NULL, NULL)); + spice_channel_get_session(SPICE_CHANNEL(channel)), NULL)); /* This also closes the libusb handle we passed to its _open */ usbredirhost_close(priv->host); priv->host = NULL; diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c index afabe8e..32848fa 100644 --- a/gtk/spice-gtk-session.c +++ b/gtk/spice-gtk-session.c @@ -799,7 +799,7 @@ void spice_gtk_session_update_keyboard_focus(SpiceGtkSession *self, if (s->auto_usbredir_enable && s->keyboard_focus) auto_connect = TRUE; - manager = spice_usb_device_manager_get(s->session, NULL, NULL); + manager = spice_usb_device_manager_get(s->session, NULL); if (manager) { g_object_set(manager, "auto-connect", auto_connect, NULL); } diff --git a/gtk/spicy.c b/gtk/spicy.c index 58a9b5c..e37ce82 100644 --- a/gtk/spicy.c +++ b/gtk/spicy.c @@ -1519,7 +1519,7 @@ static spice_connection *connection_new(void) g_signal_connect(conn->session, "notify::migration-state", G_CALLBACK(migration_state), conn); - manager = spice_usb_device_manager_get(conn->session, NULL, NULL); + manager = spice_usb_device_manager_get(conn->session, NULL); if (manager) { g_signal_connect(manager, "auto-connect-failed", G_CALLBACK(auto_connect_failed), NULL); diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 910fd4e..53c0b8f 100644 --- a/gtk/usb-device-manager.c +++ b/gtk/usb-device-manager.c @@ -73,7 +73,6 @@ static void channel_destroy(SpiceSession *session, SpiceChannel *channel, enum { PROP_0, PROP_SESSION, - PROP_MAIN_CONTEXT, PROP_AUTO_CONNECT, }; @@ -87,7 +86,6 @@ enum struct _SpiceUsbDeviceManagerPrivate { SpiceSession *session; - GMainContext *main_context; gboolean auto_connect; #ifdef USE_USBREDIR GUsbContext *context; @@ -215,11 +213,6 @@ static void spice_usb_device_manager_finalize(GObject *gobject) } #endif - if (priv->main_context) { - g_main_context_unref(priv->main_context); - priv->main_context = NULL; - } - g_ptr_array_unref(priv->channels); g_ptr_array_unref(priv->devices); @@ -245,9 +238,6 @@ static void spice_usb_device_manager_get_property(GObject *gobject, case PROP_SESSION: g_value_set_object(value, priv->session); break; - case PROP_MAIN_CONTEXT: - g_value_set_boxed(value, priv->main_context); - break; case PROP_AUTO_CONNECT: g_value_set_boolean(value, priv->auto_connect); break; @@ -269,9 +259,6 @@ static void spice_usb_device_manager_set_property(GObject *gobject, case PROP_SESSION: priv->session = g_value_get_object(value); break; - case PROP_MAIN_CONTEXT: - priv->main_context = g_value_dup_boxed(value); - break; case PROP_AUTO_CONNECT: priv->auto_connect = g_value_get_boolean(value); break; @@ -306,16 +293,6 @@ static void spice_usb_device_manager_class_init(SpiceUsbDeviceManagerClass *klas G_PARAM_STATIC_STRINGS)); /** - * SpiceUsbDeviceManager:main-context: - */ - pspec = g_param_spec_boxed("main-context", "Main Context", - "GMainContext to use for the event source", - G_TYPE_MAIN_CONTEXT, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS); - g_object_class_install_property(gobject_class, PROP_MAIN_CONTEXT, pspec); - - /** * SpiceUsbDeviceManager:auto-connect: */ pspec = g_param_spec_boolean("auto-connect", "Auto Connect", @@ -563,7 +540,6 @@ static SpiceUsbredirChannel *spice_usb_device_manager_get_channel_for_dev( /** * spice_usb_device_manager_get: * @session: #SpiceSession for which to get the #SpiceUsbDeviceManager - * @main_context: #GMainContext to use. If %NULL, the default context is used. * * Gets the #SpiceUsbDeviceManager associated with the passed in #SpiceSession. * A new #SpiceUsbDeviceManager instance will be created the first time this @@ -575,7 +551,6 @@ static SpiceUsbredirChannel *spice_usb_device_manager_get_channel_for_dev( * Returns: (transfer none): a weak reference to the #SpiceUsbDeviceManager associated with the passed in #SpiceSession */ SpiceUsbDeviceManager *spice_usb_device_manager_get(SpiceSession *session, - GMainContext *main_context, GError **err) { SpiceUsbDeviceManager *self; @@ -587,8 +562,7 @@ SpiceUsbDeviceManager *spice_usb_device_manager_get(SpiceSession *session, self = session->priv->usb_manager; if (self == NULL) { self = g_initable_new(SPICE_TYPE_USB_DEVICE_MANAGER, NULL, err, - "session", session, - "main-context", main_context, NULL); + "session", session, NULL); session->priv->usb_manager = self; } g_static_mutex_unlock(&mutex); diff --git a/gtk/usb-device-manager.h b/gtk/usb-device-manager.h index 2417674..a8b3969 100644 --- a/gtk/usb-device-manager.h +++ b/gtk/usb-device-manager.h @@ -90,7 +90,6 @@ GType spice_usb_device_manager_get_type(void); gchar *spice_usb_device_get_description(SpiceUsbDevice *device); SpiceUsbDeviceManager *spice_usb_device_manager_get(SpiceSession *session, - GMainContext *main_context, GError **err); GPtrArray *spice_usb_device_manager_get_devices(SpiceUsbDeviceManager *manager); |