Re: [AD] native filechooser addon

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 22-Feb-09, at 4:00 PM, Elias Pschernig wrote:
I'd say menus are too much. In the case of GTK it also would mean to go
at a much deeper level, basically a GTK display driver which creates a
GTK Window with a menubar widget and an OpenGL widget.

Right.
Out of curiosity, how hard would it be to do something like that?

The problem is, Allegro's event queue would fill up fairly quickly if
you simply block the main thread - and when returning you'd have to
process 100ds of timer and inputs events all at once. And at least on my
X11, if the main window stops answering to events, the result is very
ugly in general. (Believe me, my first version of this did implement it as a blocking call.) Of course, we could add some kind of pause mode to
Allegro where it discards most events and has some default answer to
redraw and similar events - but users can already do that easily
themselves.

Hmm... yes, that's a problem of course. A pause-mode sounds good, or we should flush the event queue. I think I can make the change to the OS X version of the file dialog addon though, so it will behave in the same way as the GTK version.

On 22-Feb-09, at 4:02 PM, Elias Pschernig wrote:
The idea was to only select directories, as GTK supports that. Not sure
if selecting files as well as directories works - but we can add many
flags here of course, I made the documentation so all of them can be
simply be ignored by the implementation :)

No, that's fine. I was just asking because the description was unclear to me. OS X allows you to specify what you want to allow the user to select: files, directories, or both (or neither, not sure what you get in that case).

In other news - I have an OS X native file selection dialog box working. It doesn't accept patterns at the moment and it may have some bugs in how it deals with the "initial path" you pass in. I'll commit it as soon as the addon appears in SVN.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/