bugfix for libplayers
git-svn-id: svn://svn.berlios.de/gpodder/trunk@207 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
537f3a65a6
commit
9b165cce8d
5 changed files with 18 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon, 11 Dec 2006 01:23:31 +0100 <thp@perli.net>
|
||||
* src/gpodder/libplayers.py: Fixed a bug when there are non-
|
||||
dotdesktop files in /usr/share/applications/ - thanks to Joel
|
||||
Calado for reporting this bug on gpodder-devel :)
|
||||
* bin/gpodder: Pushed release date + version
|
||||
|
||||
Sat, 9 Dec 2006 03:04:06 +0100 <thp@perli.net>
|
||||
* src/gpodder/gpodder.py: Fixed a bug that prevented opening the
|
||||
gPodder preferences window
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
# PLEASE DO NOT CHANGE FORMAT OF __version__ LINE (setup.py reads this)
|
||||
|
||||
__author__ = "Thomas Perl <thp@perli.net>"
|
||||
__version__ = "0.8.0+svn20061209-early"
|
||||
__date__ = "2006-12-09"
|
||||
__version__ = "0.8.0+svn20061210"
|
||||
__date__ = "2006-12-10"
|
||||
__copyright__ = "Copyright (c) 2005-2006 %s. All rights reserved." % __author__
|
||||
__licence__ = "GPL"
|
||||
|
||||
|
|
BIN
data/gpodder-original.png
Normal file
BIN
data/gpodder-original.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
BIN
data/gpodder.png
BIN
data/gpodder.png
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 42 KiB |
|
@ -26,7 +26,7 @@
|
|||
#
|
||||
#
|
||||
|
||||
from os import listdir
|
||||
from glob import glob
|
||||
from os.path import basename
|
||||
from os.path import splitext
|
||||
from os.path import exists
|
||||
|
@ -78,24 +78,23 @@ class UserAppsReader(object):
|
|||
def read( self):
|
||||
for dir in userappsdirs:
|
||||
if exists( dir):
|
||||
files = listdir( dir)
|
||||
for file in files:
|
||||
self.parse_and_append( dir, file)
|
||||
for file in glob( dir+'/*.desktop'):
|
||||
self.parse_and_append( file)
|
||||
self.apps.append( UserApplication( 'Shell command', '', 'audio/*', 'gtk-execute'))
|
||||
|
||||
def parse_and_append( self, dir, filename):
|
||||
parser = RawConfigParser()
|
||||
parser.read( [ dir + filename ])
|
||||
if not parser.has_section( sect):
|
||||
return
|
||||
|
||||
def parse_and_append( self, filename):
|
||||
try:
|
||||
parser = RawConfigParser()
|
||||
parser.read( [ filename ])
|
||||
if not parser.has_section( sect):
|
||||
return
|
||||
|
||||
app_name = parser.get( sect, 'Name')
|
||||
app_cmd = parser.get( sect, 'Exec')
|
||||
app_mime = parser.get( sect, 'MimeType')
|
||||
app_icon = parser.get( sect, 'Icon')
|
||||
if app_mime.find( 'audio/') != -1:
|
||||
log( 'Player found: %s (%s in %s)', app_name, filename, dir)
|
||||
log( 'Player found: %s (%s)', app_name, filename)
|
||||
self.apps.append( UserApplication( app_name, app_cmd, app_mime, app_icon))
|
||||
except:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue