From d79ec5d717263869064957d56523b02274766974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Lepp=C3=A4nen?= Date: Wed, 23 Jun 2021 10:18:19 +0300 Subject: [PATCH] [libcontentaction] Make no-invoker synonymous with generic. JB#54498 OMP#JOLLA-178 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After this change all apps will go through booster. Generic booster should not differ much from launching directly but this way we can better control for example sandboxing. Signed-off-by: Tomi Leppänen --- src/exec.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/exec.cpp b/src/exec.cpp index 8c680a8..bfa3d6b 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -68,9 +68,11 @@ ExecPrivate::ExecPrivate(QSharedPointer desktopEntry, gchar *boosterType = g_key_file_get_string(keyFile, "Desktop Entry", "X-Nemo-Application-Type", NULL); - if (boosterType == NULL) { + if (boosterType == NULL || g_strcmp0(boosterType, "no-invoker") == 0) { // Default booster type is "generic". This can be overridden via // "X-Nemo-Application-Type=". + // "no-invoker" is synonymous to "generic" + g_free(boosterType); boosterType = g_strdup("generic"); } @@ -83,15 +85,12 @@ ExecPrivate::ExecPrivate(QSharedPointer desktopEntry, singleInstance = false; } - // Set X-Nemo-Application-Type to "no-invoker" to disable invoker - if (g_strcmp0(boosterType, "no-invoker") != 0) { - gchar *invokerString = g_strdup_printf("invoker --type=%s %s %s", - boosterType, - singleInstance ? "--single-instance" : "", - execString); - g_key_file_set_string(keyFile, "Desktop Entry", "Exec", invokerString); - g_free(invokerString); - } + gchar *invokerString = g_strdup_printf("invoker --type=%s %s %s", + boosterType, + singleInstance ? "--single-instance" : "", + execString); + g_key_file_set_string(keyFile, "Desktop Entry", "Exec", invokerString); + g_free(invokerString); g_free(boosterType); g_free(singleInstanceValue);