main_window.py 文件源码

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

项目:hubangl 作者: soonum 项目源码 文件源码
def _display_confirmation_message(self, new_mode, app):
        """
        Display a popup message to confirm the mode switch.
        """
        text = "Switching to " + new_mode + " mode will end current stream."
        messagebox = Gtk.MessageDialog(
            buttons=Gtk.ButtonsType.OK_CANCEL,
            message_type=Gtk.MessageType.WARNING,
            message_format=text
        )
        messagebox.set_title("Confirmation")

        try:
            response = messagebox.run()
            if response == Gtk.ResponseType.OK:
                application = app()
        finally:
            messagebox.destroy()
            return application
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号