[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: core/ui separation
From:       Thomas Zander <zander () kde ! org>
Date:       2006-05-19 8:45:51
Message-ID: 200605191045.51493.zander () kde ! org
[Download RAW message or body]


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...
-- 
Thomas Zander

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic