glib2.0/debian/patches/kylin-process-manager-dbus-...

46 lines
2.0 KiB
Diff

From: Yue-Lan <lanyue@kylinos.cn>
Date: Tue, 5 Dec 2023 15:31:42 +0800
Subject: =?utf-8?b?57un57ut6YCC6YWNa3lsaW4tcHJvY2Vzcy1tYW5hZ2Vy55qEZGJ1cw==?=
=?utf-8?b?5o6l5Y+j77yM5bCd6K+V5L+u5aSN57yW56CB6Zeu6aKY?=
---
gio/gdesktopappinfo.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 17fe37f..9bb8248 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -3272,21 +3272,21 @@ g_desktop_app_info_launch_with_kylin_process_manager (GDesktopAppInfo *info,
GAsyncReadyCallback callback,
gpointer user_data)
{
- const gchar *cmd = g_app_info_get_executable (G_DESKTOP_APP_INFO (info));
- gchar *args = g_strdup (cmd);
- GList *iter = uris;
+ const gchar *path = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
GVariantBuilder builder;
+ GList *iter;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add (&builder, "s", path);
+ g_variant_builder_open (&builder, G_VARIANT_TYPE_STRING_ARRAY);
+ iter = uris;
while (iter) {
char *uri = iter->data;
- char *tmp_args = g_strconcat (args, " ", uri, NULL);
- g_free (args);
- args = tmp_args;
+ g_variant_builder_add (&builder, "s", uri);
iter = iter->next;
}
- g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
- g_variant_builder_add (&builder, "s", args);
- g_free (args);
- g_dbus_connection_call (session_bus, "com.kylin.ProcessManager", "/com/kylin/ProcessManager/AppLauncher", "com.kylin.ProcessManager.AppLauncher", "RunCommand",
+ g_variant_builder_close (&builder);
+
+ g_dbus_connection_call (session_bus, "com.kylin.ProcessManager", "/com/kylin/ProcessManager/AppLauncher", "com.kylin.ProcessManager.AppLauncher", "LaunchAppWithArguments",
g_variant_builder_end (&builder), NULL, G_DBUS_CALL_FLAGS_NONE, -1, cancellable, callback, user_data);
}