banshee r4877 - in trunk/banshee/data: . desktop-files
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4877 - in trunk/banshee/data: . desktop-files
- Date: Wed, 7 Jan 2009 03:42:40 +0000 (UTC)
Author: abock
Date: Wed Jan 7 03:42:40 2009
New Revision: 4877
URL: http://svn.gnome.org/viewvc/banshee?rev=4877&view=rev
Log:
New .desktop file infrastructure, since we're going to have a lot of them
Added:
trunk/banshee/data/desktop-files/
trunk/banshee/data/desktop-files/Makefile.am
trunk/banshee/data/desktop-files/banshee-1.desktop.in.in
trunk/banshee/data/desktop-files/banshee-1.desktop.mime (props changed)
- copied unchanged from r4876, /trunk/banshee/data/mimetypes.txt
trunk/banshee/data/desktop-files/common.desktop
trunk/banshee/data/desktop-files/update-desktop-file.sh (contents, props changed)
Removed:
trunk/banshee/data/banshee-1.desktop.in.in
trunk/banshee/data/mimetypes.txt
trunk/banshee/data/update-desktop-file.sh
Modified:
trunk/banshee/data/Makefile.am
Modified: trunk/banshee/data/Makefile.am
==============================================================================
--- trunk/banshee/data/Makefile.am (original)
+++ trunk/banshee/data/Makefile.am Wed Jan 7 03:42:40 2009
@@ -1,16 +1,8 @@
SUBDIRS = \
audio-profiles \
+ desktop-files \
icon-theme-hicolor
-desktopdir = $(datadir)/applications
-desktop_in_files=banshee-1.desktop.in.in
-desktop_DATA=$(desktop_in_files:.desktop.in.in=.desktop)
-
-%.desktop.in: %.desktop.in.in
- sed -e "s/\ VERSION\@/$(VERSION)/" < $< > $@
-
- INTLTOOL_DESKTOP_RULE@
-
dbusservice_in_files = \
org.bansheeproject.Banshee.service.in \
org.bansheeproject.CollectionIndexer.service.in
@@ -18,12 +10,10 @@
dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
EXTRA_DIST = \
- $(desktop_in_files) \
$(dbusservice_in_files)
DISTCLEANFILES = \
- $(dbusservice_DATA) \
- $(desktop_DATA)
+ $(dbusservice_DATA)
MAINTAINERCLEANFILES = \
Makefile.in
Added: trunk/banshee/data/desktop-files/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/banshee/data/desktop-files/Makefile.am Wed Jan 7 03:42:40 2009
@@ -0,0 +1,23 @@
+desktopdir = $(datadir)/applications
+desktop_in_files = $(wildcard *.desktop.in.in)
+desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
+
+DESKTOP_FRAMEWORK_DEPS = common.desktop update-desktop-file.sh
+DESKTOP_MIME_DEPS = $(desktop_in_files:.in.in=.mime)
+
+%.desktop.in: %.desktop.in.in $(DESKTOP_FRAMEWORK_DEPS) $(DESKTOP_MIME_DEPS)
+ ./update-desktop-file.sh "$<" "$(VERSION)" > "$@"
+
+ INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+ $(desktop_in_files) \
+ $(DESKTOP_MIME_DEPS) \
+ $(DESKTOP_FRAMEWORK_DEPS)
+
+CLEANFILES = \
+ $(desktop_DATA)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in
+
Added: trunk/banshee/data/desktop-files/banshee-1.desktop.in.in
==============================================================================
--- (empty file)
+++ trunk/banshee/data/desktop-files/banshee-1.desktop.in.in Wed Jan 7 03:42:40 2009
@@ -0,0 +1 @@
+Exec=banshee-1 --redirect-log --play-enqueued %U
Added: trunk/banshee/data/desktop-files/common.desktop
==============================================================================
--- (empty file)
+++ trunk/banshee/data/desktop-files/common.desktop Wed Jan 7 03:42:40 2009
@@ -0,0 +1,13 @@
+Version=1.0
+_Name=Banshee Media Player
+_GenericName=Media Player
+_Comment=Play and organize your media collection
+Icon=media-player-banshee
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=GNOME;Audio;Music;Player;AudioVideo;X-Ximian-Main;X-Novell-Main;X-Red-Hat-Base;
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=banshee
+X-GNOME-Bugzilla-Component=General
+X-GNOME-Bugzilla-Version= VERSION@
Added: trunk/banshee/data/desktop-files/update-desktop-file.sh
==============================================================================
--- (empty file)
+++ trunk/banshee/data/desktop-files/update-desktop-file.sh Wed Jan 7 03:42:40 2009
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+DESKTOP_SOURCE="$1"
+VERSION="$2"
+MIMETYPES_FILE="$(basename "$DESKTOP_SOURCE" .in.in).mime"
+
+echo "[Desktop Entry]"
+
+(cat "$DESKTOP_SOURCE" && cat common.desktop) |
+ sed "s/\ VERSION\@/${VERSION}/g"
+
+if [[ -f "$MIMETYPES_FILE" ]]; then
+ MIMETYPES=$(
+ grep -vE '^[[:space:]]*(#.*|)$' "$MIMETYPES_FILE" | \
+ sort | uniq | \
+ awk '{printf $1 ";"}' | sed 's,;$,,'
+ )
+
+ echo "MimeType=$MIMETYPES"
+fi
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]