mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
Merge the wip/gapplication branch
This adds a GApplication object to GIO, which is the core of an application support class, supporting - uniqueness - exporting actions (simple scripting) - standard actions (quit, activate) The implementation for Linux uses D-Bus, takes a name on the session bus, and exports a org.gtk.Application interface. Implementations for Win32 and OS X are still missing.
This commit is contained in:
@@ -879,6 +879,7 @@ typedef struct
|
||||
{
|
||||
char *display;
|
||||
char *sn_id;
|
||||
char *desktop_file;
|
||||
} ChildSetupData;
|
||||
|
||||
static void
|
||||
@@ -891,6 +892,16 @@ child_setup (gpointer user_data)
|
||||
|
||||
if (data->sn_id)
|
||||
g_setenv ("DESKTOP_STARTUP_ID", data->sn_id, TRUE);
|
||||
|
||||
if (data->desktop_file)
|
||||
{
|
||||
gchar pid[20];
|
||||
|
||||
g_setenv ("GIO_LAUNCHED_DESKTOP_FILE", data->desktop_file, TRUE);
|
||||
|
||||
g_snprintf (pid, 20, "%d", getpid ());
|
||||
g_setenv ("GIO_LAUNCHED_DESKTOP_FILE_PID", pid, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -927,6 +938,7 @@ g_desktop_app_info_launch_uris (GAppInfo *appinfo,
|
||||
|
||||
data.display = NULL;
|
||||
data.sn_id = NULL;
|
||||
data.desktop_file = info->filename;
|
||||
|
||||
if (launch_context)
|
||||
{
|
||||
|
Reference in New Issue
Block a user