Changeset 1143:dbe6c974f227 for src/mlx/gui
- Timestamp:
- 04/21/24 14:16:47 (6 months ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 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() -
src/mlx/gui/weighthelp.py
r1142 r1143 67 67 mainBox.pack_start(alignment, True, True, 4) 68 68 69 row = 0 70 69 71 alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.0, 70 72 xscale = 0.0, yscale = 0.0) … … 76 78 label.set_justify(Gtk.Justification.CENTER) 77 79 alignment.add(label) 78 table.attach(alignment, 1, 2, 0,1)80 table.attach(alignment, 1, 2, row, row+1) 79 81 80 82 alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.0, … … 88 90 label.set_justify(Gtk.Justification.CENTER) 89 91 alignment.add(button) 90 table.attach(alignment, 3, 4, 0, 1) 92 table.attach(alignment, 3, 4, row, row+1) 93 94 row += 1 95 91 96 92 97 … … 95 100 xscale = 0.0, yscale = 0.0) 96 101 alignment.add(self._crewLabel) 97 table.attach(alignment, 0, 1, 1, 2)102 table.attach(alignment, 0, 1, row, row+1) 98 103 99 104 self._crewWeight = Gtk.Label("0") … … 101 106 xscale = 0.0, yscale = 0.0) 102 107 alignment.add(self._crewWeight) 103 table.attach(alignment, 1, 2, 1, 2) 104 105 table.attach(Gtk.Label("kg"), 2, 3, 1, 2) 108 table.attach(alignment, 1, 2, row, row+1) 109 110 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 111 112 row += 1 106 113 107 114 text = xstr("weighthelp_pax") % ("999",) … … 112 119 xscale = 0.0, yscale = 0.0) 113 120 alignment.add(self._paxLabel) 114 table.attach(alignment, 0, 1, 2, 3)121 table.attach(alignment, 0, 1, row, row+1) 115 122 116 123 self._paxWeight = Gtk.Label("20000") … … 118 125 xscale = 0.0, yscale = 0.0) 119 126 alignment.add(self._paxWeight) 120 table.attach(alignment, 1, 2, 2, 3) 121 122 table.attach(Gtk.Label("kg"), 2, 3, 2, 3) 123 127 table.attach(alignment, 1, 2, row, row+1) 128 129 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 130 131 row += 1 132 124 133 label = Gtk.Label(xstr("weighthelp_baggage")) 125 134 alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5, 126 135 xscale = 0.0, yscale = 0.0) 127 136 alignment.add(label) 128 table.attach(alignment, 0, 1, 3, 4)137 table.attach(alignment, 0, 1, row, row+1) 129 138 130 139 self._bagWeight = Gtk.Label("2000") … … 132 141 xscale = 0.0, yscale = 0.0) 133 142 alignment.add(self._bagWeight) 134 table.attach(alignment, 1, 2, 3, 4) 135 136 table.attach(Gtk.Label("kg"), 2, 3, 3, 4) 137 143 table.attach(alignment, 1, 2, row, row+1) 144 145 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 146 147 row += 1 148 138 149 label = Gtk.Label(xstr("weighthelp_cargo")) 139 150 alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5, 140 151 xscale = 0.0, yscale = 0.0) 141 152 alignment.add(label) 142 table.attach(alignment, 0, 1, 4, 5)153 table.attach(alignment, 0, 1, row, row+1) 143 154 144 155 self._cargoWeight = Gtk.Label("2000") … … 146 157 xscale = 0.0, yscale = 0.0) 147 158 alignment.add(self._cargoWeight) 148 table.attach(alignment, 1, 2, 4, 5) 149 150 table.attach(Gtk.Label("kg"), 2, 3, 4, 5) 151 159 table.attach(alignment, 1, 2, row, row+1) 160 161 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 162 163 row += 1 164 152 165 label = Gtk.Label(xstr("weighthelp_mail")) 153 166 alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5, 154 167 xscale = 0.0, yscale = 0.0) 155 168 alignment.add(label) 156 table.attach(alignment, 0, 1, 5, 6)169 table.attach(alignment, 0, 1, row, row+1) 157 170 158 171 self._mailWeight = Gtk.Label("2000") … … 160 173 xscale = 0.0, yscale = 0.0) 161 174 alignment.add(self._mailWeight) 162 table.attach(alignment, 1, 2, 5, 6) 163 164 table.attach(Gtk.Label("kg"), 2, 3, 5, 6) 165 166 table.attach(Gtk.HSeparator(), 1, 2, 6, 7) 175 table.attach(alignment, 1, 2, row, row+1) 176 177 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 178 179 row += 1 180 181 table.attach(Gtk.HSeparator(), 1, 2, row, row+1) 182 183 row += 1 167 184 168 185 label = Gtk.Label("<b>" + xstr("weighthelp_payload") + "</b>") … … 171 188 xscale = 0.0, yscale = 0.0) 172 189 alignment.add(label) 173 table.attach(alignment, 0, 1, 7, 8)190 table.attach(alignment, 0, 1, row, row+1) 174 191 175 192 self._payload = Gtk.Label("<b>32000</b>") … … 178 195 xscale = 0.0, yscale = 0.0) 179 196 alignment.add(self._payload) 180 table.attach(alignment, 1, 2, 7, 8)181 182 table.attach(Gtk.Label("kg"), 2, 3, 7, 8)197 table.attach(alignment, 1, 2, row, row+1) 198 199 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 183 200 184 201 self._fsPayload = Gtk.Label("<b>32001</b>") … … 187 204 xscale = 0.0, yscale = 0.0) 188 205 alignment.add(self._fsPayload) 189 table.attach(alignment, 3, 4, 7, 8) 190 191 table.attach(Gtk.Label("kg"), 4, 5, 7, 8) 206 table.attach(alignment, 3, 4, row, row+1) 207 208 table.attach(Gtk.Label("kg"), 4, 5, row, row+1) 209 210 row += 1 192 211 193 212 label = Gtk.Label(xstr("weighthelp_dow")) … … 196 215 xscale = 0.0, yscale = 0.0) 197 216 alignment.add(label) 198 table.attach(alignment, 0, 1, 8, 9)217 table.attach(alignment, 0, 1, row, row+1) 199 218 200 219 self._dow = Gtk.Label("35000") … … 202 221 xscale = 0.0, yscale = 0.0) 203 222 alignment.add(self._dow) 204 table.attach(alignment, 1, 2, 8, 9)205 206 table.attach(Gtk.Label("kg"), 2, 3, 8, 9)223 table.attach(alignment, 1, 2, row, row+1) 224 225 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 207 226 208 227 self._fsDOW = Gtk.Label("33012") … … 210 229 xscale = 0.0, yscale = 0.0) 211 230 alignment.add(self._fsDOW) 212 table.attach(alignment, 3, 4, 8, 9) 213 214 table.attach(Gtk.Label("kg"), 4, 5, 8, 9) 215 216 table.attach(Gtk.HSeparator(), 1, 2, 9, 10) 217 218 table.attach(Gtk.HSeparator(), 3, 4, 9, 10) 231 table.attach(alignment, 3, 4, row, row+1) 232 233 table.attach(Gtk.Label("kg"), 4, 5, row, row+1) 234 235 row += 1 236 237 table.attach(Gtk.HSeparator(), 1, 2, row, row+1) 238 239 table.attach(Gtk.HSeparator(), 3, 4, row, row+1) 240 241 row += 1 219 242 220 243 label = Gtk.Label("<b>" + xstr("weighthelp_zfw") + "</b>") … … 223 246 xscale = 0.0, yscale = 0.0) 224 247 alignment.add(label) 225 table.attach(alignment, 0, 1, 10, 11)248 table.attach(alignment, 0, 1, row, row+1) 226 249 227 250 self._zfw = Gtk.Label("<b>122000</b>") … … 230 253 xscale = 0.0, yscale = 0.0) 231 254 alignment.add(self._zfw) 232 table.attach(alignment, 1, 2, 10, 11)233 234 table.attach(Gtk.Label("kg"), 2, 3, 10, 11)255 table.attach(alignment, 1, 2, row, row+1) 256 257 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 235 258 236 259 self._fsZFW = Gtk.Label("<b>124000</b>") … … 239 262 xscale = 0.0, yscale = 0.0) 240 263 alignment.add(self._fsZFW) 241 table.attach(alignment, 3, 4, 10, 11) 242 243 table.attach(Gtk.Label("kg"), 4, 5, 10, 11) 244 245 table.attach(Gtk.HSeparator(), 0, 5, 11, 12) 246 264 table.attach(alignment, 3, 4, row, row+1) 265 266 table.attach(Gtk.Label("kg"), 4, 5, row, row+1) 267 268 row += 1 269 270 table.attach(Gtk.HSeparator(), 0, 5, row, row+1) 271 272 row += 1 273 247 274 label = Gtk.Label(xstr("weighthelp_gross")) 248 275 label.set_use_markup(True) … … 250 277 xscale = 0.0, yscale = 0.0) 251 278 alignment.add(label) 252 table.attach(alignment, 0, 1, 12, 13)279 table.attach(alignment, 0, 1, row, row+1) 253 280 254 281 self._fsGross = Gtk.Label("124000") … … 256 283 xscale = 0.0, yscale = 0.0) 257 284 alignment.add(self._fsGross) 258 table.attach(alignment, 3, 4, 12, 13) 259 260 table.attach(Gtk.Label("kg"), 4, 5, 12, 13) 285 table.attach(alignment, 3, 4, row, row+1) 286 287 table.attach(Gtk.Label("kg"), 4, 5, row, row+1) 288 289 row += 1 261 290 262 291 label = Gtk.Label(xstr("weighthelp_mzfw")) … … 265 294 xscale = 0.0, yscale = 0.0) 266 295 alignment.add(label) 267 table.attach(alignment, 0, 1, 13, 14)296 table.attach(alignment, 0, 1, row, row+1) 268 297 269 298 self._mzfw = Gtk.Label("35000") … … 271 300 xscale = 0.0, yscale = 0.0) 272 301 alignment.add(self._mzfw) 273 table.attach(alignment, 1, 2, 13, 14) 274 275 table.attach(Gtk.Label("kg"), 2, 3, 13, 14) 302 table.attach(alignment, 1, 2, row, row+1) 303 304 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 305 306 row += 1 276 307 277 308 label = Gtk.Label(xstr("weighthelp_mtow")) … … 280 311 xscale = 0.0, yscale = 0.0) 281 312 alignment.add(label) 282 table.attach(alignment, 0, 1, 14, 15)313 table.attach(alignment, 0, 1, row, row+1) 283 314 284 315 self._mtow = Gtk.Label("35000") … … 286 317 xscale = 0.0, yscale = 0.0) 287 318 alignment.add(self._mtow) 288 table.attach(alignment, 1, 2, 14, 15) 289 290 table.attach(Gtk.Label("kg"), 2, 3, 14, 15) 319 table.attach(alignment, 1, 2, row, row+1) 320 321 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 322 323 row += 1 291 324 292 325 label = Gtk.Label(xstr("weighthelp_mlw")) … … 295 328 xscale = 0.0, yscale = 0.0) 296 329 alignment.add(label) 297 table.attach(alignment, 0, 1, 15, 16)330 table.attach(alignment, 0, 1, row, row+1) 298 331 299 332 self._mlw = Gtk.Label("35000") … … 301 334 xscale = 0.0, yscale = 0.0) 302 335 alignment.add(self._mlw) 303 table.attach(alignment, 1, 2, 15, 16)304 305 table.attach(Gtk.Label("kg"), 2, 3, 15, 16)336 table.attach(alignment, 1, 2, row, row+1) 337 338 table.attach(Gtk.Label("kg"), 2, 3, row, row+1) 306 339 307 340 self.show_all()
Note:
See TracChangeset
for help on using the changeset viewer.