<div style="" class="wui-FileReadList"><div class="text"><div class="txt"><div class="mailMainArea" style="font-size:14px;font-family:Verdana,"宋体",Helvetica,sans-serif;line-height:1.66;padding:8px 10px;margin:0;"><p>Dear Sir</p><p><span class="" style="white-space:pre">      </span> Thanks for you help, I have successful compiled my code .</p><p><span class="" style="white-space:pre">        </span> About the new interface <span style="color: rgb(51, 51, 51); font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;">spice_reget_usb_state(), it's for a bug </span></p><p><span style="color: rgb(51, 51, 51); font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;"> 
      :that's  when I activated the usb device widget to click the check
 box for installing usb driver ,then closed(click X button) the device 
widget quickly and run the device widget again .</span></p><p><span style="color: rgb(51, 51, 51); font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;"> 
       Normally ,the mark of checkbox should be remained ,but it's 
disappeared. So when you click again ,it will be popped up a message box
 : "</span><font face="Verdana, 宋体, Helvetica, sans-serif" color="#333333"><span style="font-size: 14px; line-height: 23.2399997711182px;">Operation not supported or unimplemented on this platform"</span></font></p><p><font face="Verdana, 宋体, Helvetica, sans-serif" color="#333333"><span style="font-size: 14px; line-height: 23.2399997711182px;">         So I checked the source code and found in the function : device_added_cb()</span></font></p><p><font face="Verdana, 宋体, Helvetica, sans-serif"><span style="font-size: 14px; line-height: 23.2399997711182px;"><font color="#333333">     </font><font color="#cc0000">  if (spice_usb_device_manager_is_device_connected(priv->manager,</font></span></font></p><p><font face="Verdana, 宋体, Helvetica, sans-serif" color="#cc0000"><span style="font-size: 14px; line-height: 23.2399997711182px;">                                                     device))</span></font></p><p><font face="Verdana, 宋体, Helvetica, sans-serif" color="#cc0000"><span style="font-size: 14px; line-height: 23.2399997711182px;">        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE); </span></font></p><p><font face="Verdana, 宋体, Helvetica, sans-serif"><span style="font-size: 14px; line-height: 23.2399997711182px;"><font color="#cc0000">      </font>As,
 you see ,the condition was whether the device was connected ,if true 
the checkbox was set checked ,maybe for some reasons ,such as network 
delay or others ,  the usb needs more long time to redirect at Linux 
,however ,this interface(</span></font><span style="color: rgb(204, 0, 0); font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;">spice_usb_device_manager_is_device_connected</span><span style="font-size: 14px; line-height: 23.2399997711182px; font-family: Verdana, 宋体, Helvetica, sans-serif;">)  just do judgement that it's whether has been connected ,</span><font face="Verdana, 宋体, Helvetica, sans-serif"><span style="font-size: 14px; line-height: 23.2399997711182px;">probably
 .So when I operated quickly at device widget  (click checkbox -close 
widget -run widget -click check box) the mark was disappeared .</span></font></p><p><font face="Verdana, 宋体, Helvetica, sans-serif"><span style="font-size: 14px; line-height: 23.2399997711182px;">      So  i want to add a  condition to get the current usb state ,if(</span></font><span style="color: rgb(204, 0, 0); font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;">spice_usb_device_manager_is_device_connected ||state == </span><font face="Verdana, 宋体, Helvetica, sans-serif" color="#cc0000"><span style="font-size: 14px; line-height: 23.2399997711182px;">SPICE_USB_DEVICE_STATE_INSTALLING</span></font><span style="font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;">) {then .............} so  i write a method to get the state .</span></p><p><span style="font-family: Verdana, 宋体, Helvetica, sans-serif; font-size: 14px; line-height: 23.2399997711182px;">      I didn't test the result yet ..maybe it will be successful maybe not ..</span></p></div></div></div></div>