Changeset 401:15ad3c16ee11 for src/mlx/gui
- Timestamp:
- 12/27/12 08:04:59 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r373 r401 96 96 """Convert the given text, returned by xstr to a string.""" 97 97 return str(text) 98 98 99 else: 99 100 print "Using PyGObject" … … 106 107 from gi.repository import Pango as pango 107 108 appIndicator = True 108 109 109 110 MESSAGETYPE_ERROR = gtk.MessageType.ERROR 110 111 MESSAGETYPE_QUESTION = gtk.MessageType.QUESTION … … 156 157 import codecs 157 158 _utf8Decoder = codecs.getdecoder("utf-8") 158 159 159 160 def text2unicode(str): 160 161 """Convert the given text, returned by a Gtk widget, to Unicode.""" … … 182 183 self._noGoReason = None 183 184 self._updateFlightStatus() 184 185 185 186 def setStage(self, stage): 186 187 """Set the stage of the flight.""" … … 233 234 self.emit("integer-changed", self._currentInteger) 234 235 self._set_text() 235 236 236 237 def _handle_changed(self, widget): 237 238 """Handle the changed signal.""" … … 253 254 else str(self._currentInteger)) 254 255 self._selfSetting = False 255 256 256 257 #------------------------------------------------------------------------------ 257 258 -
src/mlx/gui/flight.py
r393 r401 512 512 flight.writeIntoFile(f) 513 513 except Exception, e: 514 print "Failed to save flight:", str(e)514 print "Failed to save flight:", util.utf2unicode(str(e)) 515 515 dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow, 516 516 type = MESSAGETYPE_ERROR, … … 555 555 self._addFlight(bookedFlight) 556 556 except Exception, e: 557 print "Failed to load flight:", str(e)557 print "Failed to load flight:", util.utf2unicode(str(e)) 558 558 dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow, 559 559 type = MESSAGETYPE_ERROR,
Note:
See TracChangeset
for help on using the changeset viewer.