Preprocessor directives and gettext - patch for pidgin-mtn/pidgin/gtkmain.c

David Mohr damailings at mcbf.net
Thu Sep 20 00:18:21 EDT 2007


On 9/19/07, Etan Reisner <pidgin at unreliablesource.net> wrote:
> On Wed, Sep 19, 2007 at 08:18:24PM -0600, David Mohr wrote:
> > A simpler workaround would be to just use
> > " --display=DISPLAY   X display to use (Unix only)\n",
> > and have it be displayed under Windows as well. Then it could be
> > translated as one string again.
> >
> > ~David
>
> And an even better solution would be to not have to have pidgin simply
> ignore the --display option. Is --display even the right syntax for GTK+?
> Have they fallen that far from the X 'standards'? (Given a quick test with
> gtk-demo it would seem that it is.)

What do you mean by not ignoring it? Under Linux gtk handles it, and
is there even a similar way of specifying displays under Windows?
--display is the correct syntax these days. Can I ask what it used to be?

> Doing this correctly just requires two passes at the argument list once
> before we initialize GTK+ and once afterwards (assuming we want to keep
> the die-on-unrecognized-options behaviour we have now). If we don't mind
> just ignoring unknown options it becomes easier, we just set opterr to 0
> instead of 1.

Glib has functions to completely handle the command line parsing. If
that was used, then it would be handled in one shot, because that
function also initializes gtk.

>         -Etan

~David




More information about the Devel mailing list