Re: GtkApplication and argc/arv



Excerpts from jose aliste gmail com's message of vie feb 25 00:25:01 +0100 2011:
> Hi,
> 
> On Tue, Feb 22, 2011 at 6:45 AM, Murray Cumming <murrayc murrayc com> wrote:
> > On Mon, 2011-02-21 at 21:57 +0100, Murray Cumming wrote:
> >> I'm trying to wrap GtkApplication for gtkmm but I can't really do that
> >> until I understand how it's meant to be used.
> >>
> >> In general, I find the documentation lacks overview and advice, partly
> >> because it's spread between GApplication and GtkApplication and mentions
> >> some concepts without explaining them first. So I have some questions.
> >>
> >> 1.
> >> Are we still meant to call gtk_init(&argc, &argv) when using
> >> GtkApplication, which takes argc/argv again via g_application_run(). Or
> >> is gtk_init() then superfluous?
> >>
> >> Mathias mentioned that gtk_init(NULL, NULL) is best anyway, though I
> >> don't understand why:
> >>   http://bugzilla.gnome.org/show_bug.cgi?id=639925#c3
> >>
> >> 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.
> >
> > And more simply:
> >
> > 3. Will we recommend that all GTK+ applications generally use
> > GtkApplication?
> >
> > 4. Do we believe that all (GTK+) applications should be single-instance
> > applications?
> 
> Just to point out  an example, Evince does not use GtkApplication and
> it's not single instanced (there is one process per each document you
> see) and I don't think there are plans to make it single instanced.

Note that we moved from single process model to multiple process
without changing the evince behaviour, it still behaves like a single
instance app, opening an already opened document brings it to the
front. 

> Greets
> 
> José
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462

Attachment: signature.asc
Description: PGP signature



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