4 # Copyright (C) 2010 Stefanos Harhalakis
6 # This file is part of wifieye.
8 # wifieye is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # wifieye is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with wifieye. If not, see <http://www.gnu.org/licenses/>.
21 # $Id: 0.py 2265 2010-02-21 19:16:26Z v13 $
23 __version__ = "$Id: 0.py 2265 2010-02-21 19:16:26Z v13 $"
27 from gettext import translation
30 #from xdg.IconTheme import getIconPath
32 appdir="/usr/share/applications/hildon"
59 if line=='[Desktop Entry]':
66 # Reached another block
67 if line.startswith('[') and inde:
70 elif line.startswith('Name='):
73 elif line.startswith('Exec='):
76 elif line.startswith('Icon='):
79 # ret['iconpath']=getIconPath(l)
80 elif line.startswith('X-Text-Domain='):
83 elif line.startswith('Type='):
87 if ret['domain']!=None:
89 c=translation(ret['domain'])
94 ret['name0']=ret['name']
95 ret['name']=c.gettext(ret['name0'])
112 files=os.listdir(appdir)
117 if not f.endswith('.desktop'):
119 if f.startswith('catorise-'):
126 if dt['type']=='Daemon' or dt['type']=='daemon':
141 if __name__=="__main__":
142 #locale.setlocale(locale.LC_ALL, '')
145 # vim: set ts=8 sts=4 sw=4 noet formatoptions=r ai nocindent: