[gnome-music/wip/merge: 38/343] Update build system
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 38/343] Update build system
- Date: Thu, 25 Jul 2013 11:16:42 +0000 (UTC)
commit 9e91ab215f2969e0f35c929b7f687da6bcb6e6f7
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Sat Jul 13 16:20:38 2013 +0200
Update build system
Makefile.am | 45 +++++++++++++++++++++++++++++++++++++++++
configure.ac | 1 +
gnome-music/__init__.py | 6 +++++
gnome-music/albumArtCache.py | 3 ++
gnome-music/application.py | 5 ----
gnome-music/player.py | 46 ++++++++++++++++++++++++++++++++++++++++-
gnome-music/toolbar.py | 9 +++++++-
gnome-music/view.py | 4 +-
8 files changed, 109 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e69de29..96c2cf4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -0,0 +1,45 @@
+ACLOCAL_AMFLAGS = -I m4 -I libgd
+NULL =
+
+SUBDIRS = libgd gnome-music data
+
+EXTRA_DIST = \
+ AUTHORS.in \
+ $(NULL)
+
+CLEANFILES = \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/AUTHORS \
+ $(srcdir)/INSTALL \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/autoscan.log \
+ $(srcdir)/compile \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
+ $(srcdir)/config.sub \
+ $(srcdir)/configure.scan \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ $(NULL)
+
+GITIGNOREFILES = \
+ m4 \
+ $(NULL)
+
+dist-hook: gen-AUTHORS
+
+gen-AUTHORS:
+ $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
+ perl -p -e "s/#authorslist#// and print '$$out'" \
+ < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
+ mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
+ fi
+
+-include $(top_srcdir)/git.mk
+
diff --git a/configure.ac b/configure.ac
index 0931239..0fd365c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,5 +38,6 @@ AC_CONFIG_FILES([
data/Makefile
gnome-music/Makefile
po/Makefile.in
+ libgd/Makefile
])
AC_OUTPUT
diff --git a/gnome-music/__init__.py b/gnome-music/__init__.py
index e69de29..1d270af 100644
--- a/gnome-music/__init__.py
+++ b/gnome-music/__init__.py
@@ -0,0 +1,6 @@
+from application import Application
+import sys
+
+if __name__ == 'gnome-music':
+ app = Application()
+ sys.exit(app.run(sys.argv))
diff --git a/gnome-music/albumArtCache.py b/gnome-music/albumArtCache.py
new file mode 100644
index 0000000..5bdb212
--- /dev/null
+++ b/gnome-music/albumArtCache.py
@@ -0,0 +1,3 @@
+class AlbumArtCache:
+ def getDefault(self):
+ pass
diff --git a/gnome-music/application.py b/gnome-music/application.py
index 6317940..98984b2 100644
--- a/gnome-music/application.py
+++ b/gnome-music/application.py
@@ -1,4 +1,3 @@
-import sys
from gi.repository import Gtk, Gio, GLib
from window import Window
@@ -22,7 +21,3 @@ class Application(Gtk.Application):
def quit(self):
self.quit()
-
-if __name__ == '__main__':
- app = Application()
- sys.exit(app.run(sys.argv))
diff --git a/gnome-music/player.py b/gnome-music/player.py
index 15d11d2..21cfe84 100644
--- a/gnome-music/player.py
+++ b/gnome-music/player.py
@@ -1,9 +1,51 @@
-from gi.repository import Gtk, Gst, GLib, GstAudio, Gdk, Grl, Gio, MediaPlayer2PlayerIface, GstPbutils
+from gi.repository import GIRepository
+GIRepository.Repository.prepend_search_path('libgd')
+
+from gi.repository import Gtk, Gst, GLib, GstAudio, Gdk, Grl, Gio, GstPbutils
from random import randint
-import AlbumArtCache
+from albumArtCache import AlbumArtCache
ART_SIZE = 34
+MediaPlayer2PlayerIface = """
+<interface name="org.mpris.MediaPlayer2.Player">
+ <method name="Next"/>
+ <method name="Previous"/>
+ <method name="Pause"/>
+ <method name="PlayPause"/>
+ <method name="Stop"/>
+ <method name="Play"/>
+ <method name="Seek">
+ <arg direction="in" name="Offset" type="x"/>
+ </method>
+ <method name="SetPosition">
+ <arg direction="in" name="TrackId" type="o"/>
+ <arg direction="in" name="Position" type="x"/>
+ </method>
+ <method name="OpenUri">
+ <arg direction="in" name="Uri" type="s"/>
+ </method>
+ <signal name="Seeked">
+ <arg name="Position" type="x"/>
+ </signal>
+ <property name="PlaybackStatus" type="s" access="read"/>
+ <property name="LoopStatus" type="s" access="readwrite"/>
+ <property name="Rate" type="d" access="readwrite"/>
+ <property name="Shuffle" type="b" access="readwrite"/>
+ <property name="Metadata" type="a{sv}" access="read"/>
+ <property name="Volume" type="d" access="readwrite"/>
+ <property name="Position" type="x" access="read"/>
+ <property name="MinimumRate" type="d" access="read"/>
+ <property name="MaximumRate" type="d" access="read"/>
+ <property name="CanGoNext" type="b" access="read"/>
+ <property name="CanGoPrevious" type="b" access="read"/>
+ <property name="CanPlay" type="b" access="read"/>
+ <property name="CanPause" type="b" access="read"/>
+ <property name="CanSeek" type="b" access="read"/>
+ <property name="CanControl" type="b" access="read"/>
+</interface>
+"""
+
class RepeatType:
NONE = 0
diff --git a/gnome-music/toolbar.py b/gnome-music/toolbar.py
index f0976e1..e7ba90c 100644
--- a/gnome-music/toolbar.py
+++ b/gnome-music/toolbar.py
@@ -1,5 +1,12 @@
from gi.repository import Gtk
-import ToolbarState
+
+
+class ToolbarState:
+ SINGLE = 0
+ ALBUMS = 1
+ ARTISTS = 2
+ PLAYLISTS = 3
+ SONGS = 4
class Toolbar():
diff --git a/gnome-music/view.py b/gnome-music/view.py
index 60e3efd..618ba77 100644
--- a/gnome-music/view.py
+++ b/gnome-music/view.py
@@ -1,9 +1,9 @@
-from gi.repository import Gtk, GObject, Gd, Grl, Pango, GLib, GdkPixbuf
+from gi.repository import Gtk, GObject, Gd, Grl, Pango, GLib, GdkPixbuf, Tracker
from grilo import grilo
import widgets as Widgets
from query import Query
import albumArtCache
-import tracker
+tracker = Tracker.SparqlConnection.get(None)
def extractFileName(uri):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]