window.py 文件源码

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

项目:nvim-pygtk3 作者: rliang 项目源码 文件源码
def _do_button_toggled(self, btn: Gtk.ToggleButton):
        """Handler for when a button is toggled.

        Emits `nvim-switch-buffer` if the button was toggled ON, and the widget
        isn't in the middle of an update.

        Also avoids toggling off buttons, since the user can't "unswitch" to a
        buffer.

        :btn: the toggled button.

        """
        if not self.props.updating:
            if btn.get_active():
                id = self.bids[self.btns.index(btn)]
                self.emit('nvim-switch-buffer', id)
            else:
                btn.set_active(True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号