diff --git a/suse_update_desktop_file.sh b/suse_update_desktop_file.sh index f69b96f..228f161 100644 --- a/suse_update_desktop_file.sh +++ b/suse_update_desktop_file.sh @@ -45,7 +45,7 @@ function usage() { echo " Example: use \"%suse_update_desktop_file \\" echo " %{buildroot}%{_datadir}/susehelp/meta/%name/%name.desktop\"" echo " to edit the susehelp desktop entry file instead." - echo " -u|--unimportant : add \"X-SuSE-Unimportant=true\" to the resulting desktop" + echo " -u|--unimportant : add \"NoDisplay=true\" to the resulting desktop" echo " file." echo " -n|--no-i18n : Do not prepare the desktop file for translators (obsoletes -t)." echo " (adds X-SuSE-translate=false to the desktop file)" @@ -314,8 +314,13 @@ else fi fi if [ "$UNIMPORTANT" = "yes" ]; then - sed -e '/^\[Desktop Entry\]/a \ -X-SuSE-Unimportant=true' $FILE > ${FILE}_ && mv ${FILE}_ $FILE + if grep -q ^NoDisplay= $FILE; then + sed -e '/^\[Desktop Entry\]/,/(\[.*|$)/ s,^NoDisplay=.*,NoDisplay=true,' "$FILE" > "${FILE}.new" && + mv "${FILE}.new" "${FILE}" + else + sed -e '/^\[Desktop Entry\]/a \ +NoDisplay=true' $FILE > ${FILE}_ && mv ${FILE}_ $FILE + fi fi if [ "$DOCID" ]; then sed -e '/^\[Desktop Entry\]/a \ diff --git a/update-desktop-files.changes b/update-desktop-files.changes index e7718e7..152ae8d 100644 --- a/update-desktop-files.changes +++ b/update-desktop-files.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 29 14:58:16 UTC 2011 - vuntz@opensuse.org + +- Update suse_update_desktop_file.sh: when -u is used, do not add + the non-standard X-SuSE-Unimportant=true anymore, but + NoDisplay=true. + ------------------------------------------------------------------- Mon Jun 6 14:13:56 UTC 2011 - coolo@novell.com