Re: [AD] OSX - About dialog

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


On Friday 14 October 2005 02:26 pm, Evert Glebbeek wrote:
> How do you make Windows pop up a standard about box for an application,
> without the programme in question having a menu or anything like that?

The programmer can implement a method themself. Like if they make an About... 
menu with Allegro's GUI, or some command line option, or something.

> > It's sorta the same thing with win_set_window.
>
> Not really, because...
>
> > There was a way to make Windows
> > use an alternate display handle, so they made the function.
>
> ... there's no new function to create.

That's not the point. The point is that with this, OSX would now have a way to 
show a spiffy about dialog. However, I'm sure it wouldn't be all the hard to 
make a method for Windows to popup a similar dialog with native widgets. But 
you can't do it the OSX way, so all those programs taking the OSX route can't 
have the same thing on Windows, unless they code a specific non-OSX path.

> I don't see that there is a cross platform implementation.

What about that psuedo-code I posted before?

> 1) This code implements the MacOS X way of doing this.

Just like how looking in the program's directory for a config file was DOS's 
way to do that. There was no extra function/API change needed, it's just how 
it was done.

IMO, you should consider other platforms now instead of trying to change 
things later on.

> 2) There is no API change involved in this patch, and thus no chance of an
> API breakage.

API breakage isn't my concern. My concern is supporting this now, and then 
later when you want to add similar boxes for other platforms you hit a snag.. 
the inability to parse HTML for a Windows dialog (or for an Allegro dialog), 
which causes you to now have to do it two different ways to do basically the 
same thing on multiple platforms.

> ``If you wish to include credits or general information with your
> programme, just include a credits.html file. On Windows you can place this
> in the start menu with your executable. On Mac OS X, the contents of this
> file will appear automatically in the about menu.''

Except the screenshot Peter posted had it (along with a seperate image) in a 
system dialog box, not a web browser. It wouldn't be nice for other systems 
to have to open up a web browser to see it (and miss the iamge). Nor would it 
work for Unix/X where you can't gaurantee it to run a web browser when you 
give it a html file. And for systems that wouldn't be able to popup a system 
dialog, or run a concurrent process, they'd need to use an Allegro dialog, 
which can't do HTML, to show it.

> So, my real question, is this feature to OS X bundles as having an icon is
> to Windows executables?

I would say, no. The about dialog, IMO, is something the program can use to 
display a short little something about itself. Perhaps to show some credits 
and contact information, too. The icon for Windows executables is ultimately 
inconsequential. It's just a neat little thing to help pretty-up the file in 
a file browser or the program in the taskbar.. where as the About dialog can 
show some pretty important credit or contact information.

> Would you have objected to having a way to create an
> icon in Windows or X11 because DOS doesn't have icons and the way to do it
> is therefor not platform independent?

The thing with icons is, AFAIK, that they have to be compiled into the 
program, as well that Windows and X11 both had different methods of doing 
this and supported different image formats. There was no way to get around 
that so it inherently needed system specific methods. This is unlike an About 
dialog which can be constructed manually at run time.

Is there a way for someone to enable the About dialog from their own code? 
What happens if there's no image or text/html file?




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