Changeset 684:64c3835e1ef4


Ignore:
Timestamp:
10/18/15 14:50:13 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
cef
Phase:
public
Message:

The usage of SimBrief can be enabled/disabled from the configuration (re #279).

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r634 r684  
    14381438msgstr "sec."
    14391439
     1440msgid "prefs_useSimBrief"
     1441msgstr "Use Sim_Brief"
     1442
     1443msgid "prefs_useSimBrief_tooltip"
     1444msgstr ""
     1445"If enabled, the SimBrief dispatching system will be "
     1446"used to create your briefing.\n"
     1447"You will need a SimBrief user name and password."
     1448
    14401449msgid "prefs_pirepDirectory"
    14411450msgstr "_PIREP directory:"
  • locale/hu/mlx.po

    r634 r684  
    14791479msgstr "másodpercig."
    14801480
     1481msgid "prefs_useSimBrief"
     1482msgstr "Sim_Brief használata"
     1483
     1484msgid "prefs_useSimBrief_tooltip"
     1485msgstr ""
     1486"Ha ezt bejelölöd, az eligazítás elkészítéséhez a "
     1487"SimBrief rendszert használja a program.\n"
     1488"Szükséged lesz SimBrief felhasználónévre és jelszóra."
     1489
    14811490msgid "prefs_pirepDirectory"
    14821491msgstr "_PIREP-ek könyvtára:"
  • src/mlx/config.py

    r652 r684  
    233233        self._vsSmoothingLength = -2
    234234
     235        self._useSimBrief = False
     236
    235237        self._pirepDirectory = None
    236238        self._pirepAutoSave = False
     
    442444        if vsSmoothingLength!=self._vsSmoothingLength:
    443445            self._vsSmoothingLength = vsSmoothingLength
     446            self._modified = True
     447
     448    @property
     449    def useSimBrief(self):
     450        """Check if SimBrief should be used."""
     451        return self._useSimBrief
     452
     453    @useSimBrief.setter
     454    def useSimBrief(self, useSimBrief):
     455        """Check if SimBrief should be used."""
     456        if self._useSimBrief != useSimBrief:
     457            self._useSimBrief = useSimBrief
    444458            self._modified = True
    445459
     
    678692                                                "vsSmoothingLength",
    679693                                                -2))
     694
     695        self._useSimBrief = self._getBoolean(config, "general",
     696                                             "useSimBrief", False)
     697
    680698        self._pirepDirectory = self._get(config, "general",
    681699                                         "pirepDirectory", None)
     
    758776                   str(self._vsSmoothingLength))
    759777
     778        config.set("general", "useSimBrief",
     779                   "yes" if self._useSimBrief else "no")
     780
    760781        if self._pirepDirectory is not None:
    761782            config.set("general", "pirepDirectory", self._pirepDirectory)
     
    907928        print "  vsSmoothingLength:", self._vsSmoothingLength
    908929
     930        print "  useSimBrief:", self._useSimBrief
     931
    909932        print "  pirepDirectory:", self._pirepDirectory
    910933        print "  pirepAutoSave:", self._pirepAutoSave
  • src/mlx/gui/prefs.py

    r392 r684  
    243243        self._setSmoothing(self._vsSmoothingEnabled, self._vsSmoothingLength,
    244244                           config.vsSmoothingLength)
     245
     246        self._useSimBrief.set_active(config.useSimBrief)
    245247
    246248        pirepDirectory = config.pirepDirectory
     
    291293        config.vsSmoothingLength = self._getSmoothing(self._vsSmoothingEnabled,
    292294                                                       self._vsSmoothingLength)
     295        config.useSimBrief = self._useSimBrief.get_active()
    293296        config.pirepDirectory = text2unicode(self._pirepDirectory.get_text())
    294297        config.pirepAutoSave = self._pirepAutoSave.get_active()
     
    406409                                    xstr("prefs_vsSmoothingEnabledTooltip"))
    407410        simulatorBox.pack_start(vsSmoothingBox, False, False, 4)
     411
     412        self._useSimBrief = gtk.CheckButton(xstr("prefs_useSimBrief"))
     413        self._useSimBrief.set_use_underline(True)
     414        self._useSimBrief.set_tooltip_text(xstr("prefs_useSimBrief_tooltip"))
     415        mainBox.pack_start(self._useSimBrief, False, False, 0)
    408416
    409417        pirepBox = gtk.HBox()
Note: See TracChangeset for help on using the changeset viewer.