mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
Make default-quit not apply if register=FALSE
Callers who are using g_application_unregistered_try_new are likely wanting to continue doing something else if _register() fails. Change the semantics so that passing register=FALSE unsets default-quit as well. This means that a later _register() call will send Activate but continue the process. https://bugzilla.gnome.org/show_bug.cgi?id=622005
This commit is contained in:
@@ -301,6 +301,10 @@ _g_application_platform_register (GApplication *app,
|
||||
gboolean result;
|
||||
guint registration_id;
|
||||
|
||||
/* Callers should have verified this */
|
||||
g_assert (app->priv->registration_tried == FALSE);
|
||||
app->priv->registration_tried = TRUE;
|
||||
|
||||
registration_id = g_dbus_connection_register_object (app->priv->session_bus,
|
||||
app->priv->dbus_path,
|
||||
&application_dbus_interface_info,
|
||||
@@ -339,7 +343,7 @@ _g_application_platform_register (GApplication *app,
|
||||
{
|
||||
app->priv->is_remote = FALSE;
|
||||
}
|
||||
else if (app->priv->default_quit)
|
||||
else
|
||||
{
|
||||
GVariantBuilder builder;
|
||||
GVariant *message;
|
||||
@@ -361,7 +365,8 @@ _g_application_platform_register (GApplication *app,
|
||||
if (result)
|
||||
g_variant_unref (result);
|
||||
|
||||
exit (0);
|
||||
if (app->priv->default_quit)
|
||||
exit (0);
|
||||
}
|
||||
|
||||
done:
|
||||
|
Reference in New Issue
Block a user