Пример #1
0
def mSwitchGlobal(varName, varConfigName, refreshTree=False):
	if eval(varName) == True:
		exec('%s = False' % varName)
		GL.updateConfigFile('Configuration', varConfigName, 'False')
	else:
		exec('%s = True' % varName)
		GL.updateConfigFile('Configuration', varConfigName, 'True')
	
	if refreshTree:
		refreshTreeview(GL.appTreeView.master.master.master)	
Пример #2
0
def mChangeLang(mainApp, newLang):
	print 'changing language'
	if newLang == 'ENG':
		dicLang = LANG.english
		mainApp.bool_menu_config_lang_eng.set(True)
		mainApp.bool_menu_config_lang_spa.set(False)
		
	elif newLang == 'SPA':
		dicLang = LANG.spanish
		mainApp.bool_menu_config_lang_eng.set(False)
		mainApp.bool_menu_config_lang_spa.set(True)
		
	else:
		return
	
	if dicLang['lang'] <> GL.names['lang']:
		GL.names = dicLang
		GL.updateConfigFile('Configuration', 'language', dicLang['lang'])
		refreshApp(mainApp)