Ejemplo n.º 1
0
    def _loadWidget(self, dialog):
        # NOTE: in the fife superclass, this is used for the main widget
        # as well as the require-restart message. Here, we allow us to ignore
        # the parameter since _showChangeRequireRestartDialog() is overwritten as well

        optionsPickbelt = OptionsPickbeltWidget()
        wdg = optionsPickbelt.get_widget()
        hk = HotkeyConfiguration()
        number = optionsPickbelt.__class__.sections.index(
            ('hotkeys_settings', _('Hotkeys')))
        optionsPickbelt.page_widgets[number].addChild(hk.widget)

        self.hotkeyInterface = hk

        # HACK: fife settings call stylize, which breaks our styling on widget load
        no_restyle_str = "do_not_restyle_this"
        self.setGuiStyle(no_restyle_str)

        def no_restyle(style):
            if style != no_restyle_str:
                wdg.stylize(style)

        wdg.stylize = no_restyle

        return wdg
Ejemplo n.º 2
0
	def _loadWidget(self, dialog):
		# NOTE: in the fife superclass, this is used for the main widget
		# as well as the require-restart message. Here, we allow us to ignore
		# the parameter since _showChangeRequireRestartDialog() is overwritten as well

		optionsPickbelt = OptionsPickbeltWidget()
		wdg = optionsPickbelt.get_widget()
		hk = HotkeyConfiguration()
		number = optionsPickbelt.__class__.sections.index(('hotkeys_settings', _('Hotkeys')))
		optionsPickbelt.page_widgets[number].addChild(hk.widget)

		self.hotkeyInterface = hk

		# HACK: fife settings call stylize, which breaks our styling on widget load
		no_restyle_str = "do_not_restyle_this"
		self.setGuiStyle(no_restyle_str)
		def no_restyle(style):
			if style != no_restyle_str:
				wdg.stylize(style)
		wdg.stylize = no_restyle

		return wdg