mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
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.
This commit is contained in:
@@ -1006,14 +1006,17 @@ g_application_register (GApplication *application,
|
||||
|
||||
if (!application->priv->is_registered)
|
||||
{
|
||||
application->priv->impl =
|
||||
g_application_impl_register (application, application->priv->id,
|
||||
application->priv->flags,
|
||||
&application->priv->remote_actions,
|
||||
cancellable, error);
|
||||
if (~application->priv->flags & G_APPLICATION_NON_UNIQUE)
|
||||
{
|
||||
application->priv->impl =
|
||||
g_application_impl_register (application, application->priv->id,
|
||||
application->priv->flags,
|
||||
&application->priv->remote_actions,
|
||||
cancellable, error);
|
||||
|
||||
if (application->priv->impl == NULL)
|
||||
return FALSE;
|
||||
if (application->priv->impl == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
application->priv->is_remote = application->priv->remote_actions != NULL;
|
||||
application->priv->is_registered = TRUE;
|
||||
|
Reference in New Issue
Block a user