Hi,

When building an application, a .desktop file is generated with data gathered from the .plist file when possible and from static strings when not. One os the fields, Categories, is set to X-GNUstep. As this isn't a valid freedesktop category, every package has to ship its own .desktop file for the application to appear in the right menu.

To fix this, I would like to propose adding a new and optional FreeDesktopCategories array in the applications .plist files, together with the following patch :

Index: Tools/pl2link.m
===================================================================
--- Tools/pl2link.m     (révision 34938)
+++ Tools/pl2link.m     (copie de travail)
@@ -102,8 +102,18 @@
   fileContents = [NSMutableString stringWithCapacity: 200];
   [fileContents appendString:
     @"[Desktop Entry]\nEncoding=UTF-8\nType=Application\n"];
-  [fileContents appendString:
-    @"Categories=X-GNUstep;\n"];
+  list = [plist objectForKey: @"FreeDesktopCategories"];
+ if (list != nil && [list isKindOfClass: [NSArray class]] && [list count] > 0)
+    {
+      [fileContents appendString: @"Categories="];
+      [fileContents appendString: [list componentsJoinedByString: @";"]];
+      [fileContents appendString: @";\n"];
+    }
+  else
+    {
+      [fileContents appendString:
+       @"Categories=X-GNUstep;\n"];
+    }
   entry = [plist objectForKey: @"ApplicationName"];
   if (entry != nil)
     {

Comments ?

Thanks,
Philippe

_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to