diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index d97eea2b0..7603c9e86 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -22,7 +22,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi.in # windows/windres.rc is done by src/CMakeLists.txt - +set(APP_ID "org.clementine_player.Clementine") if(EXISTS /etc/lsb-release) file(READ "/etc/lsb-release" LSB_RELEASE_CONTENTS) string(REGEX MATCH "DISTRIB_ID=Ubuntu" IS_UBUNTU ${LSB_RELEASE_CONTENTS}) @@ -40,20 +40,20 @@ option(INSTALL_UBUNTU_ICONS "Install the Ubuntu themed monochrome panel icons" $ if (NOT APPLE) install(FILES clementine_64.png DESTINATION share/icons/hicolor/64x64/apps/ - RENAME clementine.png + RENAME ${APP_ID}.png ) install(FILES clementine_128.png DESTINATION share/icons/hicolor/128x128/apps/ - RENAME clementine.png + RENAME ${APP_ID}.png ) install(FILES ../data/icon.svg DESTINATION share/icons/hicolor/scalable/apps/ - RENAME clementine.svg + RENAME ${APP_ID}.svg ) - install(FILES clementine.desktop + install(FILES ${APP_ID}.desktop DESTINATION share/applications ) @@ -64,7 +64,7 @@ if (NOT APPLE) DESTINATION share/kservices5 ) - install(FILES clementine.appdata.xml + install(FILES ${APP_ID}.appdata.xml DESTINATION share/metainfo ) diff --git a/dist/clementine.spec.in b/dist/clementine.spec.in index 7ca58f4df..5d1082b13 100644 --- a/dist/clementine.spec.in +++ b/dist/clementine.spec.in @@ -112,16 +112,16 @@ rm -f $RPM_BUILD_ROOT/usr/share/icons/ubuntu-mono-{dark,light}/apps/24/clementin %{_bindir}/clementine %{_bindir}/clementine-tagreader %dir %{_datadir}/metainfo/ -%{_datadir}/metainfo/clementine.appdata.xml -%{_datadir}/applications/clementine.desktop +%{_datadir}/metainfo/org.clementine_player.Clementine.appdata.xml +%{_datadir}/applications/org.clementine_player.Clementine.desktop %{_datadir}/clementine/projectm-presets %{_datadir}/kservices5/clementine-itms.protocol %{_datadir}/kservices5/clementine-itpc.protocol %{_datadir}/kservices5/clementine-feed.protocol %{_datadir}/kservices5/clementine-zune.protocol -%{_datadir}/icons/hicolor/64x64/apps/clementine.png -%{_datadir}/icons/hicolor/128x128/apps/clementine.png -%{_datadir}/icons/hicolor/scalable/apps/clementine.svg +%{_datadir}/icons/hicolor/64x64/apps/org.clementine_player.Clementine.png +%{_datadir}/icons/hicolor/128x128/apps/org.clementine_player.Clementine.png +%{_datadir}/icons/hicolor/scalable/apps/org.clementine_player.Clementine.svg %changelog * @RPM_DATE@ David Sansome - @CLEMENTINE_VERSION_RPM_V@ diff --git a/dist/clementine.appdata.xml b/dist/org.clementine_player.Clementine.appdata.xml similarity index 97% rename from dist/clementine.appdata.xml rename to dist/org.clementine_player.Clementine.appdata.xml index 93ee8f088..4702b1090 100644 --- a/dist/clementine.appdata.xml +++ b/dist/org.clementine_player.Clementine.appdata.xml @@ -2,7 +2,7 @@ org.clementine_player.Clementine - clementine.desktop + org.clementine_player.Clementine.desktop CC0-1.0 GPL-3.0+ Clementine Music Player diff --git a/dist/clementine.desktop b/dist/org.clementine_player.Clementine.desktop similarity index 99% rename from dist/clementine.desktop rename to dist/org.clementine_player.Clementine.desktop index 316b5f440..3be057545 100644 --- a/dist/clementine.desktop +++ b/dist/org.clementine_player.Clementine.desktop @@ -33,7 +33,7 @@ Comment[sr@ijekavianlatin]=Reprodukuje muziku i last.fm tokove Comment[sr@latin]=Reprodukuje muziku i last.fm tokove Exec=clementine %U TryExec=clementine -Icon=clementine +Icon=org.clementine_player.Clementine Terminal=false Categories=AudioVideo;Player;Qt;Audio; StartupNotify=false diff --git a/dist/update_desktop_languages.py b/dist/update_desktop_languages.py index a4209635d..9de4a6e16 100644 --- a/dist/update_desktop_languages.py +++ b/dist/update_desktop_languages.py @@ -7,7 +7,7 @@ import polib import re PO_GLOB = 'src/translations/*.po' -DESKTOP_PATH = 'dist/clementine.desktop' +DESKTOP_PATH = 'dist/org.clementine_player.Clementine.desktop' class ConfigParser(object): """ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6238d33bd..73e2042a1 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -72,8 +72,8 @@ parts: cmake ../src -DCMAKE_INSTALL_PREFIX=/usr make -j $(getconf _NPROCESSORS_ONLN) make DESTDIR=$SNAPCRAFT_PART_INSTALL install - sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop - sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop + sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.clementine_player.Clementine.desktop + sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.clementine_player.Clementine.desktop build-packages: - cmake @@ -170,7 +170,7 @@ parts: apps: clementine: command: desktop-launch $SNAP/usr/bin/clementine - desktop: usr/share/applications/clementine.desktop + desktop: usr/share/applications/org.clementine_player.Clementine.desktop environment: ALSA_CONFIG_PATH: /snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/alsa/alsa.conf LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio diff --git a/src/main.cpp b/src/main.cpp index f5c34584d..5f955b9eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -396,7 +396,7 @@ int main(int argc, char* argv[]) { // Set the name of the app desktop file as per the freedesktop specifications // This is needed on Wayland for the main window to show the correct icon #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) - QGuiApplication::setDesktopFileName("clementine"); + QGuiApplication::setDesktopFileName("org.clementine_player.Clementine"); #endif // Resources diff --git a/src/widgets/osd_x11.cpp b/src/widgets/osd_x11.cpp index 4d3ff22fa..8dd1e9bf8 100644 --- a/src/widgets/osd_x11.cpp +++ b/src/widgets/osd_x11.cpp @@ -114,7 +114,7 @@ void OSD::ShowMessageNative(const QString& summary, const QString& message, hints["image_data"] = QVariant(image); } - hints["desktop-entry"] = QVariant("clementine"); + hints["desktop-entry"] = QVariant("org.clementine_player.Clementine"); hints["transient"] = QVariant(true); int id = 0;