本文整理汇总了Python中launcher.launcher_config.LauncherConfig.is_config_only_option方法的典型用法代码示例。如果您正苦于以下问题:Python LauncherConfig.is_config_only_option方法的具体用法?Python LauncherConfig.is_config_only_option怎么用?Python LauncherConfig.is_config_only_option使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类launcher.launcher_config.LauncherConfig
的用法示例。
在下文中一共展示了LauncherConfig.is_config_only_option方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import is_config_only_option [as 别名]
def __init__(self, parent):
StatusElement.__init__(self, parent)
self.error_icon = Image("launcher:res/16/error.png")
self.warning_icon = Image("launcher:res/16/warning_3.png")
self.notice_icon = Image("launcher:res/16/information.png")
self.icons = [
self.error_icon,
self.warning_icon,
self.notice_icon,
]
self.coordinates = []
self.warnings = []
self.game_notice = ""
self.variant_notice = ""
self.variant_warning = ""
self.variant_error = ""
self.joy_emu_conflict = ""
self.using_joy_emu = False
self.kickstart_file = ""
self.x_kickstart_file_sha1 = ""
self.update_available = ""
self.__error = ""
self.x_missing_files = ""
self.download_page = ""
self.download_file = ""
self.amiga_model = ""
self.amiga_model_calculated = ""
self.chip_memory = ""
self.chip_memory_calculated = 0
self.outdated_plugins = []
self.custom_config = set()
self.custom_uae_config = set()
self.settings_config_keys = set()
plugin_manager = PluginManager.instance()
for plugin in plugin_manager.plugins():
if plugin.outdated:
self.outdated_plugins.append(plugin.name)
ConfigBehavior(self, [
"x_game_notice", "x_variant_notice", "x_variant_warning",
"x_variant_error", "x_joy_emu_conflict", "amiga_model",
"x_kickstart_file_sha1", "kickstart_file", "download_page",
"download_file", "x_missing_files", "__error",
"chip_memory", "jit_compiler"])
SettingsBehavior(self, ["__update_available"])
LauncherConfig.add_listener(self)
for key in JOYSTICK_KEYS:
self.on_config(key, LauncherConfig.get(key))
for key in LauncherConfig.keys():
if LauncherConfig.is_custom_uae_option(key):
self.on_config(key, LauncherConfig.get(key))
elif LauncherConfig.is_custom_option(key):
self.on_config(key, LauncherConfig.get(key))
LauncherSettings.add_listener(self)
for key in LauncherSettings.keys():
if LauncherConfig.is_config_only_option(key):
self.on_setting(key, LauncherSettings.get(key))
示例2: get_initial_text
# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import is_config_only_option [as 别名]
def get_initial_text():
text = ""
# FIXME: accessing values directly here, not very nice
keys = app.settings.values.keys()
for key in sorted(keys):
if key in LauncherSettings.default_settings:
continue
# if key in LauncherConfig.config_keys:
# # print("(settings) ignoring key", key)
# text += "\n# {0} is ignored here " \
# "(use config dialog instead)\n".format(key)
if LauncherConfig.is_config_only_option(key):
text += ("\n# {0} will here function as a global config "
"default and may cause\nunexpected problems. It is "
"recommended to only use this as a per-config "
"option.\n".format(key))
value = app.settings[key]
if LauncherConfig.get(key):
text += "\n# {0} is overridden by current " \
"configuration\n".format(key)
text += "{0} = {1}\n".format(key, value)
if LauncherConfig.get(key):
text += "\n"
if key in LauncherConfig.config_keys:
text += "\n"
return text
示例3: on_setting
# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import is_config_only_option [as 别名]
def on_setting(self, key, value):
if LauncherConfig.is_config_only_option(key):
changed = False
if value:
if key not in self.settings_config_keys:
self.settings_config_keys.add(key)
changed = True
else:
if key in self.settings_config_keys:
self.settings_config_keys.remove(key)
changed = True
if changed:
self.rebuild_warnings_and_refresh()