Changeset 860:4598546ff6b8


Ignore:
Timestamp:
06/18/17 11:56:02 (7 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The Save flight button is to the right of the flight list (re #308)

File:
1 edited

Legend:

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

    r859 r860  
    445445                                                  help, completedHelp = completedHelp)
    446446
     447        mainBox = gtk.HBox()
     448        mainBox.set_homogeneous(False)
     449
     450        leftVBox = gtk.VBox()
     451
     452        alignment = gtk.Alignment(xscale = 1.0)
     453        alignment.set_size_request(150, 0)
     454
     455        leftVBox.pack_start(alignment, False, False, 0)
     456
     457        mainBox.pack_start(leftVBox, True, True, 0)
     458
    447459        self._flightList = FlightList(popupMenuProducer =
    448460                                      self._createListPopupMenu,
     
    451463        self._flightList.connect("selection-changed", self._selectionChanged)
    452464
    453         self.setMainWidget(self._flightList)
     465        mainBox.pack_start(self._flightList, False, False, 8)
     466
     467        flightButtonBox = gtk.VBox()
     468
     469        alignment = gtk.Alignment(xscale = 1.0)
     470        alignment.set_size_request(150, 0)
     471        flightButtonBox.pack_start(alignment, False, False, 0)
     472
     473        saveButtonAlignment = gtk.Alignment(xscale=0.5, yscale=0.0,
     474                                            xalign=0.0, yalign=0.0)
     475        self._saveButton = gtk.Button(xstr("flightsel_save"))
     476        self._saveButton.set_use_underline(True)
     477        self._saveButton.set_sensitive(False)
     478        self._saveButton.set_tooltip_text(xstr("flightsel_save_tooltip"))
     479        self._saveButton.connect("clicked", self._saveClicked)
     480
     481        saveButtonAlignment.add(self._saveButton)
     482
     483        flightButtonBox.pack_start(saveButtonAlignment, False, False, 4)
     484
     485        mainBox.pack_start(flightButtonBox, True, True, 0)
     486
     487        self.setMainWidget(mainBox)
    454488
    455489        self._pendingButton = self.addButton(xstr("flightsel_pending"),
     
    458492                                             tooltip = xstr("flightsel_pending_tooltip"))
    459493
    460         self._saveButton = self.addButton(xstr("flightsel_save"),
    461                                           sensitive = False,
    462                                           clicked = self._saveClicked,
    463                                           tooltip = xstr("flightsel_save_tooltip"))
    464494        self._saveDialog = None
    465495
Note: See TracChangeset for help on using the changeset viewer.