This commit adds well-formed values for all keys defined in version 1.5
of the [Freedesktop.org Desktop Entry Specification][1], published on
2020-04-27, adding:
- the ability for KVIrc to be designated by all XDG-compliant Linux
Desktop Environments (GNOME, KDE et al.) as a (default) handler for
irc/irc6/ircs protocol URIs within all installed applications,
- support for the Startup Notification Protocol,
- a context menu entry in DE graphical application launchers for opening
a new session/instance/window of KVIrc when one or more are already in
use, and
- registration of KVIrc as the default handler for the 'text/kvc' and
'text/kvs' Media (MIME) Type definitions already installed by the
several circulating vendor packages for Linux
This effectively upstreams the [patch implemented by Kubuntu][2] on
2009-03-08 and later merged by Debian on 2011-05-07 into the official
Debian kvirc packaging repository to add keywords to the launcher entry
which help users to find the entry when searching for all IRC/Chat apps
installed on their system.
The desktop entry file itself is renamed to
`cmake/net.kvirc.KVIrc.desktop.cmake` in the source repository to comply
with above-referenced DES v1.5, which requires that such files use a
valid "D-Bus well-known name" as their basename (which is also the
"desktop file ID" used many other XDG-compliant interfaces), derived, as
suggested, by appending the mixed-case application name to the reverse
DNS entry of the official homepage. The CMake build configuration is
altered to further append the major version number to the mixed-case
application name prior to installation, as advised by the specification.
Signed-off-by: Peter J. Mello <redacted>
1: https://specifications.freedesktop.org/desktop-entry-spec/latest/
2: https://salsa.debian.org/qt-kde-team/extras/kvirc/-/blob/
93f8469f20a7a36a9956f3dc0e3d1c87178486a8/debian/patches/kubuntu_01_fix_desktop_entry.patch
+++ /dev/null
-[Desktop Entry]
-Name=KVIrc
-GenericName=IRC Client
-GenericName[de]=IRC Client
-GenericName[pl]=Klient IRC
-GenericName[pt]=Cliente IRC
-GenericName[tr]=IRC İstemcisi
-GenericName[es]=Cliente de IRC
-Comment=Connect to Internet Relay Chat
-Comment[de]=Internet Relay Chat betreten.
-Comment[pl]=Połącz się z Internet Relay Chat (IRC)
-Comment[pt]=Conectar ao IRC (Internet Relay Chat)
-Comment[tr]=IRC'e bağlanın
-Comment[es]=Conectar al chat IRC
-Exec=${KVIRC_BINARYNAME} -m %u
-Icon=kvirc
-Type=Application
-MimeType=application/x-kva;application/x-kvt;
-Categories=Qt;Network;IRCClient;
--- /dev/null
+[Desktop Entry]
+Type=Application
+Version=1.5
+Name=KVIrc
+GenericName=IRC Client
+GenericName[de]=IRC Client
+GenericName[pl]=Klient IRC
+GenericName[pt]=Cliente IRC
+GenericName[tr]=IRC İstemcisi
+GenericName[es]=Cliente de IRC
+Comment=Connect to Internet Relay Chat
+Comment[de]=Internet Relay Chat betreten.
+Comment[pl]=Połącz się z Internet Relay Chat (IRC)
+Comment[pt]=Conectar ao IRC (Internet Relay Chat)
+Comment[tr]=IRC'e bağlanın
+Comment[es]=Conectar al chat IRC
+Path=${CMAKE_KVIRC_RESOURCES_DIR}
+TryExec=${KVIRC_BIN_PATH}/${KVIRC_BINARYNAME}
+Exec=${KVIRC_BINARYNAME} -m %U
+Icon=kvirc
+Categories=Network;IRCClient;Qt;KDE;
+Keywords=IM;Chat;DCC;
+MimeType=application/x-kva;application/x-kvt;text/x-kvc;text/x-kvs;x-scheme-handler/irc;x-scheme-handler/irc6;x-scheme-handler/ircs;
+StartupNotify=true
+StartupWMClass=KVIrc
+DBusActivatable=false
+Terminal=false
+PrefersNonDefaultGPU=false
+NoDisplay=false
+Hidden=false
+Actions=NewSession;
+
+[Desktop Action NewSession]
+Name=Start New Session
+Icon=stock_new-window
+Exec=${KVIRC_BINARYNAME} -f %U
# CMakeLists for data/applnk
-configure_file(${CMAKE_SOURCE_DIR}/cmake/kvirc4.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/${KVIRC_BINARYNAME}.desktop)
+configure_file(
+ ${CMAKE_SOURCE_DIR}/cmake/net.kvirc.KVIrc.desktop.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/net.kvirc.KVIrc${CMAKE_KVIRC_VERSION_MAJOR}.desktop
+)
if(UNIX)
if(APPLE)
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/${KVIRC_BINARYNAME}.desktop
+ install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/net.kvirc.KVIrc${CMAKE_KVIRC_VERSION_MAJOR}.desktop
DESTINATION
- ${CMAKE_INSTALL_PREFIX}/Contents/Resources/applnk/
+ ${CMAKE_INSTALL_PREFIX}/Contents/Resources/applnk/
)
else()
# Assume linux
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/${KVIRC_BINARYNAME}.desktop
+ install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/net.kvirc.KVIrc${CMAKE_KVIRC_VERSION_MAJOR}.desktop
DESTINATION
- ${CMAKE_INSTALL_PREFIX}/share/applications/
+ ${CMAKE_INSTALL_PREFIX}/share/applications/
)
endif()
endif()
usr/bin/kvirc
-usr/share/applications/kvirc.desktop
+usr/share/applications/net.kvirc.KVIrc5.desktop
usr/share/man/*/man1/kvirc.1
-usr/share/man/man1/kvirc.1
\ No newline at end of file
+usr/share/man/man1/kvirc.1
+++ /dev/null
-Description: Corrected the place to show up for the desktop entry.
- Add KDE category. KVIrc is not proposed upstream to be a KDE application
- but rather a Qt one. In Debian we build it with KDE dependencies and hence
- we tag application as KDE in for the menu entry.
- .
- This patch can be studied to be forwarded upstream.
-Author: Roderick B. Greening <roderick.greening@gmail.com>
-Last-Update: 2011-05-07
-Origin: vendor, http://git.debian.org/?p=pkg-kde/kde-extras/kvirc.git;a=blob_plain;f=debian/patches/10_fix_desktop_entry.patch;hb=HEAD
-Forwarded: no
----
- cmake/kvirc4.desktop.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/cmake/kvirc4.desktop.cmake
-+++ b/cmake/kvirc4.desktop.cmake
-@@ -16,4 +17,5 @@ Exec=${KVIRC_BINARYNAME} -m %u
- Icon=kvirc
- Type=Application
- MimeType=application/x-kva;application/x-kvt;
--Categories=Qt;Network;IRCClient;
-+Categories=Qt;KDE;Network;IRCClient;
-+Keywords=IM;Chat;
-10_fix_desktop_entry.patch
enable-optimisation-with-debug.patch
fix-rfc-links.patch