Changeset 954:ad190b3a88c7
- Timestamp:
- 05/12/19 07:15:26 (6 years ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/bugreport.py
r919 r954 126 126 descriptionBuffer.get_end_iter(), 127 127 False) 128 description = text2unicode(description)129 128 self.set_sensitive(False) 130 self._gui.sendBugReport( text2unicode(self._summary.get_text()),129 self._gui.sendBugReport(self._summary.get_text(), 131 130 description, 132 text2unicode(self._email.get_text()),131 self._email.get_text(), 133 132 self._bugReportSent) 134 133 -
src/mlx/gui/checklist.py
r919 r954 204 204 numSelected = 0 205 205 for path in fileChooser.get_filenames(): 206 path = text2unicode(path)207 206 numSelected += 1 208 207 if os.path.isfile(path): numFiles += 1 … … 213 212 """Called when the Add button is clicked.""" 214 213 for path in self._fileChooser.get_filenames(): 215 path = text2unicode(path)216 214 self._fileListModel.append([os.path.basename(path), 217 215 path]) -
src/mlx/gui/common.py
r926 r954 110 110 111 111 pixbuf_new_from_file = gdk.pixbuf_new_from_file 112 113 def text2unicode(text):114 """Convert the given text, returned by a Gtk widget, to Unicode."""115 return str(text)116 117 def text2str(text):118 """Convert the given text, returned by xstr to a string."""119 return str(text)120 112 121 113 else: # pygobject … … 199 191 import codecs 200 192 _utf8Decoder = codecs.getdecoder("utf-8") 201 202 def text2unicode(str):203 """Convert the given text, returned by a Gtk widget, to Unicode."""204 return _utf8Decoder(str)[0]205 206 def text2str(text):207 """Convert the given text, returned by xstr to a string."""208 return _utf8Decoder(text)[0]209 193 210 194 import cairo -
src/mlx/gui/flight.py
r919 r954 648 648 649 649 if response==RESPONSETYPE_OK: 650 fileName = text2unicode(dialog.get_filename())650 fileName = dialog.get_filename() 651 651 print("Saving", fileName) 652 652 try: … … 939 939 940 940 if response==RESPONSETYPE_OK: 941 fileName = text2unicode(dialog.get_filename())941 fileName = dialog.get_filename() 942 942 print("Loading", fileName) 943 943 bookedFlight = web.BookedFlight() … … 4740 4740 self._lastSavePath = os.path.join(self._wizard.gui.config.pirepDirectory, 4741 4741 self._getDefaultPIREPName()) 4742 self._lastSavePath = text2unicode(self._lastSavePath)4742 self._lastSavePath = self._lastSavePath 4743 4743 self._savePIREP(page, automatic = True) 4744 4744 … … 4777 4777 4778 4778 if result==RESPONSETYPE_OK: 4779 self._lastSavePath = text2unicode(dialog.get_filename())4779 self._lastSavePath = dialog.get_filename() 4780 4780 self._savePIREP(page) 4781 4781 … … 4797 4797 type = MESSAGETYPE_ERROR 4798 4798 message = xstr("finish_save_failed") 4799 secondary = xstr("finish_save_failed_sec") % ( text2unicode(error),)4799 secondary = xstr("finish_save_failed_sec") % (error,) 4800 4800 else: 4801 4801 type = MESSAGETYPE_INFO -
src/mlx/gui/gui.py
r946 r954 1492 1492 1493 1493 if result==RESPONSETYPE_OK: 1494 self._lastLoadedPIREP = text2unicode(dialog.get_filename())1494 self._lastLoadedPIREP = dialog.get_filename() 1495 1495 1496 1496 pirep = PIREP.load(self._lastLoadedPIREP) -
src/mlx/gui/info.py
r919 r954 108 108 """Get the comments.""" 109 109 buffer = self._comments.get_buffer() 110 return text2unicode(buffer.get_text(buffer.get_start_iter(),111 buffer.get_end_iter(), True))110 return buffer.get_text(buffer.get_start_iter(), 111 buffer.get_end_iter(), True) 112 112 113 113 @comments.setter -
src/mlx/gui/prefs.py
r919 r954 296 296 self._vsSmoothingLength) 297 297 config.useSimBrief = self._useSimBrief.get_active() 298 config.pirepDirectory = text2unicode(self._pirepDirectory.get_text())298 config.pirepDirectory = self._pirepDirectory.get_text() 299 299 config.pirepAutoSave = self._pirepAutoSave.get_active() 300 300 … … 565 565 566 566 if result==RESPONSETYPE_OK: 567 self._pirepDirectory.set_text( text2unicode(dialog.get_filename()))567 self._pirepDirectory.set_text(dialog.get_filename()) 568 568 569 569 def _pirepDirectoryChanged(self, entry):
Note:
See TracChangeset
for help on using the changeset viewer.