← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Cleanup and fixes in the Linux desktop integration files

 

Hi, would any of the Linux packagers/users like to give these patches a test?

On Thu, May 19, 2016 at 1:09 PM, José Ignacio <jose.cyborg@xxxxxxxxx> wrote:
> As for the motivation behind this annoying to apply patch, it's quite
> simple: desktop integration with linux as it is right now is fairly
> broken, some mime types are set incorrectly and the icons are not
> installed correctly (in a way that the desktop can use them). There
> might be some downstream patches done by packagers to patch it up, but
> this should make it unnecessary.
>
> On Thu, May 19, 2016 at 12:59 PM, José Ignacio <jose.cyborg@xxxxxxxxx> wrote:
>> Patch 1: Fix resources/linux/mime/mime/packages/kicad.xml by changing
>> the extension to .kicad_pcb (was set to .brd which is the old one),
>> the mimetype name itself is corrected to "application/x-kicad-pcb" to
>> agree with the .application files. It also renames the package to
>> kicad-kicad.xml to conform to the XDG convention that calls for a
>> vendor-product.xml format [1]
>>
>> Patch 2: Remove the resources/linux/mime/mimelnk folder. mimelnk
>> hasn't been used since KDE 3, If someone is still using bleeding edge
>> KiCad and KDE3 together they are used to patching things, so
>> maintaining those files themselves shouldn't be too much to ask.
>>
>> Patch 3: Clean up the applications/*.destop files. Put all keys in
>> consistent order and remove/fix bogus mime types, some assigned to
>> programs that don't even open files. Those files could use some TLC
>> from translators and people better at words than me to improve the
>> wording and provide translated names and tooltips, i preserved some of
>> the french that was already in the files.
>>
>> Patch 4: Fix hicolor icons. This renames (well, actually regenerates
>> from the originals) all the icons installed on Linux to match the
>> correct mime type names, and adds all the missing icons in some sizes.
>> This is not a diff because it's mostly binaries, I prepared a tarball
>> with the new contents of the resources/linux/mime/icons folder, to
>> apply just delete that directory and unzip patch-4.tar.gz in it's
>> place.
>>
>> To generate the new icons directory I put together a very hackish
>> python script called mk_icons.py which must be called from
>> resources/linux/mime. the script reads the .application files and the
>> kicad-kicad.xml mime package file, reconciles mime types and
>> application icons and generates the right icons for the applications
>> and mimetypes from the originals in bitmaps_png/sources. It also warns
>> if the xml and .application files go out of sync.
>>
>> I tested these changes on Debian Testing with Gnome3 and they work
>> perfectly, I can open kicad files from nautilus directly after doing a
>> make install and update-mime. If someone could give this a try on
>> other Linux distros it'd be great. Worst case i don't think it'd work
>> worse than before.
>>
>> Thanks!
>> José


References