>Betreff : Re: [linux-minidisc] changed himdformat.c to work on linux and windows >Gesendet: 08.04.2010 00:32:37 >An : "manner.moe@gmx.de" >Von: "Michael Karcher <Michael.Karcher@fu-berlin.de>" >----- Originale Nachricht ----- >You should not have the scsi_device string a public variable, in my >oppinion, but have it set by the constructor or maybe a setter function, >so you can assume that it is valid here, or, even better, open the >device already when the formatting dialog is opened. This should mark >the device as in-use for the "safely remove hardware" function in >Windows, and most importantly it would not show the format dialog if >formatting is not going to work. >Kind Regards, > Michael Karcher Hi, I changed the code now. Opening the device marks it as in-use for the "safely remove hardware" function but detection code doesn´t know it and removes the device anyway. So I had to add some extra functions. By clicking Format button himd_busy signal will be sent, the formatDialog opens the device and shows the dialog only if the device can be opened. If formatDialog has finished (successful or not) the device is closed and a format_finished() signal is sent. The mainwindow sends himd_idle signal then. If formatDialog is shown, Connect button and himd_devices combobox will be disabled to prevent changing the device while format is in progress. If the device has been removed without using "safely remove hardware" function the formatdialog closes immediately. Thomas Arp
Attachment:
0001-added-himd-format-feature-using-libsgutils2.patch
Description: Binary data