Changeset 708:2e411a2d77a0 for src/mlx/gui
- Timestamp:
- 10/25/15 09:17:01 (9 years ago)
- Branch:
- cef
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r707 r708 1823 1823 table.attach(gtk.Label("kg"), 2, 3, 3, 4) 1824 1824 1825 label = gtk.Label(xstr("simbrief_takeoff_runway")) 1826 label.set_use_underline(True) 1827 label.set_alignment(0.0, 0.5) 1828 table.attach(label, 0, 1, 4, 5) 1829 1830 self._takeoffRunway = gtk.Entry() 1831 self._takeoffRunway.set_width_chars(10) 1832 self._takeoffRunway.set_tooltip_text(xstr("simbrief_takeoff_runway_tooltip")) 1833 self._takeoffRunway.connect("changed", self._upperChanged) 1834 table.attach(self._takeoffRunway, 1, 2, 4, 5) 1835 label.set_mnemonic_widget(self._takeoffRunway) 1836 1837 label = gtk.Label(xstr("simbrief_landing_runway")) 1838 label.set_use_underline(True) 1839 label.set_alignment(0.0, 0.5) 1840 table.attach(label, 0, 1, 5, 6) 1841 1842 self._landingRunway = gtk.Entry() 1843 self._landingRunway.set_width_chars(10) 1844 self._landingRunway.set_tooltip_text(xstr("simbrief_takeoff_runway_tooltip")) 1845 self._landingRunway.connect("changed", self._upperChanged) 1846 table.attach(self._landingRunway, 1, 2, 5, 6) 1847 label.set_mnemonic_widget(self._landingRunway) 1848 1825 1849 self.addCancelFlightButton() 1826 1850 … … 1843 1867 self._extraFuel.set_int(0) 1844 1868 self._extraFuel.set_sensitive(True) 1869 1870 self._takeoffRunway.set_text("") 1871 self._takeoffRunway.set_sensitive(True) 1872 1873 self._landingRunway.set_text("") 1874 self._landingRunway.set_sensitive(True) 1845 1875 1846 1876 self._updateForwardButton() … … 1877 1907 self._rememberButton.set_sensitive(False) 1878 1908 self._extraFuel.set_sensitive(False) 1909 self._takeoffRunway.set_sensitive(False) 1910 self._landingRunway.set_sensitive(False) 1879 1911 1880 1912 self._wizard.gui.beginBusy("Calling SimBrief...") … … 2023 2055 2024 2056 plan["addedfuel"] = str(self._extraFuel.get_int() / 1000.0) 2025 plan["origrwy"] = "" # FIXME: query2026 plan["destrwy"] = "" # FIXME: query2057 plan["origrwy"] = self._takeoffRunway.get_text() 2058 plan["destrwy"] = self._landingRunway.get_text() 2027 2059 plan["climb"] = "250/300/78" # FIXME: query 2028 2060 plan["cruise"] = "LRC" # FIXME: query … … 2030 2062 2031 2063 return plan 2064 2065 def _upperChanged(self, entry, arg = None): 2066 """Called when the value of some entry widget has changed and the value 2067 should be converted to uppercase.""" 2068 entry.set_text(entry.get_text().upper()) 2032 2069 2033 2070 #-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.