~allsymes/vineyard/fixes

« back to all changes in this revision

Viewing changes to python-wine/wine/_programs.py

  • Committer: Christian Dannie Storgaard
  • Date: 2010-02-26 05:37:32 UTC
  • Revision ID: cybolic@gmail.com-20100226053732-pvkoxg483hy9n73n
Fixed error in Vineyard on saving program info. python-wine now doesn't fall over when trying to save program info for menu-only programs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
                if 'vineyarddescription' in regData:
178
178
                    program['description'] = regData['vineyarddescription']
179
179
                if 'vineyardterminal' in regData:
180
 
                    program['programterminal'] = regData['vineyardterminal']
 
180
                    program['programterminal'] = bool(regData['vineyardterminal'])
181
181
                if 'vineyarduninstall' in regData:
182
182
                    program['uninstall'] = regData['vineyarduninstall']
183
183
                
334
334
            menuprograms = {}
335
335
            for menuKey,menuData in menuOnlyPrograms.iteritems():
336
336
                menuData = util.dictToCaseInsensitive(menuData)
337
 
                program = {}
 
337
                registryKey = "vineyard-program-from-menu-%s" % util.tempstring()
 
338
                list_of_used_registrykeys = [ i['_registrykey'] for i in menuprograms.itervalues() ]
 
339
                while registryKey in list_of_used_registrykeys:
 
340
                    registryKey = "vineyard-program-from-menu-%s" % util.tempstring()
 
341
                program = {'_registrykey': registryKey}
338
342
                program['name'] = menuData['name']
339
343
                if 'command' in menuData and menuData['command']:
340
344
                    if menuData['command'].startswith('env WINEPREFIX=') or menuData['command'].startswith('wine '):