Ignore:
Timestamp:
08/18/12 09:09:38 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The number of the crew and the passengers as well as all payload weights can be edited

File:
1 edited

Legend:

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

    r300 r303  
    228228            self._rating.set_text("%.1f %%" % (rating,))
    229229
     230        self._flownNumCrew.set_text("%d" % (pirep.numCrew,))
     231        self._flownNumPassengers.set_text("%d" % (pirep.numPassengers,))
     232        self._flownBagWeight.set_text("%.0f" % (pirep.bagWeight,))
    230233        self._flownCargoWeight.set_text("%.0f" % (pirep.cargoWeight,))
     234        self._flownMailWeight.set_text("%.0f" % (pirep.mailWeight,))
    231235        self._flightType.set_text(xstr("flighttype_" +
    232236                                       flightType2string(pirep.flightType)))
     
    526530        """Build the frame for the miscellaneous data."""       
    527531        (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_miscellaneous"))
    528        
    529         dataBox = gtk.HBox()
    530         mainBox.pack_start(dataBox, False, False, 0)
    531        
     532
     533        table = gtk.Table(3, 2)
     534        mainBox.pack_start(table, False, False, 0)
     535        table.set_row_spacings(4)
     536        table.set_col_spacings(8)       
     537       
     538        self._flownNumPassengers = \
     539            PIREPViewer.tableAttach(table, 0, 0,
     540                                    xstr("pirepView_numPassengers"),
     541                                    width = 4)
     542
     543        self._flownNumCrew = \
     544            PIREPViewer.tableAttach(table, 1, 0,
     545                                    xstr("pirepView_numCrew"),
     546                                    width = 3)
     547
     548        self._flownBagWeight = \
     549            PIREPViewer.tableAttach(table, 0, 1,
     550                                    xstr("pirepView_bagWeight"),
     551                                    width = 5)
     552
    532553        self._flownCargoWeight = \
    533             PIREPViewer.addLabeledData(dataBox,
    534                                        xstr("pirepView_cargoWeight"),
    535                                        width = 6)
     554            PIREPViewer.tableAttach(table, 1, 1,
     555                                    xstr("pirepView_cargoWeight"),
     556                                    width = 6)
     557
     558        self._flownMailWeight = \
     559            PIREPViewer.tableAttach(table, 2, 1,
     560                                    xstr("pirepView_mailWeight"),
     561                                    width = 5)
    536562
    537563        self._flightType = \
    538             PIREPViewer.addLabeledData(dataBox,
    539                                        xstr("pirepView_flightType"),
    540                                        width = 15)
     564            PIREPViewer.tableAttach(table, 0, 2,
     565                                    xstr("pirepView_flightType"),
     566                                    width = 15)
    541567           
    542568        self._online = \
    543             PIREPViewer.addLabeledData(dataBox,
    544                                        xstr("pirepView_online"),
    545                                        width = 5)
     569            PIREPViewer.tableAttach(table, 1, 2,
     570                                    xstr("pirepView_online"),
     571                                    width = 5)
    546572
    547573        PIREPViewer.addVFiller(mainBox)
Note: See TracChangeset for help on using the changeset viewer.