Re: [AD] Removing the default close button support

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


On 2002-11-03, Eric <ebotcazou@xxxxxxxxxx> wrote:
> > Ok, but how would the internationalised message thing work?  I hope it
> > is not an implicit get_config_text() call in set_close_button_callback().
> 
> Do you mean that you don't want the user message to be passed through 
> get_config_text() ? Ok, that makes sense.

Yes.

> Then we have no other choice than 
> defining DEFAULT_MSG to be a well-chosen constant:
> 
>    #define DEFAULT_MSG  (const char *)1

What about:

const char *_al_default_close_dialog_message_en = "blah blah blah";

#define DEFAULT_MSG  _al_default_close_dialog_message_en

void set_close_button_callback(void (*proc)(void), const char *msg)
{
    if (msg == _al_default_close_dialog_message_en)
	msg = get_config_text(msg);

    ...
}

-- 
王浩禎



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