Re: GtkApplication and argc/arv



On Wed, 9 Mar 2011 08:16:44 +0000
Emmanuele Bassi <ebassi gmail com> wrote:
> On 2011-03-08 at 22:16, Paul Davis wrote:
> > On Tue, Mar 8, 2011 at 9:56 PM, Andrew Cowie
> > <andrew operationaldynamics com> wrote:
> > > On Tue, 2011-03-08 at 12:06 +0100, Murray Cumming wrote:
> > >> I would very much like some reasoning to point people at when I
> > >> tell them to use GtkApplication. I will not just hand-wave and
> > >> say that people say it's good.
> > >
> > > GtkApplication is the GNOME 3.0 replacement for LibUnique, right?
> > > If so, then fine; the developer can choose whether the single
> > > instance pattern is appropriate for their application as before.
> > 
> > this is part of the problem here. GtkApplication was originally
> > floated as something a bit different than "just" what libunique did.
> > it increasingly feels as if it has morphed into nothing but a
> > repalcement for it. this may or may not be true, but that's
> > certainly the impression that discussions about it are creating.
> 
> no, GtkApplication isn't being "morphed" into libunique replacement -
> and I can say so as the maintainer of libunique.
> 
> it just so happens that, for the desktop that is currently being
> targeted on the X11/Linux platform (i.e. GNOME 3), the default
> approach for applications is strongly adviced to be the
> single-instance one[0].
> 
> then there are the actions, for remote control; the "application as a
> service" implementation; the startup notification control; the window
> ↔ application relationship; the main loop control tied to the
> application's lifetime; etc.

The case for having single-instance programs in most cases for
programs with a GUI interface seems self-evident to me, since most
GUI programs keep some running global state which would be extremely
tedious to synchronise between different processes.

However, the deficiency I have found in the past with respect to
implementing single instance programs using gtk+/gnome is the window
manager.  Usually in the circumstances I have described you want
gtk_window_present() to do what it says it does (for the remote dbus
callback to bring up the chosen main application window to the user),
but the window manager seems to do its best to sabotage all attempts to
do so.

Will gnome shell adopt a different strategy on this?  I certainly hope
so.

Chris


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