<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 11 Feb 2016, at 01:00 AM, Jonathon Jongsma <<a href="mailto:jjongsma@redhat.com" class="">jjongsma@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Thu, 2015-10-29 at 17:27 +0200, Dmitry Fleytman wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">From: Kirill Moizik <<a href="mailto:kmoizik@redhat.com" class="">kmoizik@redhat.com</a>><br class=""><br class="">Gray out redirection controls while there are<br class="">asynchronous redirection flows in progress.<br class=""><br class="">Signed-off-by: Kirill Moizik <<a href="mailto:kmoizik@redhat.com" class="">kmoizik@redhat.com</a>><br class="">Signed-off-by: Dmitry Fleytman <<a href="mailto:dfleytma@redhat.com" class="">dfleytma@redhat.com</a>><br class="">---<br class="">src/usb-device-widget.c | 40 +++++++++++++++++++++-------------------<br class="">1 file changed, 21 insertions(+), 19 deletions(-)<br class=""><br class="">diff --git a/src/usb-device-widget.c b/src/usb-device-widget.c<br class="">index f88573a..29967d1 100644<br class="">--- a/src/usb-device-widget.c<br class="">+++ b/src/usb-device-widget.c<br class="">@@ -374,27 +374,29 @@ static void check_can_redirect(GtkWidget *widget,<br class="">gpointer user_data)<br class=""> return; /* Non device widget, ie the info_bar */<br class=""><br class=""> priv->device_count++;<br class="">- can_redirect = spice_usb_device_manager_can_redirect_device(priv<br class="">->manager,<br class="">- device,<br class="">&err);<br class="">- gtk_widget_set_sensitive(widget, can_redirect);<br class="">-<br class="">- /* If we cannot redirect this device, append the error message to<br class="">- err_msg, but only if it is *not* already there! */<br class="">- if (!can_redirect) {<br class="">- if (priv->err_msg) {<br class="">- if (!strstr(priv->err_msg, err->message)) {<br class="">- gchar *old_err_msg = priv->err_msg;<br class=""><br class="">- priv->err_msg = g_strdup_printf("%s\n%s", priv->err_msg,<br class="">- err->message);<br class="">- g_free(old_err_msg);<br class="">+ if (spice_usb_device_manager_is_redirecting(priv->manager)) {<br class="">+ can_redirect = FALSE;<br class="">+ } else {<br class="">+ can_redirect = spice_usb_device_manager_can_redirect_device(priv<br class="">->manager,<br class="">+ device,<br class="">&err);<br class="">+ /* If we cannot redirect this device, append the error message to<br class="">+ err_msg, but only if it is *not* already there! */<br class="">+ if (!can_redirect) {<br class="">+ if (priv->err_msg) {<br class="">+ if (!strstr(priv->err_msg, err->message)) {<br class="">+ gchar *old_err_msg = priv->err_msg;<br class="">+ priv->err_msg = g_strdup_printf("%s\n%s", priv->err_msg,<br class="">+ err->message);<br class="">+ g_free(old_err_msg);<br class="">+ }<br class="">+ } else {<br class="">+ priv->err_msg = g_strdup(err->message);<br class=""> }<br class="">- } else {<br class="">- priv->err_msg = g_strdup(err->message);<br class=""> }<br class="">+ g_clear_error(&err);<br class=""> }<br class="">-<br class="">- g_clear_error(&err);<br class="">+ gtk_widget_set_sensitive(widget, can_redirect);<br class="">}<br class=""><br class="">static gboolean spice_usb_device_widget_update_status(gpointer user_data)<br class="">@@ -458,9 +460,9 @@ static void connect_cb(GObject *gobject, GAsyncResult<br class="">*res, gpointer user_data)<br class=""> g_error_free(err);<br class=""><br class=""> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->check), FALSE);<br class="">- spice_usb_device_widget_update_status(self);<br class="">- }<br class=""><br class="">+ }<br class="">+ spice_usb_device_widget_update_status(self);<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I'd prefer the newline to be after the brace (as it was before) rather than</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">before the brace.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>Fixed. Thanks.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""> g_object_unref(data->check);<br class=""> g_object_unref(data->self);<br class=""> g_free(data);<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ACK with minor change above.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Acked-by: Jonathon Jongsma <</span><a href="mailto:jjongsma@redhat.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">jjongsma@redhat.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">></span></div></blockquote></div><br class=""></body></html>