mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
GApplication: allow null application_id
GApplication application ID is now permitted to be NULL, in which case G_APPLICATION_NON_UNIQUE will be implicitly enabled. https://bugzilla.gnome.org/show_bug.cgi?id=671249
This commit is contained in:
@@ -194,6 +194,10 @@ application_path_from_appid (const gchar *appid)
|
||||
{
|
||||
gchar *appid_path, *iter;
|
||||
|
||||
if (appid == NULL)
|
||||
/* this is a private implementation detail */
|
||||
return g_strdup ("/org/gtk/Application/anonymous");
|
||||
|
||||
appid_path = g_strconcat ("/", appid, NULL);
|
||||
for (iter = appid_path; *iter; iter++)
|
||||
{
|
||||
@@ -358,6 +362,8 @@ g_application_impl_register (GApplication *application,
|
||||
GDBusActionGroup *actions;
|
||||
GApplicationImpl *impl;
|
||||
|
||||
g_assert ((flags & G_APPLICATION_NON_UNIQUE) || appid != NULL);
|
||||
|
||||
impl = g_slice_new0 (GApplicationImpl);
|
||||
|
||||
impl->app = application;
|
||||
|
Reference in New Issue
Block a user