mainapp.py 文件源码

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

项目:chirp_fork 作者: mach327 项目源码 文件源码
def do_dmrmarc(self, do_import):
        self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
        if not self.do_dmrmarc_prompt():
            self.window.set_cursor(None)
            return

        city = CONF.get("city", "dmrmarc")
        state = CONF.get("state", "dmrmarc")
        country = CONF.get("country", "dmrmarc")

        # Do this in case the import process is going to take a while
        # to make sure we process events leading up to this
        gtk.gdk.window_process_all_updates()
        while gtk.events_pending():
            gtk.main_iteration(False)

        if do_import:
            eset = self.get_current_editorset()
            dmrmarcstr = "dmrmarc://%s/%s/%s" % (city, state, country)
            eset.do_import(dmrmarcstr)
        else:
            try:
                from chirp import dmrmarc
                radio = dmrmarc.DMRMARCRadio(None)
                radio.set_params(city, state, country)
                self.do_open_live(radio, read_only=True)
            except errors.RadioError, e:
                common.show_error(e)

        self.window.set_cursor(None)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号