def updateUI(event = None):
eliteSystem = this.lastEventInfo.get(BG_SYSTEM, None)
message = this.lastEventInfo.get(BG_MESSAGE, None)
if (this.enabled or this.overwrite.get()) and eliteSystem:
this.errorLabel.grid_remove()
this.unconfirmedSystem.grid(row=0, column=1, sticky=tk.W)
this.unconfirmedSystem["text"] = eliteSystem.name
this.unconfirmedSystem["url"] = "https://www.edsm.net/show-system?systemName={}".format(urllib2.quote(eliteSystem.name))
this.unconfirmedSystem["state"] = "enabled"
this.distanceValue["text"] = u"{distance} Ly (\u00B1{uncertainty})".format(distance=Locale.stringFromNumber(eliteSystem.distance, 2), uncertainty=eliteSystem.getUncertainty() or "?")
if this.clipboard.get():
this.frame.clipboard_clear()
this.frame.clipboard_append(eliteSystem.name)
else:
this.unconfirmedSystem.grid_remove()
this.errorLabel.grid(row=0, column=1, sticky=tk.W)
this.distanceValue["text"] = "?"
if not this.enabled and not this.overwrite.get():
this.errorLabel["text"] = "EDSM/EDDN is disabled"
else:
this.errorLabel["text"] = message or "?"
评论列表
文章目录