Dear Sir
Thanks for you help, I have successful compiled my code .
About the new interface spice_reget_usb_state(), it's for a bug
: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 .
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 : "Operation not supported or unimplemented on this platform"
So I checked the source code and found in the function : device_added_cb()
if (spice_usb_device_manager_is_device_connected(priv->manager,
device))
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE);
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(spice_usb_device_manager_is_device_connected) just do judgement that it's whether has been connected ,probably .So when I operated quickly at device widget (click checkbox -close widget -run widget -click check box) the mark was disappeared .
So i want to add a condition to get the current usb state ,if(spice_usb_device_manager_is_device_connected ||state == SPICE_USB_DEVICE_STATE_INSTALLING) {then .............} so i write a method to get the state .
I didn't test the result yet ..maybe it will be successful maybe not ..
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel