zander at kde.org
Fri May 19 09:45:51 BST 2006
On Thursday 18 May 2006 13:09, David Faure wrote:
> - overwrite/rename/skip dialog boxes; used to be in kio_uiserver and
> then I moved them back to kio, since modal dialogs in kio_uiserver were
> a bad idea, apps using uiserver would be blocked until the modal dialog
> is closed. [observer.cpp -r139967 for reference.] Maybe the fix is
> simply to let CopyJob be in kio or kdeui. It's the more low-level jobs
> that are non-gui.
The way I solved this in a similar situation (it was a login dialog that
the backend required) was the following;
* The backend creates a dependency tree. All files depend on the directory
they are in, so you can't copy a file if the dir can't be created (aka
copied) on the destination. Similarly you can't copy until you logged
into the host. etc.
You can remove directory B if directory A failed due to permissions,
however. Hence the need for a tree instead of a list. (this part fails in
kio currently, one file is unreadable means the whole copy is stopped)
* The jobs are processed sequentially, but jobs can be blocked due to
required user interaction. When a blocked job is encountered that branch
of the dependency tree is skipped and we go to the next branch so we
still utilize resources.
* if you encounter a problem while processing jobs requiring user
intervention (overwrite/rename/skip dialog boxes) post a request to the
front end. The front end answers after a while and the job is resumed.
In my solution I did an initial handshake and a 'ping' from the backend to
the GUI every 10 seconds to see if the GUI was still alive. If it wasn't
I cancelled the whole branch.
Hope that helps...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 191 bytes
Desc: not available
More information about the kde-core-devel