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)
评论列表
文章目录