LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-02-2016, 09:57 AM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,116

Rep: Reputation: Disabled
Proposed enhancement for gvim.desktop (package xap/vim-gvim).


gvim.deskop does not fully comply to the current xdg desktop-entry and menu specifications:
Code:
desktop-file-validate /usr/share/applications/gvim.desktop
/usr/share/applications/gvim.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated
/usr/share/applications/gvim.desktop: error: (will be fatal in the future): value "gvim.png" for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path
/usr/share/applications/gvim.desktop: hint: value item "TextEditor" in key "Categories" in group "Desktop Entry" can be extended with another category among the following categories: Utility
/usr/share/applications/gvim.desktop: hint: value "TextEditor;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
The main concern is that the .desktop includes:
Code:
Categories=TextEditor;
but TextEditor is not among the main categories listed in the xdg menu specification that every conforming desktop environment MUST support, and there is no main category listed alongside this one.

As a result, in the menu of XFCE gvim is shown under "other", which is the catch-all section in this menu (in the KDE menu instead gvim appears under Utility alongside the "light" text editors).

With the patch below the gvim entry menu is displayed alongside emacs under "Development" in all xdg compliant desktop menus, which seems me to be logical. Alternatively it could be displayed under Utility (or its synonym Accessories) if in the last line "Development" is replaced by "Utility" as suggested by the specification.
Code:
--- gvim.desktop    2016-10-02 15:57:21.002130635 +0200
+++ gvim.desktop.new    2016-10-02 15:59:05.692136310 +0200
@@ -1,5 +1,4 @@
 [Desktop Entry]
-Encoding=UTF-8
 Name=Vi IMproved
 Name[af]=Vi Verbeterde
 Name[ar]=في.أي المحسن
@@ -112,9 +111,9 @@
 GenericName[zu]=Umlungisi wombhalo
 MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
 Exec=gvim -f %f
-Icon=gvim.png
+Icon=gvim
 Type=Application
 Terminal=false
 X-KDE-StartupNotify=true
 X-KDE-AuthorizeAction=shell_access
-Categories=TextEditor;
+Categories=Development;TextEditor;
PS in case someone wonder: the line "Encoding=UTF-8" is deprecated because this encoding is mandatory for desktop files anyway (using any legacy encoding would obviously prevent a full localization).
 
Old 10-02-2016, 10:03 AM   #2
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Honestly I'd suggest you bring this up with the gvim upstream instead.
 
Old 10-02-2016, 11:25 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,116

Original Poster
Rep: Reputation: Disabled
Well, your remark leaded me to have a better look in the source files. I see that the file gvim.desktop that is installed date back 2007-02-16 (and this could explain why it's not compliant to a more recent specification), but the source tarball ships a more compliant one in the /runtime directory. Maybe the simplest thing to do would be to just install this one in /usr/share/applications and discard the old one.

Incidentally there is also a file named vim.desktop in the same directory, of course with "Terminal=true" instead of "Terminal=false".
 
1 members found this post helpful.
Old 10-02-2016, 11:48 AM   #4
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Yea, if there is an existing one that is more complaint in the source tree then using that instead sounds best.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gvim colorscheme in vim RudraB Linux - General 4 01-08-2013 09:37 AM
gvim or vim? Abomb Programming 28 12-14-2006 11:27 PM
prompt within gvim/vim/vi zchoyt Linux - Software 6 02-02-2005 06:30 AM
vim or gvim raees Linux - General 7 03-17-2004 05:02 PM
vim / gvim Shak Linux - Software 4 04-03-2003 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration