예제 #1
0
def set_repeat_key(state):
	global GNOME_A11Y_DEFAULT_STATE
	# If this is the first time (in this session) that we touch this value
	# get its default
	if GNOME_A11Y_DEFAULT_STATE is None:
		GNOME_A11Y_DEFAULT_STATE = common.value_as_bool(common.run([
		    'gconftool',
		    '--get', '/apps/gnome_settings_daemon/plugins/a11y-keyboard/active'
		])[0])

	state = common.value_as_bool(state)
	# Only enable/disable a11y if it was previously enabled
	if GNOME_A11Y_DEFAULT_STATE:
		common.run([
			'gconftool',
			'--set', '/apps/gnome_settings_daemon/plugins/a11y-keyboard/active',
			'--type', 'bool',
			str(state).lower()
		])
	common.run([
	    'gconftool',
	    '--set', '/desktop/gnome/peripherals/keyboard/repeat',
	    '--type', 'bool',
	    str(state).lower()
	])
	return state
예제 #2
0
def set_eax_support(value, program=None):
    """
        Enables or disables support for EAX on the CPU
    """
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError(
            "type of value should something convertable to a boolean")
    elif value == True:
        value = 'Y'
    else:
        value = None
    if program:
        registry.set({
            'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DirectSound' % program:
            {
                "EAXEnabled": value
            }
        })
    else:
        registry.set({
            'HKEY_CURRENT_USER\\Software\\Wine\\DirectSound': {
                "EAXEnabled": value
            }
        })
예제 #3
0
def set_csmt(value, program=None):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError("type of value should something convertable to a boolean")
    elif value == True:
        value = 'enabled'
    else:
        value = 'disabled'
        
    if common.ENV.get('WINE_SUPPORTS_CSMT') == 'true':
        if common.ENV.get('WINE_SUPPORTS_CSMT_TYPE') == 'dll':
            if value == 'enabled':
                value = 'wined3d-csmt.dll'
            else:
                value = None
            if program:
                registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DllRedirects' % program: {'wined3d': value}})
            else:
                registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects': {'wined3d': value}})
        else:
            if program:
                registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\Direct3D' % program: {'CSMT': value}})
            else:
                registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\Direct3D': {'CSMT': value}})
    else:
        return None
예제 #4
0
def set_allow_xrandr(value):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError("type of value should something convertable to a boolean")
    elif value == True:
        value = 'y'
    else:
        value = 'n'

    registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver': {
        'UseXRandR': value
    }})
예제 #5
0
def set_allow_multisampling(value):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError("type of value should something convertable to a boolean")
    elif value == True:
        value = "enabled"
    else:
        value = None
    registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\Direct3D': {
        'Multisampling': value
    }})
    return value, True
예제 #6
0
def set_check_float_constants(value, program=None):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError("type of value should something convertable to a boolean")
    elif value == True:
        value = 'enabled'
    else:
        value = None

    if program:
        registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\Direct3D' % program: {'CheckFloatConstants': value}})
    else:
        registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\Direct3D': {'CheckFloatConstants': value}})
예제 #7
0
def set_dxva2_vaapi(value, program=None):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError("type of value should something convertable to a boolean")
    elif value == True:
        value = 'va'
    else:
        value = None

    if program:
        registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DXVA2' % program: {'backend': value}})
    else:
        registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\DXVA2': {'backend': value}})
예제 #8
0
파일: audio.py 프로젝트: Cybolic/vineyard
def get_eax_support(program=None):
    if common.ENV.get('WINE_SUPPORTS_EAX') == 'true':
        if program:
            bits = registry.get('HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DirectSound' % \
                program, "EAXEnabled", quiet=True)
        else:
            enabled = registry.get('HKEY_CURRENT_USER\\Software\\Wine\\DirectSound',
                "EAXEnabled", quiet=True)
        if enabled:
            return common.value_as_bool(enabled) or False
        else:
            return False
    else:
        return None
예제 #9
0
def set_allow_xrandr(value):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError(
            "type of value should something convertable to a boolean")
    elif value == True:
        value = 'y'
    else:
        value = 'n'

    registry.set({
        'HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver': {
            'UseXRandR': value
        }
    })
예제 #10
0
def set_allow_multisampling(value):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError(
            "type of value should something convertable to a boolean")
    elif value == True:
        value = "enabled"
    else:
        value = None
    registry.set({
        'HKEY_CURRENT_USER\\Software\\Wine\\Direct3D': {
            'Multisampling': value
        }
    })
    return value, True
예제 #11
0
def get_eax_support(program=None):
    if common.ENV.get('WINE_SUPPORTS_EAX') == 'true':
        if program:
            bits = registry.get('HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DirectSound' % \
                program, "EAXEnabled", quiet=True)
        else:
            enabled = registry.get(
                'HKEY_CURRENT_USER\\Software\\Wine\\DirectSound',
                "EAXEnabled",
                quiet=True)
        if enabled:
            return common.value_as_bool(enabled) or False
        else:
            return False
    else:
        return None
예제 #12
0
파일: audio.py 프로젝트: Cybolic/vineyard
def set_eax_support(value, program=None):
    """
        Enables or disables support for EAX on the CPU
    """
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError("type of value should something convertable to a boolean")
    elif value == True:
        value = 'Y'
    else:
        value = None
    if program:
        registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DirectSound' % program: {
            "EAXEnabled": value}})
    else:
        registry.set({'HKEY_CURRENT_USER\\Software\\Wine\\DirectSound': {
            "EAXEnabled": value}})
예제 #13
0
def set_csmt(value, program=None):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError(
            "type of value should something convertable to a boolean")
    elif value == True:
        value = 'enabled'
    else:
        value = 'disabled'

    if common.ENV.get('WINE_SUPPORTS_CSMT') == 'true':
        if common.ENV.get('WINE_SUPPORTS_CSMT_TYPE') == 'dll':
            if value == 'enabled':
                value = 'wined3d-csmt.dll'
            else:
                value = None
            if program:
                registry.set({
                    'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DllRedirects' % program:
                    {
                        'wined3d': value
                    }
                })
            else:
                registry.set({
                    'HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects': {
                        'wined3d': value
                    }
                })
        else:
            if program:
                registry.set({
                    'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\Direct3D' % program:
                    {
                        'CSMT': value
                    }
                })
            else:
                registry.set({
                    'HKEY_CURRENT_USER\\Software\\Wine\\Direct3D': {
                        'CSMT': value
                    }
                })
    else:
        return None
예제 #14
0
def set_dxva2_vaapi(value, program=None):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError(
            "type of value should something convertable to a boolean")
    elif value == True:
        value = 'va'
    else:
        value = None

    if program:
        registry.set({
            'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DXVA2' % program:
            {
                'backend': value
            }
        })
    else:
        registry.set(
            {'HKEY_CURRENT_USER\\Software\\Wine\\DXVA2': {
                'backend': value
            }})
예제 #15
0
def set_check_float_constants(value, program=None):
    value = common.value_as_bool(value)
    if value == None:
        raise ValueError(
            "type of value should something convertable to a boolean")
    elif value == True:
        value = 'enabled'
    else:
        value = None

    if program:
        registry.set({
            'HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\Direct3D' % program:
            {
                'CheckFloatConstants': value
            }
        })
    else:
        registry.set({
            'HKEY_CURRENT_USER\\Software\\Wine\\Direct3D': {
                'CheckFloatConstants': value
            }
        })
예제 #16
0
def get_repeat_key():
	return common.value_as_bool(common.run([
	    'gconftool',
	    '--get', '/desktop/gnome/peripherals/keyboard/repeat'
	])[0])