mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-18 21:10:00 +00:00
gtkopenuriportal: Call g_app_launch_context_get_startup_notify_id() directly
Since GLib 2.82 `g_app_launch_context_get_startup_notify_id ()` allows `NULL for `info` and `files`.
This commit is contained in:
parent
da9886d822
commit
286c6ab03e
@ -443,14 +443,14 @@ window_handle_exported (GtkWindow *window,
|
||||
else
|
||||
display = gdk_display_get_default ();
|
||||
|
||||
/* FIXME
|
||||
* Call the vfunc directly since g_app_launch_context_get_startup_notify_id
|
||||
* has NULL checks.
|
||||
*
|
||||
* We should have a more direct way to do this.
|
||||
*/
|
||||
context = G_APP_LAUNCH_CONTEXT (gdk_display_get_app_launch_context (display));
|
||||
|
||||
#if GLIB_CHECK_VERSION (2, 82, 0)
|
||||
activation_token = g_app_launch_get_startup_notify_id (context, NULL, NULL);
|
||||
#else
|
||||
activation_token = G_APP_LAUNCH_CONTEXT_GET_CLASS (context)->get_startup_notify_id (context, NULL, NULL);
|
||||
#endif
|
||||
|
||||
g_object_unref (context);
|
||||
|
||||
open_uri (data, handle, activation_token, open_uri_done);
|
||||
|
Loading…
Reference in New Issue
Block a user