From d20a504a18939d1ac06aea7c8960c137dd152b12 Mon Sep 17 00:00:00 2001 From: Allison Ryan Lortie Date: Mon, 25 Apr 2016 11:54:54 +0200 Subject: [PATCH] desktop-entry-spec: allow '-' in application ids Up to now, the spec has not clearly specified what will happen if a '-' appears in an otherwise-valid-looking application ID with DBusActivatable=yes. This leads to problems because '-' is indeed valid in D-Bus names (which suggests that everything should work properly) but not valid in D-Bus object paths (which suggests that it won't work). Firm up the range of valid characters permitted in the recommended style of application IDs (instead of just saying "reverse DNS convention"). Specifically mention that '-' is permitted here. Specify how to deal with dashes when forming the D-Bus object path for the org.freedesktop.Application interface. https://bugs.freedesktop.org/show_bug.cgi?id=95129 --- desktop-entry/desktop-entry-spec.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/desktop-entry/desktop-entry-spec.xml b/desktop-entry/desktop-entry-spec.xml index f0abad5..4f1d076 100644 --- a/desktop-entry/desktop-entry-spec.xml +++ b/desktop-entry/desktop-entry-spec.xml @@ -53,7 +53,7 @@ - Ryan + Allison Lortie
@@ -98,7 +98,10 @@ For applications, the part of the name of the desktop file (before the .desktop) - should follow the "reverse DNS" convention, e.g. org.example.FooViewer.desktop. + should follow the "reverse DNS" convention, e.g. org.example.FooViewer.desktop. The + name should be a valid D-Bus well-known bus name. The valid characters (aside '.') are + [A-Z][a-z][0-9] along with dash ('-') and underscore + ('_'). Desktop entry files are encoded in UTF-8. A file is interpreted as a @@ -903,7 +906,8 @@ file name with the .desktop portion removed (for our example, org.example.FooViewer). The above interface must be implemented at an object path determined as follows: starting with the well-known D-Bus name of the application, change all dots to - slashes and prefix a slash. For our example, this is /org/example/FooViewer. + slashes and prefix a slash. If a dash ('-') is found, convert it to an underscore + ('_'). For our example, this is /org/example/FooViewer. The Activate method is called when the application is started without files to open. -- 2.8.0.rc3