RemarkableWindow.py 文件源码

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

项目:Remarkable 作者: jamiemcg 项目源码 文件源码
def check_for_save(self, widget):
        reply = False
        if self.text_buffer.get_modified():
            message = "Do you want to save the changes you have made?"
            dialog = Gtk.MessageDialog(self.window,
                                       Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
                                       Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO,
                                       message)
            dialog.set_title("Save?")

            if dialog.run() == Gtk.ResponseType.NO:
                reply = False
            else:
                reply = True
            dialog.destroy()
        return reply
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号