Changeset 584:d3f929e0eb3b


Ignore:
Timestamp:
12/21/14 10:12:25 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

If the METAR cannot be downloaded, the Next button cannot be pressed until the METAR is provided (re #235)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r564 r584  
    706706"provides different weather."
    707707
     708msgid "briefing_help_nometar"
     709msgstr ""
     710"Read carefully the NOTAMs below.\n"
     711"\n"
     712"<b>WARNING</b>: The METAR could not be downloaded.\n"
     713"Please, provide one."
     714
    708715msgid "briefing_chelp"
    709716msgstr ""
  • locale/hu/mlx.po

    r564 r584  
    705705"a METAR-t módosíthatod."
    706706
     707msgid "briefing_help_nometar"
     708msgstr ""
     709"Olvasd el figyelmesen a lenti NOTAM-okat.\n"
     710"\n"
     711"<b>FIGYELEM</b>: A METAR-t nem sikerült letölteni.\n"
     712"Kérlek, gépeld be azt."
     713
    707714msgid "briefing_chelp"
    708715msgstr ""
  • src/mlx/gui/flight.py

    r578 r584  
    20042004        buffer = self._metar.get_buffer()
    20052005        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"))
    20072009        else:
    20082010            buffer.set_text(metar)
     2011        self._updateButton()
    20092012
    20102013        label = self._metarFrame.get_label_widget()
     
    20332036        if not self._uppercasingMETAR:
    20342037            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()
    20382039
    20392040    def _metarInserted(self, textBuffer, iter, text, length):
     
    20512052
    20522053            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
    20532063
    20542064#-----------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.