]> jfr.im git - irc/kvirc/KVIrc.git/commitdiff
Update Desktop Entry file
authorPeter J. Mello <redacted>
Fri, 28 May 2021 05:14:45 +0000 (22:14 -0700)
committerAlexey Sokolov <redacted>
Sat, 29 May 2021 07:32:32 +0000 (08:32 +0100)
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

cmake/kvirc4.desktop.cmake [deleted file]
cmake/net.kvirc.KVIrc.desktop.cmake [new file with mode: 0644]
data/applnk/CMakeLists.txt
dist/debian/kvirc.install
dist/debian/patches/10_fix_desktop_entry.patch [deleted file]
dist/debian/patches/series

diff --git a/cmake/kvirc4.desktop.cmake b/cmake/kvirc4.desktop.cmake
deleted file mode 100644 (file)
index 4b25e59..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-[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;
diff --git a/cmake/net.kvirc.KVIrc.desktop.cmake b/cmake/net.kvirc.KVIrc.desktop.cmake
new file mode 100644 (file)
index 0000000..67ee506
--- /dev/null
@@ -0,0 +1,36 @@
+[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
index a736704f2a55ed6e048d5853d34e6f8cb21e6557..0f284578caddf1f7041eef372cdaac269d1c6542 100644 (file)
@@ -1,20 +1,25 @@
 # 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()
index 0d8e98124dbd287b2618930cc97a98816a7d10a4..59a0e9b0cf878f65403f954f49645b5e8d093cf9 100644 (file)
@@ -1,4 +1,4 @@
 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
diff --git a/dist/debian/patches/10_fix_desktop_entry.patch b/dist/debian/patches/10_fix_desktop_entry.patch
deleted file mode 100644 (file)
index 6130649..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-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;
index 9fbfd7231e5066301e868e52632e58b62918a62c..08f96aea18f45838fd5d62e3940a37665113e781 100644 (file)
@@ -1,3 +1,2 @@
-10_fix_desktop_entry.patch
 enable-optimisation-with-debug.patch
 fix-rfc-links.patch