Changeset 1143:dbe6c974f227 for src/mlx/gui/flight.py
- Timestamp:
- 04/21/24 14:16:47 (2 weeks ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r1142 r1143 2434 2434 self.setMainWidget(alignment) 2435 2435 2436 row = 0 2437 2436 2438 self._crewLabel = label = Gtk.Label(xstr("payload_crew")) 2437 2439 label.set_use_underline(True) 2438 2440 label.set_alignment(0.0, 0.5) 2439 table.attach(label, 0, 1, 0,1)2441 table.attach(label, 0, 1, row, row+1) 2440 2442 2441 2443 self._numCockpitCrew = Gtk.Label() … … 2452 2454 crewBox.set_halign(Gtk.Align.END) 2453 2455 2454 table.attach(crewBox, 1, 2, 0,1)2456 table.attach(crewBox, 1, 2, row, row+1) 2455 2457 label.set_mnemonic_widget(self._numCabinCrew) 2456 2458 2457 2459 label = Gtk.Label(xstr("payload_crew_info")) 2458 2460 label.set_halign(Gtk.Align.START) 2459 table.attach(label, 2, 3, 0, 1) 2461 table.attach(label, 2, 3, row, row+1) 2462 2463 row += 1 2460 2464 2461 2465 self._paxLabel = label = Gtk.Label(xstr("payload_pax")) 2462 2466 label.set_use_underline(True) 2463 2467 label.set_alignment(0.0, 0.5) 2464 table.attach(label, 0, 1, 1, 2)2468 table.attach(label, 0, 1, row, row+1) 2465 2469 2466 2470 self._numPassengers = IntegerEntry(defaultValue = 0) … … 2486 2490 paxBox.pack_start(self._numInfants, False, False, 0) 2487 2491 2488 table.attach(paxBox, 1, 2, 1, 2)2492 table.attach(paxBox, 1, 2, row, row+1) 2489 2493 label.set_mnemonic_widget(self._numPassengers) 2490 2494 2491 2495 label = Gtk.Label(xstr("payload_pax_info")) 2492 2496 label.set_halign(Gtk.Align.START) 2493 table.attach(label, 2, 3, 1, 2) 2497 table.attach(label, 2, 3, row, row+1) 2498 2499 row += 1 2494 2500 2495 2501 label = Gtk.Label(xstr("payload_bag")) 2496 2502 label.set_use_underline(True) 2497 2503 label.set_alignment(0.0, 0.5) 2498 table.attach(label, 0, 1, 2, 3)2504 table.attach(label, 0, 1, row, row+1) 2499 2505 2500 2506 self._bagWeight = IntegerEntry(defaultValue = 0) … … 2504 2510 self._bagWeight.set_hexpand(False) 2505 2511 self._bagWeight.set_halign(Gtk.Align.END) 2506 table.attach(self._bagWeight, 1, 2, 2, 3)2512 table.attach(self._bagWeight, 1, 2, row, row+1) 2507 2513 label.set_mnemonic_widget(self._bagWeight) 2508 2514 2509 2515 label = Gtk.Label("kg") 2510 2516 label.set_halign(Gtk.Align.START) 2511 table.attach(label, 2, 3, 2, 3) 2517 table.attach(label, 2, 3, row, row+1) 2518 2519 row += 1 2512 2520 2513 2521 label = Gtk.Label(xstr("payload_cargo")) 2514 2522 label.set_use_underline(True) 2515 2523 label.set_alignment(0.0, 0.5) 2516 table.attach(label, 0, 1, 3, 4)2524 table.attach(label, 0, 1, row, row+1) 2517 2525 2518 2526 self._cargoWeight = IntegerEntry(defaultValue = 0) … … 2522 2530 self._cargoWeight.set_hexpand(False) 2523 2531 self._cargoWeight.set_halign(Gtk.Align.END) 2524 table.attach(self._cargoWeight, 1, 2, 3, 4)2532 table.attach(self._cargoWeight, 1, 2, row, row+1) 2525 2533 label.set_mnemonic_widget(self._cargoWeight) 2526 2534 2527 2535 label = Gtk.Label("kg") 2528 2536 label.set_halign(Gtk.Align.START) 2529 table.attach(label, 2, 3, 3, 4) 2537 table.attach(label, 2, 3, row, row+1) 2538 2539 row += 1 2530 2540 2531 2541 label = Gtk.Label(xstr("payload_mail")) 2532 2542 label.set_use_underline(True) 2533 2543 label.set_alignment(0.0, 0.5) 2534 table.attach(label, 0, 1, 4, 5)2544 table.attach(label, 0, 1, row, row+1) 2535 2545 2536 2546 self._mailWeight = IntegerEntry(defaultValue = 0) … … 2540 2550 self._mailWeight.set_hexpand(False) 2541 2551 self._mailWeight.set_halign(Gtk.Align.END) 2542 table.attach(self._mailWeight, 1, 2, 4, 5)2552 table.attach(self._mailWeight, 1, 2, row, row+1) 2543 2553 label.set_mnemonic_widget(self._mailWeight) 2544 2554 2545 2555 label = Gtk.Label("kg") 2546 2556 label.set_halign(Gtk.Align.START) 2547 table.attach(label, 2, 3, 4, 5) 2557 table.attach(label, 2, 3, row, row+1) 2558 2559 row += 1 2548 2560 2549 2561 label = Gtk.Label("<b>" + xstr("payload_zfw") + "</b>") 2550 2562 label.set_alignment(0.0, 0.5) 2551 2563 label.set_use_markup(True) 2552 table.attach(label, 0, 1, 5, 6)2564 table.attach(label, 0, 1, row, row+1) 2553 2565 2554 2566 self._calculatedZFW = Gtk.Label() 2555 2567 self._calculatedZFW.set_width_chars(6) 2556 2568 self._calculatedZFW.set_alignment(1.0, 0.5) 2557 table.attach(self._calculatedZFW, 1, 2, 5, 6)2569 table.attach(self._calculatedZFW, 1, 2, row, row+1) 2558 2570 2559 2571 label = Gtk.Label("kg") 2560 2572 label.set_halign(Gtk.Align.START) 2561 table.attach(label, 2, 3, 5, 6) 2573 table.attach(label, 2, 3, row, row+1) 2574 2575 row += 1 2562 2576 2563 2577 self._zfwButton = Gtk.Button(xstr("payload_fszfw")) … … 2565 2579 self._zfwButton.connect("clicked", self._zfwRequested) 2566 2580 self._zfwButton.set_tooltip_text(xstr("payload_fszfw_tooltip")) 2567 table.attach(self._zfwButton, 0, 1, 6, 7)2581 table.attach(self._zfwButton, 0, 1, row, row+1) 2568 2582 2569 2583 self._simulatorZFW = Gtk.Label("-") 2570 2584 self._simulatorZFW.set_width_chars(6) 2571 2585 self._simulatorZFW.set_alignment(1.0, 0.5) 2572 table.attach(self._simulatorZFW, 1, 2, 6, 7)2586 table.attach(self._simulatorZFW, 1, 2, row, row+1) 2573 2587 self._simulatorZFWValue = None 2574 2588 2575 2589 label = Gtk.Label("kg") 2576 2590 label.set_halign(Gtk.Align.START) 2577 table.attach(label, 2, 3, 6, 7)2591 table.attach(label, 2, 3, row, row+1) 2578 2592 2579 2593 self.addCancelFlightButton()
Note:
See TracChangeset
for help on using the changeset viewer.