Re: [AD] native filechooser addon

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


On 2009-02-20, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> For things like a level editor, it can be really useful to display the
> system's standard file-open dialog to select files - even if the rest of
> the program uses just Allegro 5. The attached addon adds two functions
> to allow it.
> 
> For now, only a GTK filechooser is implemented. But if someone wants to
> add Windows/OSX/Qt versions, I think this will be quite nice.

> Index: addons/native_dialog/gtk.c
> ===================================================================
> --- addons/native_dialog/gtk.c	(revision 0)
> +++ addons/native_dialog/gtk.c	(revision 0)
> @@ -0,0 +1,207 @@
> +/* Each of these files implements the same, for different GUI toolkits:
> + * 
> + * gtk.c - GTK file open dialog
> + * osx.c - OSX file open dialog
> + * qt.c  - Qt file open dialog
> + * win.c - Windows file open dialog
> + * 
> + */

You should give them better filenames.

Would it be extended for simple alert boxes and so on?

There is no way to forcefully cancel a dialog box.  If you pop up a file
dialog, but then the user decides to quit the program without closing
that dialog the you'll probably have a problem as the event queue might
be destroyed already.

Peter

PS. reindent to 3 spaces please.





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