[Spice-devel] [PATCH v3 10/13] UsbDeviceWidget: if redirecting update infobar accordingly

Kirill Moizik kirill at daynix.com
Mon Aug 3 06:10:50 PDT 2015


From: Kirill Moizik <kmoizik at redhat.com>

---
 src/usb-device-widget.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/usb-device-widget.c b/src/usb-device-widget.c
index 1ec30e3..4d66e12 100644
--- a/src/usb-device-widget.c
+++ b/src/usb-device-widget.c
@@ -399,6 +399,8 @@ static gboolean spice_usb_device_widget_update_status(gpointer user_data)
 {
     SpiceUsbDeviceWidget *self = SPICE_USB_DEVICE_WIDGET(user_data);
     SpiceUsbDeviceWidgetPrivate *priv = self->priv;
+    gboolean redirecting;
+    g_object_get(priv->manager, "redirecting", &redirecting, NULL);
 
     priv->device_count = 0;
     gtk_container_foreach(GTK_CONTAINER(self), check_can_redirect, self);
@@ -417,6 +419,11 @@ static gboolean spice_usb_device_widget_update_status(gpointer user_data)
         spice_usb_device_widget_show_info_bar(self, _("No USB devices detected"),
                                               GTK_MESSAGE_INFO,
                                               GTK_STOCK_DIALOG_INFO);
+    if (redirecting == TRUE) {
+        spice_usb_device_widget_show_info_bar(self, _("Redirecting Usb Device"),
+                                              GTK_MESSAGE_INFO,
+                                              GTK_STOCK_DIALOG_INFO);
+    }
     return FALSE;
 }
 
-- 
2.4.3



More information about the Spice-devel mailing list