- Added permission check into playlist

- Fixed SVN muckup
- Adding gloss execution script
This commit is contained in:
noisymime 2008-06-28 12:13:36 +00:00
parent b07f95b2e4
commit 9fbf2b6976
44 changed files with 61 additions and 6 deletions

46
gloss Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
install_dir=/usr/share/gloss
version="0.1"
print_help()
{
echo "Usage: gloss [options]"
echo "Options:"
echo " --help Display this text"
echo " --debug Start gloss in debug mode"
echo " --theme [theme name] Force use of a certain theme"
echo " --show-themes Prints a list of available themes"
echo " --version Display the gloss version"
exit
}
print_themes()
{
echo "Available themes:"
ls -1 --color=never $install_dir/themes
exit
}
print_version()
{
echo "Gloss version $version"
exit
}
arg_string=""
for i in $*
do
case $i in
--help ) print_help
;;
--show-themes ) print_themes
;;
--version ) print_version
;;
* ) arg_string=$arg_string" "$i
esac
done
python $install_dir/gloss.py $arg_string

View File

@ -86,12 +86,13 @@ class MainApp:
def loadGloss(self):
theme = None
debug = False
#loop through the args
for i in range(0, len(self.args)):
arg = self.args[i]
if arg == "--debug":
print "Using debug mode"
self.glossMgr.debug = True
debug = True
elif arg == "--tests":
self.show_tests = True
print "Showing tests"
@ -101,9 +102,7 @@ class MainApp:
#Create the Gloss Manager
self.glossMgr = GlossMgr(self.stage, self.dbMgr, theme=theme)
self.glossMgr.debug = debug
#Update splash status msg
self.splashScreen.set_msg("Creating menus")

View File

@ -20,6 +20,7 @@ class MusicObjectRow(ImageRow):
ImageRow.__init__(self, glossMgr, width, height, columns)
self.music_player = music_player
self.sleep = False
self.glossMgr = glossMgr
self.objectLibrary = []
self.timeline = None
@ -42,7 +43,7 @@ class MusicObjectRow(ImageRow):
start = self.loaded_objects
for i in range(start, end):
object = self.objectLibrary[i]
print "loading: " + object.name
if self.glossMgr.debug: print "Music_Player: loading: " + object.name
if i > (self.num_columns + self.buffer):
pixbuf = object.get_default_image()
else:

View File

@ -22,7 +22,7 @@ class album:
pixbuf = song.get_image_from_ID3()
if not pixbuf is None:
return pixbuf
#If nothing has been found return the default
return self.get_default_image()

View File

@ -50,6 +50,7 @@ class song:
def get_image_from_ID3(self):
#Basic check first up to make sure the filename is set
if self.filename is None:
if self.music_player.glossMgr.debug: print "Music_Player: Attempting to load ID3 image from song '%s', but have no filename to look up" % self.name
return None
tag = eyeD3.Tag()
@ -58,6 +59,7 @@ class song:
#Make sure the file exists and we can read it
if not os.access(filename, os.R_OK):
if self.music_player.glossMgr.debug: print "Music_Player: Attempting to read ID3 image on file '%s', however do not appear to have read permission" % filename
return None
tag.link(filename)

View File

@ -282,6 +282,7 @@ class Module:
def update_main_img(self, data = None):
#clutter.threads_enter()
pixbuf = self.current_albums[self.list1.selected].get_image()
if not pixbuf is None:
self.main_img.set_pixbuf(pixbuf)

View File

@ -1,4 +1,5 @@
import gobject
import os
from multimedia.AudioController import AudioController
class Playlist(gobject.GObject):
@ -43,6 +44,11 @@ class Playlist(gobject.GObject):
current_song = self.songs[self.position]
current_song_filename = self.musicPlayer.base_dir + "/" + current_song.directory + "/" + current_song.filename
#Make sure the file exists and we can read it
if not os.access(current_song_filename, os.R_OK):
self.glossMgr.display_msg("Access Error", "Unable to playback file '%s'" % current_song_filename)
current_song_uri = "file://" + current_song_filename
if self.glossMgr.debug: print "Music_Player: Attempting to play file '%s'" % current_song_filename
self.audio_controller.play_audio(current_song_uri)

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 678 KiB

After

Width:  |  Height:  |  Size: 678 KiB

View File

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 388 KiB

View File

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 135 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 256 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 257 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 517 KiB

After

Width:  |  Height:  |  Size: 517 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 515 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB