Re: [AD] allegro_message under X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] allegro_message under X
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Sat, 23 Oct 2004 18:55:47 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Tx1xqPGHkJd5nt1t41NJwYKMvVELxXxpBBQ5k8Jxe2nE1bbH+ek0wGNLRgw0r08EkWrvD0NFWFgwZaJ7P2W7kWlhZF5MbQ28O3a0E3hUw4/764oPjJZC9cHEDQgXRa5axWFcu2fatEESzMbX1x97sZ02susTZCNswkR8FvYGLh0=
On Sun, 24 Oct 2004 02:46:16 +0200, Elias Pschernig <allefant@xxxxxxxxxx> wrote:
> >
> > Hmm, kdialog makes a huge difference on my system, it not just the OK
> > button :-) But it seems bare x apps such as xmessage look abnormally ugly on
> > my system. So I agree it's best to just always use xmessage.
> >
>
> Well, I don't know.. here, there's not much difference.
Why not just use the Xlib to print it? You shouldn't rely on external
programs being present, especially for such a function that can have
drasticly different behavior depending on its method of output.
> > Here is another patch, to use instead of the previous one. This time only
> > xmessage is tried, and I added a few more command line options to allow
> > closing the dialogs with ENTER.
>
> Ah, very nice. Having to click could have been annoying, e.g. with
> things like exbitmap.
I tend to use allegro_message sparingly for the sole reason that the
behavior is different on seperate platforms. On Windows you get an
intrusive dialog box that you have to click OK on before the program
continues. On any other platform, you get a messge printed to stdout
that doesn't block the program at all.
> Well, of course the window could be made invisible.. but that would be
> confusing to users. They see the desktop, and still input goes to the
> invisible Allegro program.
I found this problem through first-hand experience. It was not fun
trying to find a work-around.
> Allegro doesn't guarantee that you can get
> input without having set a gfx mode - I believe it is just the same in
> Windows. Of course, something like: set_gfx_mode (GFX_TEXT);
> allegro_message ("Bla"); set_gfx_mode (GFX_AUTODETECT); should work,
> and you should automagically start receiving input again.. just as
> long as you are in GFX_TEXT, you get no input.
Except, with a method like that you could very well miss the message
completely.. depending on the platform. It could print to stdout but
immediately be lost by the next function call. And you can't manually
wait for a key press because that'd be annoying to Windows users (who
would have to click OK then hit Enter), and it wouldn't work on
platforms where you can't get input without the gfx mode active.
IMHO, allegro_message is a really messy function with limited use.
- Kitty Cat