Changeset 919:2ce8ca39525b for src/mlx/gui
- Timestamp:
- 03/24/19 08:15:59 (6 years ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/acars.py
r747 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 from mlx.i18n import xstr 5 5 import mlx.const as const 6 6 7 import cef7 from . import cef 8 8 9 9 #------------------------------------------------------------------------------ -
src/mlx/gui/bugreport.py
r492 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 from mlx.i18n import xstr … … 105 105 response = super(BugReportDialog, self).run() 106 106 107 print "response", response, RESPONSETYPE_ACCEPT107 print("response", response, RESPONSETYPE_ACCEPT) 108 108 if response==RESPONSETYPE_ACCEPT: 109 109 self._send() -
src/mlx/gui/callouts.py
r300 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 from mlx.i18n import xstr … … 208 208 config = self._gui.config 209 209 for (aircraftType, approachCallouts) in \ 210 self._approachCallouts.ite ritems():210 self._approachCallouts.items(): 211 211 config.setApproachCallouts(aircraftType, approachCallouts) 212 212 config.save() -
src/mlx/gui/cef.py
r915 r919 1 from common import *1 from .common import * 2 2 3 3 from mlx.util import secondaryInstallation … … 10 10 import os 11 11 import re 12 import thread12 import _thread 13 13 import threading 14 14 import tempfile 15 15 import traceback 16 import urllib 216 import urllib.request, urllib.error, urllib.parse 17 17 from lxml import etree 18 from StringIOimport StringIO18 from io import StringIO 19 19 import lxml.html 20 20 … … 115 115 """Called when a page has been loaded in the SimBrief browser.""" 116 116 url = frame.GetUrl() 117 print "gui.cef.SimBriefHandler._onLoadEnd", httpCode, url117 print("gui.cef.SimBriefHandler._onLoadEnd", httpCode, url) 118 118 if httpCode>=300: 119 119 self._updateProgress(self._lastProgress, … … 127 127 128 128 js = "form=document.getElementById(\"sbapiform\");" 129 for (name, value) in self._plan.ite ritems():129 for (name, value) in self._plan.items(): 130 130 js += "form." + name + ".value=\"" + value + "\";" 131 for (name, value) in SimBriefHandler._querySettings.ite ritems():131 for (name, value) in SimBriefHandler._querySettings.items(): 132 132 if isinstance(value, bool): 133 133 js += "form." + name + ".checked=" + \ … … 175 175 176 176 thread = threading.Thread(target = self._getResults, args = (link,)) 177 thread.daemon = True178 thread.start()177 _thread.daemon = True 178 _thread.start() 179 179 else: 180 180 self._updateProgress(SIMBRIEF_PROGRESS_RETRIEVING_BRIEFING, … … 219 219 220 220 # Obtaining the xml 221 response = urllib 2.urlopen(link)221 response = urllib.request.urlopen(link) 222 222 xmlContent = response.read() 223 223 # Processing xml … … 242 242 imageLinks.append(imageLink[2]) 243 243 flightInfo["image_links"] = imageLinks 244 print( sorted(availableInfo.keys()))244 print((sorted(availableInfo.keys()))) 245 245 htmlFilePath = "simbrief_plan.html" if self._htmlFilePath is None \ 246 246 else self._htmlFilePath … … 266 266 def _initializeCEF(args, initializedCallback): 267 267 """Perform the actual initialization of CEF using the given arguments.""" 268 print "Initializing CEF with args:", args268 print("Initializing CEF with args:", args) 269 269 270 270 settings = { … … 290 290 switches[arg[2:assignIndex]] = arg[assignIndex+1:] 291 291 else: 292 print "Unhandled switch", arg292 print("Unhandled switch", arg) 293 293 294 294 cefpython.Initialize(settings, switches) … … 296 296 gobject.timeout_add(10, _handleTimeout) 297 297 298 print "Initialized, executing callback..."298 print("Initialized, executing callback...") 299 299 initializedCallback() 300 300 … … 322 322 window = container.get_window() 323 323 if window is None: 324 print "mlx.gui.cef.startInContainer: no window found!"324 print("mlx.gui.cef.startInContainer: no window found!") 325 325 windowID = None 326 326 else: -
src/mlx/gui/checklist.py
r300 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 from mlx.i18n import xstr … … 190 190 self._saveChecklist() 191 191 config = self._gui.config 192 for (aircraftType, checklist) in self._checklists.ite ritems():192 for (aircraftType, checklist) in self._checklists.items(): 193 193 config.setChecklist(aircraftType, checklist) 194 194 config.save() -
src/mlx/gui/common.py
r863 r919 31 31 32 32 if not pygobject: 33 print "Using PyGTK"33 print("Using PyGTK") 34 34 pygobject = False 35 35 import pygtk … … 42 42 import appindicator 43 43 appIndicator = True 44 except Exception ,e:44 except Exception as e: 45 45 pass 46 46 … … 113 113 def text2unicode(text): 114 114 """Convert the given text, returned by a Gtk widget, to Unicode.""" 115 return unicode(text)115 return str(text) 116 116 117 117 def text2str(text): -
src/mlx/gui/delaycodes.py
r840 r919 3 3 #------------------------------------------------------------------------------ 4 4 5 from dcdata import CAPTION, DELAYCODE, getTable5 from .dcdata import CAPTION, DELAYCODE, getTable 6 6 7 7 from mlx.gui.common import * -
src/mlx/gui/faultexplain.py
r842 r919 247 247 def reset(self): 248 248 """Reset the widget by removing all faults.""" 249 for (alignment, faultFrame) in self._faultWidgets. itervalues():249 for (alignment, faultFrame) in self._faultWidgets.values(): 250 250 self._faults.remove(alignment) 251 251 self._faults.show_all() -
src/mlx/gui/flight.py
r872 r919 405 405 def _offlineClicked(self, button): 406 406 """Called when the offline button was clicked.""" 407 print "mlx.flight.LoginPage: offline flight selected"407 print("mlx.flight.LoginPage: offline flight selected") 408 408 self._wizard.nextPage() 409 409 410 410 def _loginClicked(self, button): 411 411 """Called when the login button was clicked.""" 412 print "mlx.flight.LoginPage: logging in"412 print("mlx.flight.LoginPage: logging in") 413 413 self._wizard.login(self._handleLoginResult, 414 414 self._pilotID.get_text(), … … 649 649 if response==RESPONSETYPE_OK: 650 650 fileName = text2unicode(dialog.get_filename()) 651 print "Saving", fileName651 print("Saving", fileName) 652 652 try: 653 653 with open(fileName, "wt") as f: 654 654 flight.writeIntoFile(f) 655 except Exception ,e:656 print "Failed to save flight:", util.utf2unicode(str(e))655 except Exception as e: 656 print("Failed to save flight:", util.utf2unicode(str(e))) 657 657 dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow, 658 658 type = MESSAGETYPE_ERROR, … … 706 706 flight=self._getSelectedFlight() 707 707 708 print "DPI", context.get_dpi_x(), context.get_dpi_y()708 print("DPI", context.get_dpi_x(), context.get_dpi_y()) 709 709 710 710 scale = context.get_dpi_x() / 72.0 … … 719 719 720 720 layout = cr.create_layout() 721 layout.set_text( u"Malév VA official briefing")721 layout.set_text("Malév VA official briefing") 722 722 font = pango.FontDescription("sans") 723 723 font.set_size(int(32 * scale * pango.SCALE)) … … 740 740 741 741 layout = cr.create_layout() 742 layout.set_text( u"%s (%s) részére" %742 layout.set_text("%s (%s) részére" % 743 743 (loginResult.pilotName, loginResult.pilotID)) 744 744 font = pango.FontDescription("sans") … … 940 940 if response==RESPONSETYPE_OK: 941 941 fileName = text2unicode(dialog.get_filename()) 942 print "Loading", fileName942 print("Loading", fileName) 943 943 bookedFlight = web.BookedFlight() 944 944 try: … … 946 946 bookedFlight.readFromFile(f) 947 947 self.addFlight(bookedFlight) 948 except Exception ,e:949 print "Failed to load flight:", util.utf2unicode(str(e))948 except Exception as e: 949 print("Failed to load flight:", util.utf2unicode(str(e))) 950 950 dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow, 951 951 type = MESSAGETYPE_ERROR, … … 1629 1629 self.phoneNumber, self.nationality, 1630 1630 self.password) 1631 print "Registering with data:"1632 print " name:", self.name1, self.name2, registrationData.firstName, registrationData.surName, requestedNameOrder1633 print " yearOfBirth:", self.yearOfBirth, registrationData.yearOfBirth1634 print " emailAddress:", self.emailAddress, registrationData.emailAddress1635 print " emailAddressPublic:", self.emailAddressPublic, registrationData.emailAddressPublic1636 print " vatsimID:", self.vatsimID, registrationData.vatsimID1637 print " ivaoID:", self.ivaoID, registrationData.ivaoID1638 print " phoneNumber:", self.phoneNumber, registrationData.phoneNumber1639 print " nationality:", self.nationality, registrationData.nationality1631 print("Registering with data:") 1632 print(" name:", self.name1, self.name2, registrationData.firstName, registrationData.surName, requestedNameOrder) 1633 print(" yearOfBirth:", self.yearOfBirth, registrationData.yearOfBirth) 1634 print(" emailAddress:", self.emailAddress, registrationData.emailAddress) 1635 print(" emailAddressPublic:", self.emailAddressPublic, registrationData.emailAddressPublic) 1636 print(" vatsimID:", self.vatsimID, registrationData.vatsimID) 1637 print(" ivaoID:", self.ivaoID, registrationData.ivaoID) 1638 print(" phoneNumber:", self.phoneNumber, registrationData.phoneNumber) 1639 print(" nationality:", self.nationality, registrationData.nationality) 1640 1640 1641 1641 gui = self._wizard.gui … … 1653 1653 gui.endBusy() 1654 1654 1655 print "Registration result:"1656 print " returned:", returned1655 print("Registration result:") 1656 print(" returned:", returned) 1657 1657 if returned: 1658 print " registered:", result.registered1658 print(" registered:", result.registered) 1659 1659 if result.registered: 1660 print " pilotID", result.pilotID1661 print " loggedIn", result.loggedIn1662 print " emailAlreadyRegistered:", result.emailAlreadyRegistered1663 print " invalidData:", result.invalidData1660 print(" pilotID", result.pilotID) 1661 print(" loggedIn", result.loggedIn) 1662 print(" emailAlreadyRegistered:", result.emailAlreadyRegistered) 1663 print(" invalidData:", result.invalidData) 1664 1664 1665 1665 registrationOK = returned and result.registered … … 1830 1830 def activate(self): 1831 1831 """Activate the student page.""" 1832 print "StudentPage.activate"1832 print("StudentPage.activate") 1833 1833 self._getEntryExamStatusCancelled = False 1834 1834 … … 1844 1844 def finalize(self): 1845 1845 """Finalize the page.""" 1846 print "StudentPage.finalize"1846 print("StudentPage.finalize") 1847 1847 self._getEntryExamStatusCancelled = True 1848 1848 … … 1864 1864 def _handleEntryExamStatus(self, returned, result): 1865 1865 """Called when the entry exam status is availabe.""" 1866 print "_handleEntryExamStatus", returned, result1866 print("_handleEntryExamStatus", returned, result) 1867 1867 if returned and not self._getEntryExamStatusCancelled: 1868 1868 self._entryExamLink = result.entryExamLink … … 2991 2991 2992 2992 plan = self._getPlan() 2993 print "plan:", plan2993 print("plan:", plan) 2994 2994 2995 2995 takeoffRunway = self._takeoffRunway.get_text() … … 3027 3027 are returned. Otherwise a dialog box is displayed informing the user of 3028 3028 invalid credentials and requesting another set of them.""" 3029 print "_getCredentials", count3029 print("_getCredentials", count) 3030 3030 if count==0: 3031 3031 return (self._userName.get_text(), self._password.get_text()) … … 3061 3061 def _simBriefProgress(self, progress, result, flightInfo): 3062 3062 """The real SimBrief progress handler.""" 3063 print "_simBriefProgress", progress, result, flightInfo3063 print("_simBriefProgress", progress, result, flightInfo) 3064 3064 if result==cef.SIMBRIEF_RESULT_NONE: 3065 3065 message = SimBriefSetupPage.progress2Message.get(progress, … … 3758 3758 def _metarChanged(self, buffer): 3759 3759 """Called when the METAR has changed.""" 3760 print "BriefingPage.metarChanged", self._updatingMETAR3760 print("BriefingPage.metarChanged", self._updatingMETAR) 3761 3761 if not self._updatingMETAR: 3762 3762 self.metarEdited = True … … 3770 3770 3771 3771 It uppercases all characters.""" 3772 print "BriefingPage.metarInserted", self._updatingMETAR3772 print("BriefingPage.metarInserted", self._updatingMETAR) 3773 3773 if not self._updatingMETAR: 3774 3774 self._updatingMETAR = True … … 4025 4025 def activate(self): 4026 4026 """Activate the page.""" 4027 print "TakeoffPage.activate"4027 print("TakeoffPage.activate") 4028 4028 4029 4029 self._updatingMETAR = True … … 4069 4069 def allowForward(self): 4070 4070 """Allow going to the next page.""" 4071 print "TakeoffPage.allowForward"4071 print("TakeoffPage.allowForward") 4072 4072 self._forwardAllowed = True 4073 4073 self._updateForwardButton() … … 4075 4075 def reset(self): 4076 4076 """Reset the page if the wizard is reset.""" 4077 print "TakeoffPage.reset"4077 print("TakeoffPage.reset") 4078 4078 4079 4079 super(TakeoffPage, self).reset() … … 4095 4095 pages.""" 4096 4096 if self._active: 4097 print "TakeoffPage.changeMETAR"4097 print("TakeoffPage.changeMETAR") 4098 4098 self._updatingMETAR = True 4099 4099 self._metar.get_buffer().set_text(metar, -1) … … 4116 4116 self.derate is not None) 4117 4117 4118 print "TakeoffPage._updateForwardButton: forwardAllowed:", self._forwardAllowed, ", sensitive:", sensitive4118 print("TakeoffPage._updateForwardButton: forwardAllowed:", self._forwardAllowed, ", sensitive:", sensitive) 4119 4119 if self._forwardAllowed: 4120 print " METAR: ", self._metar.get_text()4121 print " runway: ", self._runway.get_text()4122 print " SID:", self.sid4123 print " V1:", self.v14124 print " VR:", self.vr4125 print " V2:", self.v24126 print " derateType:", self._derateType4127 print " derate:", self.derate4120 print(" METAR: ", self._metar.get_text()) 4121 print(" runway: ", self._runway.get_text()) 4122 print(" SID:", self.sid) 4123 print(" V1:", self.v1) 4124 print(" VR:", self.vr) 4125 print(" V2:", self.v2) 4126 print(" derateType:", self._derateType) 4127 print(" derate:", self.derate) 4128 4128 4129 4129 self._button.set_sensitive(sensitive) … … 4131 4131 def _valueChanged(self, widget, arg = None): 4132 4132 """Called when the value of some widget has changed.""" 4133 print "TakeoffPage._valueChanged"4133 print("TakeoffPage._valueChanged") 4134 4134 4135 4135 self._updateForwardButton() … … 4138 4138 """Called when the value of some entry widget has changed and the value 4139 4139 should be converted to uppercase.""" 4140 print "TakeoffPage._upperChanged"4140 print("TakeoffPage._upperChanged") 4141 4141 entry.set_text(entry.get_text().upper()) 4142 4142 self._valueChanged(entry, arg) … … 4151 4151 def _derateChanged(self, entry): 4152 4152 """Called when the value of the derate is changed.""" 4153 print "TakeoffPage._derateChanged"4153 print("TakeoffPage._derateChanged") 4154 4154 self._updateForwardButton() 4155 4155 … … 4262 4262 def _metarChanged(self, entry): 4263 4263 """Called when the METAR has changed.""" 4264 print "TakeoffPage.metarChanged", self._updatingMETAR4264 print("TakeoffPage.metarChanged", self._updatingMETAR) 4265 4265 if not self._updatingMETAR: 4266 4266 self._updateForwardButton() … … 4271 4271 4272 4272 It uppercases all characters.""" 4273 print "TakeoffPage.metarInserted", self._updatingMETAR4273 print("TakeoffPage.metarInserted", self._updatingMETAR) 4274 4274 if not self._updatingMETAR: 4275 4275 self._updatingMETAR = True … … 4628 4628 pages.""" 4629 4629 if self._active: 4630 print "LandingPage.changeMETAR"4630 print("LandingPage.changeMETAR") 4631 4631 self._updatingMETAR = True 4632 4632 self._metar.get_buffer().set_text(metar, -1) … … 4689 4689 def _metarChanged(self, entry): 4690 4690 """Called when the METAR has changed.""" 4691 print "LandingPage.metarChanged", self._updatingMETAR4691 print("LandingPage.metarChanged", self._updatingMETAR) 4692 4692 if not self._updatingMETAR: 4693 4693 self._updateForwardButton() … … 4698 4698 4699 4699 It uppercases all characters.""" 4700 print "LandingPage.metarInserted", self._updatingMETAR4700 print("LandingPage.metarInserted", self._updatingMETAR) 4701 4701 if not self._updatingMETAR: 4702 4702 self._updatingMETAR = True … … 5217 5217 pass 5218 5218 5219 def _formatTime(self, scheduledTime, realTimestamp, (warning, error)):5219 def _formatTime(self, scheduledTime, realTimestamp, xxx_todo_changeme): 5220 5220 """Format the departure or arrival time based on the given data as a 5221 5221 markup for a label.""" 5222 (warning, error) = xxx_todo_changeme 5222 5223 realTime = time.gmtime(realTimestamp) 5223 5224 … … 5752 5753 elif stage==const.STAGE_LANDING: 5753 5754 if not self._arrivalBriefingPage.metarEdited: 5754 print "Downloading arrival METAR again"5755 print("Downloading arrival METAR again") 5755 5756 self.gui.webHandler.getMETARs(self._arrivalMETARCallback, 5756 5757 [self._bookedFlight.arrivalICAO]) -
src/mlx/gui/flightlist.py
r868 r919 61 61 62 62 if self._extraColumnAttributes is not None: 63 for (key, value) in self._extraColumnAttributes.ite ritems():63 for (key, value) in self._extraColumnAttributes.items(): 64 64 if key=="alignment": 65 65 self._renderer.set_alignment(value, 0.5) … … 401 401 gui.endBusy() 402 402 403 print "PendingFlightsFrame._handleReflyResult", returned, result403 print("PendingFlightsFrame._handleReflyResult", returned, result) 404 404 405 405 if returned: … … 444 444 gui.endBusy() 445 445 446 print "PendingFlightsFrame._handleDeleteResult", returned, result446 print("PendingFlightsFrame._handleDeleteResult", returned, result) 447 447 448 448 if returned: -
src/mlx/gui/gates.py
r619 r919 143 143 self._fleetStore.clear() 144 144 if fleet is None: 145 for (gateNumber, label) in self._gateLabels.ite ritems():145 for (gateNumber, label) in self._gateLabels.items(): 146 146 label.set_markup("<b>" + gateNumber + "</b>") 147 147 else: -
src/mlx/gui/gui.py
r869 r919 1 1 # -*- coding: utf-8 -*- 2 2 3 from statusicon import StatusIcon4 from statusbar import Statusbar5 from info import FlightInfo6 from update import Updater3 from .statusicon import StatusIcon 4 from .statusbar import Statusbar 5 from .info import FlightInfo 6 from .update import Updater 7 7 from mlx.gui.common import * 8 8 from mlx.gui.flight import Wizard … … 18 18 from mlx.gui.acars import ACARS 19 19 from mlx.gui.timetable import TimetableWindow 20 import cef20 from . import cef 21 21 22 22 import mlx.const as const … … 51 51 class GUI(fs.ConnectionListener): 52 52 """The main GUI class.""" 53 _authors = [ ( u"Váradi", u"István", "prog_test"),54 ( u"Galyassy", u"Tamás", "negotiation"),55 ( u"Kurják", u"Ákos", "test"),56 ( u"Nagy", u"Dániel", "test"),57 ( u"Radó", u"Iván", "test"),58 ( u"Petrovszki", u"Gábor", "test"),59 ( u"Serfőző", u"Tamás", "test"),60 ( u"Szebenyi", u"Bálint", "test"),61 ( u"Zsebényi-Loksa", u"Gergely", "test") ]53 _authors = [ ("Váradi", "István", "prog_test"), 54 ("Galyassy", "Tamás", "negotiation"), 55 ("Kurják", "Ákos", "test"), 56 ("Nagy", "Dániel", "test"), 57 ("Radó", "Iván", "test"), 58 ("Petrovszki", "Gábor", "test"), 59 ("Serfőző", "Tamás", "test"), 60 ("Szebenyi", "Bálint", "test"), 61 ("Zsebényi-Loksa", "Gergely", "test") ] 62 62 63 63 def __init__(self, programDirectory, config): … … 1462 1462 secondaryMarkup = xstr("sendPIREP_unknown_sec") 1463 1463 else: 1464 print "PIREP sending failed", result1464 print("PIREP sending failed", result) 1465 1465 messageFormat = xstr("sendPIREP_failed") 1466 1466 secondaryMarkup = xstr("sendPIREP_failed_sec") … … 1686 1686 secondaryMarkup = xstr("sendPIREP_unknown_sec") 1687 1687 else: 1688 print "PIREP sending failed", result1688 print("PIREP sending failed", result) 1689 1689 messageFormat = xstr("sendPIREP_failed") 1690 1690 secondaryMarkup = xstr("sendPIREP_failed_sec") … … 1711 1711 1712 1712 for (timestampString, text) in self._logger.lines: 1713 description += unicode(formatFlightLogLine(timestampString, text))1713 description += str(formatFlightLogLine(timestampString, text)) 1714 1714 1715 1715 description += "\n\n" + ("=" * 40) … … 1798 1798 for index in hotkeys: 1799 1799 if index==self._pilotHotkeyIndex: 1800 print "gui.GUI._handleHotkeys: pilot hotkey pressed"1800 print("gui.GUI._handleHotkeys: pilot hotkey pressed") 1801 1801 self._flight.pilotHotkeyPressed() 1802 1802 elif index==self._checklistHotkeyIndex: 1803 print "gui.GUI._handleHotkeys: checklist hotkey pressed"1803 print("gui.GUI._handleHotkeys: checklist hotkey pressed") 1804 1804 self._flight.checklistHotkeyPressed() 1805 1805 else: 1806 print "gui.GUI._handleHotkeys: unhandled hotkey index:", index1806 print("gui.GUI._handleHotkeys: unhandled hotkey index:", index) 1807 1807 1808 1808 def _showManual(self, menuitem): -
src/mlx/gui/info.py
r846 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 from mlx.gui.delaycodes import DelayCodeTable -
src/mlx/gui/pirep.py
r855 r919 1 1 2 from common import *3 from dcdata import getTable4 from info import FlightInfo5 from flight import comboModel2 from .common import * 3 from .dcdata import getTable 4 from .info import FlightInfo 5 from .flight import comboModel 6 6 7 7 from mlx.pirep import PIREP -
src/mlx/gui/prefs.py
r738 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 from mlx.i18n import xstr … … 6 6 import mlx.config as config 7 7 8 import url parse8 import urllib.parse 9 9 10 10 #------------------------------------------------------------------------------ … … 63 63 64 64 self._hotkeyModel = gtk.ListStore(str) 65 for keyCode in range(ord("0"), ord("9")+1) + range(ord("A"), ord("Z")+1):65 for keyCode in list(range(ord("0"), ord("9")+1)) + list(range(ord("A"), ord("Z")+1)): 66 66 self._hotkeyModel.append([chr(keyCode)]) 67 67 … … 829 829 sensitive = False 830 830 try: 831 result = url parse.urlparse(self._updateURL.get_text())831 result = urllib.parse.urlparse(self._updateURL.get_text()) 832 832 sensitive = result.scheme!="" and (result.netloc + result.path)!="" 833 833 except: -
src/mlx/gui/statusbar.py
r679 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 import mlx.const as const -
src/mlx/gui/statusicon.py
r544 r919 1 1 2 from common import *2 from .common import * 3 3 4 4 import mlx.const as const … … 154 154 def _updateFlightStatus(self): 155 155 """Update the flight status.""" 156 stage = u"-" if self._stage is None \156 stage = "-" if self._stage is None \ 157 157 else xstr("flight_stage_" + const.stage2string(self._stage)) 158 158 … … 172 172 if self._noGoReason is not None: 173 173 rating = '<span foreground="red">' + rating + '</span>' 174 markup = u"MAVA Logger X %s\n\n%s: %s\n%s: %s" %\174 markup = "MAVA Logger X %s\n\n%s: %s\n%s: %s" %\ 175 175 (const.VERSION, xstr("statusicon_stage"), stage, 176 176 xstr("statusicon_rating"), rating) -
src/mlx/gui/timetable.py
r879 r919 4 4 5 5 from mlx.gui.common import * 6 from flightlist import ColumnDescriptor6 from .flightlist import ColumnDescriptor 7 7 from mlx.rpc import ScheduledFlight 8 8 … … 249 249 self._tooltips.set_tip(widget, "") 250 250 self._tooltips.disable() 251 except Exception ,e:252 print e251 except Exception as e: 252 print(e) 253 253 self._tooltips.set_tip(widget, "") 254 254 self._tooltips.disable() … … 656 656 typeFamilies.add(const.aircraftType2Family(aircraftType)) 657 657 658 for (typeFamily, checkButton) in self._typeFamilyButtons.ite ritems():658 for (typeFamily, checkButton) in self._typeFamilyButtons.items(): 659 659 checkButton.set_sensitive(typeFamily in typeFamilies) 660 660 … … 712 712 """Update the timetable list.""" 713 713 aircraftTypes = [] 714 for (aircraftFamily, button) in self._typeFamilyButtons.ite ritems():714 for (aircraftFamily, button) in self._typeFamilyButtons.items(): 715 715 if button.get_active(): 716 716 aircraftTypes += const.aircraftFamily2Types[aircraftFamily]
Note:
See TracChangeset
for help on using the changeset viewer.