From 7080c0371dc7bf8ea4de43b28adb9808240b98c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 15 Jul 2016 11:31:27 +0200 Subject: [PATCH] appmenus: force X-Qubes-VM category for all VM-related entries This will ease filtering entries when constructing applications menu. For example '' key used in Xfce4 before looks to introduce some problems. Fixes QubesOS/qubes-issues#2129 --- appmenus-files/qubes-appmenu-select.desktop | 2 +- appmenus-files/qubes-dispvm-firefox.desktop | 2 +- appmenus-files/qubes-start.desktop | 2 +- appmenus-scripts/qubes-receive-appmenus | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/appmenus-files/qubes-appmenu-select.desktop b/appmenus-files/qubes-appmenu-select.desktop index f2561c4..93a6da7 100644 --- a/appmenus-files/qubes-appmenu-select.desktop +++ b/appmenus-files/qubes-appmenu-select.desktop @@ -7,4 +7,4 @@ Terminal=false Name=%VMNAME%: Add more shortcuts... GenericName=%VMNAME%: Add more shortcuts... StartupNotify=false -Categories=System; +Categories=System;X-Qubes-VM; diff --git a/appmenus-files/qubes-dispvm-firefox.desktop b/appmenus-files/qubes-dispvm-firefox.desktop index 449000c..5710012 100644 --- a/appmenus-files/qubes-dispvm-firefox.desktop +++ b/appmenus-files/qubes-dispvm-firefox.desktop @@ -7,4 +7,4 @@ Terminal=false Name=DispVM: Firefox web browser GenericName=DispVM: Web browser StartupNotify=false -Categories=Network; +Categories=Network;X-Qubes-VM; diff --git a/appmenus-files/qubes-start.desktop b/appmenus-files/qubes-start.desktop index a30950b..be55a98 100644 --- a/appmenus-files/qubes-start.desktop +++ b/appmenus-files/qubes-start.desktop @@ -7,4 +7,4 @@ Terminal=false Name=%VMNAME%: Start GenericName=%VMNAME%: Start StartupNotify=false -Categories=System; +Categories=System;X-Qubes-VM; diff --git a/appmenus-scripts/qubes-receive-appmenus b/appmenus-scripts/qubes-receive-appmenus index ab62a2c..75aa0b1 100755 --- a/appmenus-scripts/qubes-receive-appmenus +++ b/appmenus-scripts/qubes-receive-appmenus @@ -213,6 +213,9 @@ def create_template(path, values): if key in values: desktop_entry += "{0}=%VMNAME%: {1}\n".format(key, values[key]) + # force category X-Qubes-VM + values["Categories"] = values.get("Categories", "") + "X-Qubes-VM;" + for key in ["Comment", "Categories"]: if key in values: desktop_entry += "{0}={1}\n".format(key, values[key])