gdesktopappinfo: Emit "launched" and "launch-failed" signals for DBus activation too

When using g_desktop_app_info_launch_uris_as_manager the "launched"
signal allows to map a desktop-startup-id to a GAppInfo. Make this
possible for DBus activation too.

Since we don't have a PID there we pass a 0. Update the signal
description accordingly.
This commit is contained in:
Guido Günther
2021-08-19 12:15:27 +02:00
parent bd7a3e2561
commit 5890b2bdea
2 changed files with 77 additions and 2 deletions

View File

@@ -1172,6 +1172,10 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
* platform-specific data about this launch. On UNIX, at least the
* `pid` and `startup-notification-id` keys will be present.
*
* Since 2.72 the `pid` may be 0 if the process id wasn't known (for
* example if the process was launched via D-Bus). The `pid` may not be
* set at all in subsequent releases.
*
* Since: 2.36
*/
signals[LAUNCHED] = g_signal_new (I_("launched"),