From 86855e03cbc3aa5cd9b9a9ad13a7d027c992b228 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 12 May 2017 23:25:22 +0300 Subject: [PATCH] update metadata desktop file to new guidelines --update the desktop file naming in order to comply with new guidelines. Concerning also wayland. The new desktop file is named to org.kde.latte-dock.desktop --- app/CMakeLists.txt | 4 ++-- ...cmake => org.kde.latte-dock.desktop.cmake} | 0 install.sh | 11 ++++++++++ po/Messages.sh | 2 +- ...te => org.kde.latte-dock.desktop.template} | 22 +++++++++++++------ po/update-metadata.sh | 4 ++-- 6 files changed, 31 insertions(+), 12 deletions(-) rename app/{latte-dock.desktop.cmake => org.kde.latte-dock.desktop.cmake} (100%) rename po/desktop-templates/{latte-dock.desktop.template => org.kde.latte-dock.desktop.template} (65%) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 1be830a64..87d4569ab 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -51,9 +51,9 @@ if(HAVE_X11) ) endif() -configure_file(latte-dock.desktop.cmake latte-dock.desktop) +configure_file(org.kde.latte-dock.desktop.cmake org.kde.latte-dock.desktop) install(TARGETS latte-dock ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/latte-dock.desktop DESTINATION ${KDE_INSTALL_APPDIR}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.latte-dock.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES dbus/org.kde.LatteDock.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR}) install(FILES lattedock.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR}) diff --git a/app/latte-dock.desktop.cmake b/app/org.kde.latte-dock.desktop.cmake similarity index 100% rename from app/latte-dock.desktop.cmake rename to app/org.kde.latte-dock.desktop.cmake diff --git a/install.sh b/install.sh index 41f9ad7b3..0f6bce008 100755 --- a/install.sh +++ b/install.sh @@ -15,3 +15,14 @@ cd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$build_type .. make sudo make install + +oldDeskFile="/usr/share/applications/latte-dock.desktop" + +# TODO: remove this lines before 0.7 release, it is provided only for +# the users that use the master branch and built it themselves. It +# will help them to not have to different desktop files for Latte +if [ -f $oldDeskFile ] ; then + sudo rm $oldDeskFile + echo "Removed old desktop file..." +fi + diff --git a/po/Messages.sh b/po/Messages.sh index 52f778150..eb99b276a 100755 --- a/po/Messages.sh +++ b/po/Messages.sh @@ -15,7 +15,7 @@ PROJECTSHELL="plasma_shell_org.kde.latte.shell" # project name TEMPLATESHELL="shell.metadata.desktop.template" # shell desktop template PROJECTAPP="latte-dock" # project name -TEMPLATEAPP="latte-dock.desktop.template" # app desktop template +TEMPLATEAPP="org.kde.latte-dock.desktop.template" # app desktop template NOTIFYRC="lattedock.notifyrc.template" # notifyrc template diff --git a/po/desktop-templates/latte-dock.desktop.template b/po/desktop-templates/org.kde.latte-dock.desktop.template similarity index 65% rename from po/desktop-templates/latte-dock.desktop.template rename to po/desktop-templates/org.kde.latte-dock.desktop.template index 6e57133a3..706b316ff 100644 --- a/po/desktop-templates/latte-dock.desktop.template +++ b/po/desktop-templates/org.kde.latte-dock.desktop.template @@ -1,18 +1,26 @@ [Desktop Entry] -Name=Latte -Comment=Dock for the masses -GenericName=Dock - -Version=@VERSION@ Categories=Utility;X-SuSE-DesktopUtility; +Comment[el_GR]=Dock for the masses +Comment=Dock for the masses Exec=latte-dock %u +GenericName[el_GR]=Dock +GenericName=Dock Icon=latte-dock InitialPreference=1 +MimeType= +Name[el_GR]=Latte +Name=Latte +Path= +StartupNotify=false Terminal=false +TerminalOptions= Type=Application +Version=@VERSION@ +X-DBUS-ServiceName=org.kde.lattedock +X-DBUS-StartupType=unique X-KDE-PluginInfo-Author=@AUTHOR@ X-KDE-PluginInfo-Email=@EMAIL@ X-KDE-PluginInfo-Website=@WEBSITE@ X-KDE-StartupNotify=false -X-DBUS-StartupType=Unique -X-DBUS-ServiceName=org.kde.lattedock +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/po/update-metadata.sh b/po/update-metadata.sh index c07d8ca94..cebf4655d 100755 --- a/po/update-metadata.sh +++ b/po/update-metadata.sh @@ -8,7 +8,7 @@ cd "$BASEDIR/.." PROJECTCONTAINMENT="$(pwd)/containment/metadata.desktop.cmake" # containment path PROJECTPLASMOID="$(pwd)/plasmoid/metadata.desktop.cmake" # plasmoid path PROJECTSHELL="$(pwd)/shell/metadata.desktop.cmake" # shell path -PROJECTAPP="$(pwd)/app/latte-dock.desktop.cmake" # app path +PROJECTAPP="$(pwd)/app/org.kde.latte-dock.desktop.cmake" # app path NOTIFYRC="$(pwd)/app/lattedock.notifyrc" # global notify config function generate_desktop_file @@ -32,6 +32,6 @@ generate_desktop_file plasmoid plasmoid.metadata.desktop.template "$PROJECTPLASM generate_desktop_file shell shell.metadata.desktop.template "$PROJECTSHELL" -generate_desktop_file app latte-dock.desktop.template "$PROJECTAPP" +generate_desktop_file app org.kde.latte-dock.desktop.template "$PROJECTAPP" generate_desktop_file app lattedock.notifyrc.template "$NOTIFYRC"