summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolf2020-01-01 22:22:20 +0100
committerWynn Wolf Arbor2020-02-04 13:54:09 +0100
commit32b8e1e2efe297fe4b7d59e5354377949600931c (patch)
tree1a8a80c51541e2987dab98edb419e4b9da995be1
parenta958ed7ae9bb20399d4bc54b385c79dbd0997ed6 (diff)
downloadportage-roles-32b8e1e2efe297fe4b7d59e5354377949600931c.tar.gz
group-desktop: Add patch supporting weltschmerz in glib
Because of what I can only surmise to be legacy reasons, glib (and therefore gio) use a hardcoded list of terminal emulators to use with AppInfo. This is used, for example, when launching terminal applications through a .desktop file with "Terminal=True". This patch adds rudimentary support for our own terminal emulator, weltschmerz. Hopefully sometime in the next 10 years this will be replaced by a cleaner solution upstream.
-rw-r--r--group-desktop/patches/dev-libs/glib/add-weltschmerz.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/group-desktop/patches/dev-libs/glib/add-weltschmerz.patch b/group-desktop/patches/dev-libs/glib/add-weltschmerz.patch
new file mode 100644
index 0000000..5f7c693
--- /dev/null
+++ b/group-desktop/patches/dev-libs/glib/add-weltschmerz.patch
@@ -0,0 +1,29 @@
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index 7d7425ea9..7a31a519e 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -2523,6 +2523,12 @@ prepend_terminal_to_vector (int *argc,
+ }
+ else
+ {
++ int skip_option = 0;
++ if (check == NULL)
++ {
++ check = g_find_program_in_path ("weltschmerz");
++ skip_option = 1;
++ }
+ if (check == NULL)
+ check = g_find_program_in_path ("nxterm");
+ if (check == NULL)
+@@ -2537,7 +2543,10 @@ prepend_terminal_to_vector (int *argc,
+ g_debug ("Couldn’t find a terminal: falling back to xterm");
+ }
+ term_argv[0] = check;
+- term_argv[1] = g_strdup ("-e");
++ if (!skip_option)
++ term_argv[1] = g_strdup ("-e");
++ else
++ term_argc--;
+ }
+
+ real_argc = term_argc + *argc;