Changeset 584:d3f929e0eb3b for src/mlx
- Timestamp:
- 12/21/14 10:12:25 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r578 r584 2004 2004 buffer = self._metar.get_buffer() 2005 2005 if metar is None: 2006 buffer.set_text(xstr("briefing_metar_failed")) 2006 #buffer.set_text(xstr("briefing_metar_failed")) 2007 buffer.set_text("") 2008 self.setHelp(xstr("briefing_help_nometar")) 2007 2009 else: 2008 2010 buffer.set_text(metar) 2011 self._updateButton() 2009 2012 2010 2013 label = self._metarFrame.get_label_widget() … … 2033 2036 if not self._uppercasingMETAR: 2034 2037 self.metarEdited = True 2035 self._button.set_sensitive(buffer.get_text(buffer.get_start_iter(), 2036 buffer.get_end_iter(), 2037 True)!="") 2038 self._updateButton() 2038 2039 2039 2040 def _metarInserted(self, textBuffer, iter, text, length): … … 2051 2052 2052 2053 self._uppercasingMETAR = False 2054 2055 def _updateButton(self): 2056 """Update the sensitivity of the Next button based on the contents of 2057 the METAR field.""" 2058 buffer = self._metar.get_buffer() 2059 self._button.set_sensitive(buffer.get_text(buffer.get_start_iter(), 2060 buffer.get_end_iter(), 2061 True)!="") 2062 2053 2063 2054 2064 #-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.