Changeset 711:6a17a5922ee4 for src/mlx/gui
- Timestamp:
- 10/25/15 10:02:51 (9 years ago)
- Branch:
- cef
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r710 r711 1769 1769 xscale = 0.0, yscale = 0.0) 1770 1770 1771 table = gtk.Table( 7, 3)1771 table = gtk.Table(9, 3) 1772 1772 table.set_row_spacings(4) 1773 1773 table.set_col_spacings(16) … … 1849 1849 label.set_mnemonic_widget(self._landingRunway) 1850 1850 1851 label = gtk.Label(xstr("simbrief_climb_profile")) 1852 label.set_use_underline(True) 1853 label.set_alignment(0.0, 0.5) 1854 table.attach(label, 0, 1, 6, 7) 1855 1856 self._climbProfile = gtk.ComboBox() 1857 renderer = gtk.CellRendererText() 1858 self._climbProfile.pack_start(renderer, True) 1859 self._climbProfile.add_attribute(renderer, "text", 0) 1860 self._climbProfile.set_tooltip_text(xstr("simbrief_climb_profile_tooltip")) 1861 table.attach(self._climbProfile, 1, 2, 6, 7) 1862 label.set_mnemonic_widget(self._climbProfile) 1863 1864 label = gtk.Label(xstr("simbrief_cruise_profile")) 1865 label.set_use_underline(True) 1866 label.set_alignment(0.0, 0.5) 1867 table.attach(label, 0, 1, 7, 8) 1868 1869 self._cruiseProfile = gtk.ComboBox() 1870 renderer = gtk.CellRendererText() 1871 self._cruiseProfile.pack_start(renderer, True) 1872 self._cruiseProfile.add_attribute(renderer, "text", 0) 1873 self._cruiseProfile.set_tooltip_text(xstr("simbrief_cruise_profile_tooltip")) 1874 table.attach(self._cruiseProfile, 1, 2, 7, 8) 1875 label.set_mnemonic_widget(self._cruiseProfile) 1876 1877 label = gtk.Label(xstr("simbrief_descent_profile")) 1878 label.set_use_underline(True) 1879 label.set_alignment(0.0, 0.5) 1880 table.attach(label, 0, 1, 8, 9) 1881 1882 self._descentProfile = gtk.ComboBox() 1883 renderer = gtk.CellRendererText() 1884 self._descentProfile.pack_start(renderer, True) 1885 self._descentProfile.add_attribute(renderer, "text", 0) 1886 self._descentProfile.set_tooltip_text(xstr("simbrief_descent_profile_tooltip")) 1887 table.attach(self._descentProfile, 1, 2, 8, 9) 1888 label.set_mnemonic_widget(self._descentProfile) 1889 1851 1890 self.addCancelFlightButton() 1852 1891 … … 1875 1914 self._landingRunway.set_text("") 1876 1915 self._landingRunway.set_sensitive(True) 1916 1917 simBriefData = self._wizard.gui.flight.aircraft.simBriefData 1918 for (control, profiles) in [(self._climbProfile, 1919 simBriefData.climbProfiles), 1920 (self._cruiseProfile, 1921 simBriefData.cruiseProfiles), 1922 (self._descentProfile, 1923 simBriefData.descentProfiles)]: 1924 model = gtk.ListStore(str) 1925 for profile in profiles: 1926 model.append([profile]) 1927 control.set_model(model) 1928 control.set_sensitive(True) 1929 1930 self._climbProfile.set_active(0) 1931 self._cruiseProfile.set_active(0) 1932 self._descentProfile.set_active(0) 1877 1933 1878 1934 self._updateForwardButton() … … 1911 1967 self._takeoffRunway.set_sensitive(False) 1912 1968 self._landingRunway.set_sensitive(False) 1969 1970 self._climbProfile.set_sensitive(False) 1971 self._cruiseProfile.set_sensitive(False) 1972 self._descentProfile.set_sensitive(False) 1913 1973 1914 1974 self._wizard.gui.beginBusy("Calling SimBrief...") … … 2059 2119 plan["origrwy"] = self._takeoffRunway.get_text() 2060 2120 plan["destrwy"] = self._landingRunway.get_text() 2061 plan["climb"] = "250/300/78" # FIXME: query 2062 plan["cruise"] = "LRC" # FIXME: query 2063 plan["descent"] = "80/280/250" # FIXME: query 2121 2122 for (key, control) in [("climb", self._climbProfile), 2123 ("cruise", self._cruiseProfile), 2124 ("descent", self._descentProfile)]: 2125 model = control.get_model() 2126 active = control.get_active_iter() 2127 value = model.get_value(active, 0) 2128 plan[key] = value 2064 2129 2065 2130 return plan
Note:
See TracChangeset
for help on using the changeset viewer.