Changeset 118:aaa1bc00131b


Ignore:
Timestamp:
04/28/12 15:14:39 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Implemented the gates tab

Location:
src/mlx
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r117 r118  
    360360        scrolledWindow.add(self._flightList)
    361361        scrolledWindow.set_size_request(400, -1)
     362        # FIXME: these should be constants in common.py
    362363        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
    363364                                  else gtk.POLICY_AUTOMATIC,
  • src/mlx/gui/gui.py

    r117 r118  
    99from mlx.gui.monitor import MonitorWindow
    1010from mlx.gui.weighthelp import WeightHelp
     11from mlx.gui.gates import FleetGateStatus
    1112
    1213import mlx.const as const
     
    101102        self._notebook.append_page(logWidget, label)
    102103
     104        self._fleetGateStatus = FleetGateStatus(self)
     105        label = gtk.Label(xstr("tab_gates"))
     106        label.set_use_underline(True)
     107        label.set_tooltip_text(xstr("tab_gates_tooltip"))
     108        self._notebook.append_page(self._fleetGateStatus, label)
     109       
    103110        (self._debugLogWidget, self._debugLogView) = self._buildLogWidget()
    104111        self._debugLogWidget.show_all()
  • src/mlx/i18n.py

    r117 r118  
    145145                 "The log of your flight that will be sent to the MAVA website")
    146146        self.add("tab_gates", "_Gates")       
     147        self.add("tab_gates_tooltip", "The status of the MAVA fleet and the gates at LHBP")       
    147148        self.add("tab_debug_log", "_Debug log")
    148149        self.add("tab_debug_log_tooltip", "Log with debugging information.")
     
    506507        self.add("weighthelp_mlw", "MLW:")
    507508        self.add("weighthelp_busy", "Querying weight data...")
     509
     510        self.add("gates_fleet_title", "Fl_eet")
     511        self.add("gates_gates_title", "LHBP gates")
     512        self.add("gates_tailno", "Tail nr.")
     513        self.add("gates_planestatus", "Status")
     514        self.add("gates_refresh", "_Refresh data")
     515        self.add("gates_refresh_tooltip",
     516                 "Click this button to refresh the status data above")
     517        self.add("gates_planes_tooltip",
     518                 "This table lists all the planes in the MAVA fleet and their "
     519                 "last known location. If a plane is conflicting with another "
     520                 "because of occupying the same gate its data is displayed in "
     521                 "<b><span foreground=\"red\">red</span></b>.")
     522        self.add("gates_gates_tooltip",
     523                 "The numbers of the gates occupied by MAVA planes are "
     524                 "displayed in "
     525                 '<b><span foreground="orange">yellow</span></b>, '
     526                 "while available gates in black.")
     527        self.add("gates_plane_away", "AWAY")
     528        self.add("gates_plane_parking", "PARKING")
     529        self.add("gates_plane_unknown", "UNKNOWN")
    508530                 
    509531#------------------------------------------------------------------------------
     
    537559        self.add("tab_log_tooltip",
    538560                 "A járat naplója, amit majd el lehet küldeni a MAVA szerverére")
     561        self.add("tab_gates", "_Kapuk")       
     562        self.add("tab_gates_tooltip", "A MAVA flotta és LHBP kapuinak állapota")       
    539563        self.add("tab_debug_log", "_Debug napló")
    540564        self.add("tab_debug_log_tooltip",
    541565                 "Hibakereséshez használható információkat tartalmazó napló.")
    542         self.add("tab_gates", "_Kapuk")       
    543566
    544567        self.add("conn_failed", "Nem tudtam kapcsolódni a szimulátorhoz.")
     
    906929        self.add("weighthelp_busy", "A tömegadatok lekérdezése...")
    907930
     931        self.add("gates_fleet_title", "_Flotta")
     932        self.add("gates_gates_title", "LHBP kapuk")
     933        self.add("gates_tailno", "Lajstromjel")
     934        self.add("gates_planestatus", "Állapot")
     935        self.add("gates_refresh", "_Adatok frissítése")
     936        self.add("gates_refresh_tooltip",
     937                 "Kattints erre a gombra a fenti adatok frissítéséhez")
     938        self.add("gates_planes_tooltip",
     939                 "Ez a táblázat tartalmazza a MAVA flottája összes "
     940                 "repülőgépének lajstromjelét és utolsó ismert helyét. "
     941                 "Ha egy repülőgép olyan kapun áll, amelyet másik gép is "
     942                 "elfoglal, akkor annak a repülőgépnek az adatai "
     943                 "<b><span foreground=\"red\">piros</span></b> "
     944                 "színnel jelennek meg.")
     945        self.add("gates_gates_tooltip",
     946                 "A MAVA repülőgépei által elfoglalt kapuk száma "
     947                 '<b><span foreground="orange">sárga</span></b> színnel,'
     948                 "a többié feketén jelenik meg.")
     949        self.add("gates_plane_away", "TÁVOL")
     950        self.add("gates_plane_parking", "PARKOL")
     951        self.add("gates_plane_unknown", "ISMERETLEN")
     952                 
    908953#------------------------------------------------------------------------------
    909954
  • src/mlx/web.py

    r106 r118  
    159159            plane = Plane(line)
    160160            if plane.tailNumber is not None:
    161                 self._planes[plane.tailNumber] = plane       
     161                self._planes[plane.tailNumber] = plane
    162162
    163163    def isGateConflicting(self, plane):
     
    179179                gateNumbers.add(p.gateNumber)
    180180        return gateNumbers
     181
     182    def __iter__(self):
     183        """Get an iterator over the planes."""
     184        for plane in self._planes.itervalues():
     185            yield plane
    181186       
    182187    def __getitem__(self, tailNumber):
Note: See TracChangeset for help on using the changeset viewer.