コード例 #1
0
    def calculate_result(self, w, keymap):
        l = self.controller.dbfilter.get_locale()
        keymap = keymap.split(':')
        if len(keymap) == 1:
            keymap.append('')
        layout = keyboard_names.layout_human(l, keymap[0])
        variant = keyboard_names.variant_human(l, keymap[0], keymap[1])
        self.set_keyboard(layout)
        self.controller.dbfilter.change_layout(layout)
        self.controller.dbfilter.apply_keyboard(layout, variant)

        # Necessary to clean up references so self.query is garbage collected.
        self.calculate_closed()
コード例 #2
0
    def calculate_result(self, w, keymap):
        ret = self.controller.dbfilter.get_locale()
        keymap = keymap.split(':')
        if len(keymap) == 1:
            keymap.append('')
        layout = keyboard_names.layout_human(ret, keymap[0])
        variant = keyboard_names.variant_human(ret, keymap[0], keymap[1])
        self.set_keyboard(layout)
        self.controller.dbfilter.change_layout(layout)
        self.controller.dbfilter.apply_keyboard(layout, variant)

        # Necessary to clean up references so self.query is garbage collected.
        self.calculate_closed()