[Portland] PortlandVFSProposal

Lubos Lunak l.lunak at suse.cz
Wed Jan 11 16:32:57 EET 2006


On Tuesday 10 January 2006 19:49, nf2 wrote:
> Lubos Lunak wrote:
> >On Monday 09 January 2006 21:00, nf2 wrote:
> >>You can't design custom filedialogs or have embedded
> >>filemanagers like in K3B etc...
> >
> > You can. I already posted a screenshot of Qt-only app (Scribus) using a
> > KDE file dialog to this list once. Out-of-process file dialog. With
> > customized widgets. Without modifying Scribus in any way.
>
> Yes i remember.
>
> http://lists.osdl.org/pipermail/desktop_architects/2005-December/000285.html
>
> Did you explain how it works?

 No, not really (besides saying that it's a Rudi-like approach). Given that I 
don't consider the pages at fd.o to be a sufficient description of the 
problems and the aim, I didn't want to jump to discussing implementation 
details of a possible solution before knowing it actually could be a 
solution. But since everybody else has done that already I guess I'm just 
missing something that was only discussed at the meeting.

 Anyway. As I already said, it can be also used as a proof-of-concept for 
Rudi-like approach. The Qt library is patched to use DCOP calls to a KDE 
daemon that actually performs some of the operations. You can already see a 
very basic version of it in SUSE Linux 10.0, e.g. if the you run the Qt 
designer (the color dialog, the open file dialog from File/Open - there are 
some screenshots at http://ktown.kde.org/~seli/download/qtkde/). Qt has e.g. 
QFileDialog::getOpenFileName() and just like the Windows version uses WinAPI 
to open the Windows dialog this patched version does a DCOP call to open a 
KDE file dialog.

 The last screenshot, Scribus, doesn't work in SL10.0, that's experimenting 
with making it more complicated by making it possible to use customized 
dialogs while not altering the API in any way. You can see the original 
Qt-only customized Scribus dialog if you insert a text frame and then go to 
File/Import/Insert text. That's done by patching Qt to use a simple protocol 
for synchronizing widgets in the customized Qt file dialog with the widgets 
in the KDE dialog (like CreateCombo()->Id, InsertComboItem(Id,Text), etc. and 
when the user e.g. selects something there's a message the other way 
ComboItemSelected(Id,Item) ). Not exactly trivial, but rather tedious than 
difficult. The functionality of file dialogs isn't actually something that 
complicated, so the basics were rather simple, it's only where wants to put 
the limit. And of course just making it a new API would be simpler than 
hiding it behind the Qt API.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/



More information about the Portland mailing list