After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646985 - add G_APPLICATION_NON_UNIQUE flag
add G_APPLICATION_NON_UNIQUE flag
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-04-07 03:29 UTC by Allison Karlitskaya (desrt)
Modified: 2011-04-10 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allison Karlitskaya (desrt) 2011-04-07 03:29:27 UTC
The message should be very clear:

  GtkApplication is appropriate for use by all Gtk applications.

Some Gtk applications don't want to be single-instance, so we should support that.
Comment 1 Allison Karlitskaya (desrt) 2011-04-07 03:34:42 UTC
The intention is that non-unique applications:

  - can not be launchers

  - can not be services

  - will make no attempt to acquire the application ID as a D-Bus name

  - will make no attempt to check if another instance is already running

  - will dispatch all activate/open/actions/etc in the local process

  - may avoid going on D-Bus entirely

  - may allow the application identifier to be omitted


The reason for the last two "may" is because we currently emit a signal with the application ID to the bus on startup as a useful sort of "here I am" notification and also because the application identifier has some potential further uses as we add features to GtkApplication.
Comment 2 Allison Karlitskaya (desrt) 2011-04-10 11:57:31 UTC
commit 9d204338f3e2a0eb7fb53eb7287040eb8d0f8589
Author: Ryan Lortie <desrt@desrt.ca>
Date:   Sun Apr 10 07:51:55 2011 -0400

    GApplication: add G_APPLICATION_NON_UNIQUE
    
    Add a flag to essentially short-circuit g_application_register().  The
    application makes no attempt to acquire the bus name or check for
    existing instances with that name.  The application is never considered
    as being 'remote' and all requests are handled locally.
    
    Closes #646985.


For the record: I avoid going on D-Bus entirely, but the application ID is still required.  On both counts this seems like the more conservative choice for the time being.