hunspell_table.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:ibus-typing-booster 作者: mike-fabian 项目源码 文件源码
def set_min_char_complete(self, min_char_complete, update_dconf=True):
        '''Sets the minimum number of characters to try completion

        :param min_char_complete: The minimum number of characters
                                  to type before completion is tried.
        :type mode: integer >= 1 and <= 9
        :param update_dconf: Whether to write the change to dconf.
                             Set this to False if this method is
                             called because the dconf key changed
                             to avoid endless loops when the dconf
                             key is changed twice in a short time.
        :type update_dconf: boolean
        '''
        if DEBUG_LEVEL > 1:
            sys.stderr.write(
                "set_min_char_complete(%s, update_dconf = %s)\n"
                %(min_char_complete, update_dconf))
        if min_char_complete == self._min_char_complete:
            return
        if min_char_complete >= 1 and min_char_complete <= 9:
            self._min_char_complete = min_char_complete
            self.reset()
            if update_dconf:
                self._config.set_value(
                    self._config_section,
                    'mincharcomplete',
                    GLib.Variant.new_int32(min_char_complete))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号