gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pl2link : output valid categories and ease packaging


From: Philippe Roussel
Subject: Re: pl2link : output valid categories and ease packaging
Date: Sat, 14 Apr 2012 22:53:06 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Le 19/03/2012 11:27, Fred Kiefer a écrit :
> On 18.03.2012 23:24, Philippe Roussel wrote:
>> 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 ?
> 
> Fine by me.

Could you please commit it ?

Thanks,
Philippe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]