mainapp.py 文件源码

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

项目:chirp_fork 作者: mach327 项目源码 文件源码
def do_toggle_report(self, action):
        if not action.get_active():
            d = gtk.MessageDialog(buttons=gtk.BUTTONS_YES_NO, parent=self)
            markup = "<b><big>" + _("Reporting is disabled") + "</big></b>"
            d.set_markup(markup)
            msg = _("The reporting feature of CHIRP is designed to help "
                    "<u>improve quality</u> by allowing the authors to focus "
                    "on the radio drivers used most often and errors "
                    "experienced by the users. The reports contain no "
                    "identifying information and are used only for "
                    "statistical purposes by the authors. Your privacy is "
                    "extremely important, but <u>please consider leaving "
                    "this feature enabled to help make CHIRP better!</u>\n\n"
                    "<b>Are you sure you want to disable this feature?</b>")
            d.format_secondary_markup(msg.replace("\n", "\r\n"))
            r = d.run()
            d.destroy()
            if r == gtk.RESPONSE_NO:
                action.set_active(not action.get_active())

        conf = config.get()
        conf.set_bool("no_report", not action.get_active())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号