当前位置: 首页>>代码示例>>Python>>正文


Python LauncherConfig.add_listener方法代码示例

本文整理汇总了Python中launcher.launcher_config.LauncherConfig.add_listener方法的典型用法代码示例。如果您正苦于以下问题:Python LauncherConfig.add_listener方法的具体用法?Python LauncherConfig.add_listener怎么用?Python LauncherConfig.add_listener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在launcher.launcher_config.LauncherConfig的用法示例。


在下文中一共展示了LauncherConfig.add_listener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import add_listener [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))
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:62,代码来源:WarningsElement.py

示例2: __init__

# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import add_listener [as 别名]
 def __init__(self, parent):
     self.parent = weakref.ref(parent)
     LauncherConfig.add_listener(self)
     LauncherSettings.add_listener(self)
     self.dirty = True
     self.do_update()
     parent.destroyed.connect(self.on_parent_destroyed)
开发者ID:,项目名称:,代码行数:9,代码来源:

示例3: __init__

# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import add_listener [as 别名]
 def __init__(self, parent, names):
     parent.__config_enable_behavior = self
     self._parent = weakref.ref(parent)
     self._names = set(names)
     LauncherConfig.add_listener(self)
     try:
         parent.destroyed.connect(self.on_parent_destroyed)
     except AttributeError:
         print("WARNING: ConfigBehavior without remove_listener "
               "implementation")
     for name in names:
         # Broadcast initial value
         self.on_config(name, LauncherConfig.get(name))
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:15,代码来源:configbehavior.py

示例4: __init__

# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import add_listener [as 别名]
    def __init__(self, parent):
        StatusElement.__init__(self, parent)
        # self.set_min_width(140)
        self.layout = HorizontalLayout()
        self.icon = Image("launcher:res/16/world_link.png")
        self.right_icon = Image("launcher:res/16/drop_down_arrow.png")
        self.right_icon_disabled = Image(
            "launcher:res/16/drop_down_arrow_disabled.png")
        # self.inactive_icon = self.active_icon.grey_scale()

        self.text = gettext("Web Links")

        LauncherConfig.add_listener(self)
        self.on_config("protection", LauncherConfig.get("protection"))

        self.have = set()
        for key in url_keys:
            self.on_config(key, LauncherConfig.get(key))
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:20,代码来源:WebLinkElement.py

示例5: set_config_handlers

# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import add_listener [as 别名]
 def set_config_handlers(self):
     self.kickstart_type_choice.on_changed = self.on_kickstart_type_changed
     self.ext_rom_type_choice.on_changed = self.on_ext_rom_type_changed
     LauncherConfig.add_listener(self)
开发者ID:,项目名称:,代码行数:6,代码来源:

示例6: __init__

# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import add_listener [as 别名]
 def __init__(self, parent):
     super().__init__(parent, "save_button.png")
     self.set_tooltip(gettext("Save Config"))
     LauncherConfig.add_listener(self)
     self.on_config("__changed", LauncherConfig.get("__changed"))
开发者ID:glaubitz,项目名称:fs-uae-debian,代码行数:7,代码来源:savebutton.py


注:本文中的launcher.launcher_config.LauncherConfig.add_listener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。