Re: GtkApplication and argc/arv

On Fri, 2011-02-25 at 12:14 +0000, Bastien Nocera wrote:
> 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:
> <snip>
> > > 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?
> > >
> > > 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.

I got GApplication with command-line arguments in my cheese branch
working. If you need the arguments to be processed in the local
instance, you are going to need to override the local_command_line()
vfunc. You can see how I did it here:

Bastien, I think I could help with that, but I could not tell you or
promise how long would it take me :)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]