projects
/
drlaunch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added support for saving/loading 'animate' option.
[drlaunch]
/
src
/
apps.py
diff --git
a/src/apps.py
b/src/apps.py
index
28673cd
..
f078b04
100755
(executable)
--- a/
src/apps.py
+++ b/
src/apps.py
@@
-34,10
+34,6
@@
appdir="/usr/share/applications/hildon"
def readOneFn(fn):
global appdir
def readOneFn(fn):
global appdir
- fn2=appdir + '/' + fn
-
- f=open(fn2, 'rt')
-
ret={
'id': fn[:-8],
'name': None,
ret={
'id': fn[:-8],
'name': None,
@@
-45,7
+41,16
@@
def readOneFn(fn):
'icon': None,
'iconpath': None,
'domain': None,
'icon': None,
'iconpath': None,
'domain': None,
+ 'type': None,
}
}
+
+ fn2=appdir + '/' + fn
+
+ try:
+ f=open(fn2, 'rt')
+ except:
+ return(None)
+
inde=False
for line in f:
line=line.strip()
inde=False
for line in f:
line=line.strip()
@@
-73,6
+78,9
@@
def readOneFn(fn):
elif line.startswith('X-Text-Domain='):
l=line[14:]
ret['domain']=l
elif line.startswith('X-Text-Domain='):
l=line[14:]
ret['domain']=l
+ elif line.startswith('Type='):
+ l=line[5:]
+ ret['type']=l
if ret['domain']!=None:
try:
if ret['domain']!=None:
try:
@@
-84,6
+92,9
@@
def readOneFn(fn):
ret['name0']=ret['name']
ret['name']=c.gettext(ret['name0'])
ret['name0']=ret['name']
ret['name']=c.gettext(ret['name0'])
+ if ret['name']==None:
+ ret['name']=ret['id']
+
return(ret)
def readOne(name):
return(ret)
def readOne(name):
@@
-105,7
+116,14
@@
def scan():
continue
if f.startswith('catorise-'):
continue
continue
if f.startswith('catorise-'):
continue
+
dt=readOneFn(f)
dt=readOneFn(f)
+
+ if dt==None:
+ continue
+ if dt['type']=='Daemon' or dt['type']=='daemon':
+ continue
+
t=f[:-8]
ret[t]=dt
t=f[:-8]
ret[t]=dt