Re: GtkApplication and argc/arv
- From: Bastien Nocera <hadess hadess net>
- To: Colin Walters <walters verbum org>
- Cc: gtk-devel-list gnome org, Murray Cumming <murrayc murrayc com>
- Subject: Re: GtkApplication and argc/arv
- Date: Fri, 25 Feb 2011 12:14:49 +0000
On Thu, 2011-02-24 at 17:51 -0500, Colin Walters wrote:
> On Mon, Feb 21, 2011 at 3:57 PM, Murray Cumming <murrayc murrayc com> wrote:
> > 2.
> > How should we use GOptionContext to parse command line arguments from
> > argc/argv when using GtkApplication. Is this the ideal way, using the
> > command-line signal?
> > http://git.gnome.org/browse/totem/tree/src/totem.c#n187
> > It seems a little long-winded.
> I think that's best practice, yeah. It's obviously complicated, but I
> don't think it could really be made much easier. Be happy to be
> proved wrong though =)
Totem's use of GtkApplication is broken actually. It doesn't parse
command-line arguments properly on the client side (so --version won't
work if you have a running instance).
The problem is that Totem doesn't just want to show up a window, and
then process the arguments. We want to know whether the user asked for
fullscreen on startup, before showing the window for example.
] [Thread Prev