[chirp_devel] [PATCH 0 of 1 ] Damned windows and it's "no com port"
After my previous failure in fixing #1131 (thanks Jim for pointing out) I installed windows and development system in it. This new patch finally works as expected!
I don't really like
if cs.port != _("No ports detected"):
but I have no better way to identify that the "No ports detected" have been selected by the user.
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1380634041 -7200 # Node ID d6888d30045ccc062a8d1909f9c386f0a803420a # Parent 23e2541b4dcde2e9d8be6282a8a0abc28a81a5e3 [ui] Correctly manage "No com port" situation Fix regression introduced fixing #1131
diff --git a/chirpui/clone.py b/chirpui/clone.py --- a/chirpui/clone.py +++ b/chirpui/clone.py @@ -56,6 +56,8 @@ port = conf.get("last_port") elif ports: port = ports[0] + else: + port = _("No ports detected") if not port in ports: ports.insert(0, port)
@@ -120,7 +122,7 @@ self.__table.set_col_spacings(10) self.__row = 0
- self.__port = self.__make_port(settings and settings.port or ["No port detected"]) + self.__port = self.__make_port(settings and settings.port or None) self.__modl = self.__make_model() self.__vend = self.__make_vendor(self.__modl)
@@ -184,7 +186,8 @@ return None
conf = config.get("state") - conf.set("last_port", cs.port) + if cs.port != _("No ports detected"): + conf.set("last_port", cs.port) conf.set("last_vendor", cs.radio_class.VENDOR) conf.set("last_model", model)
I don't really like
if cs.port != _("No ports detected"):
Hmm, yeah. How about we avoid putting a non-port in the box like that and instead display the warning somewhere else? Either on that dialog itself, or maybe a pop-up before we display that dialog (with an empty port box)?
participants (2)
-
Dan Smith
-
Marco Filippi IZ3GME