Abdelrazak Younes a écrit :
Leuven, E. a écrit :
On windows, I think there's a public API for that kind of stuff yes. But I really prefer the simpler, faster, leaner lyx file dialog. I really don't understand why people insist on using the native ones for opening lyx files. But I agree that the native dialog is useful when you want to include a graphic because you can preview it; but then you loose the nifty shortcuts of the lyx one. If you ask me, I would force the lyx "save as" and "open lyx file" dialogs to be the lyx one.

but the current lyx file dialog depends on Q3FileDialog which needs to go.

Yes.

> i wasn't able to figure out how to add the shortcuts on the new QFileDialog,
 > but probably didn't look hard enough...

Haven't looked at QFileDialog yet but the documentation seems to say that it is not up to the Q3 version feature wise.

I just had an interesting journey in QFileDialog implementation. The functionality is all there but it's all private :-(
It looks very easy to add any button we'd like there.

Another option would be to create our own dialog using QDirModel.

There are basically 3 solutions:

1) hack QFileDialog and use it until the functionality appear in Qt4.2 or Qt4.3. This seems very easy to do (just make addWidget() protected instead of private or just add the buttons in setupToolButtons()).

2) stay with Q3FileDialog and just use addToolButton. Minimal change, minimal risk, and we postpone the porting to QFileDialog unti Qt4.2.

3) Create our own widget using QDirModel. Maximum risk, maximum change, but way more interesting!

Abdel.

Reply via email to