Changeset 830:d0e4741cda76
- Timestamp:
- 12/30/16 15:39:17 (8 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r828 r830 383 383 msgid "flightsel_prehelp_rep_rej" 384 384 msgstr "" 385 "<span color=\"red\">You have %d re jected and %d reported flight(s).</span>\n\n "385 "<span color=\"red\">You have %d reported and %d rejected flight(s).</span>\n\n " 386 386 387 387 msgid "flightsel_help" … … 2445 2445 2446 2446 msgid "pendflt_edit_reported" 2447 msgstr "_ View/Edit..."2447 msgstr "_Edit..." 2448 2448 2449 2449 msgid "pendflt_refly_reported" … … 2456 2456 msgstr "Rejected" 2457 2457 2458 msgid "pendflt_ edit_rejected"2459 msgstr " V_iew/Edit..."2458 msgid "pendflt_view_rejected" 2459 msgstr "_View..." 2460 2460 2461 2461 msgid "pendflt_refly_rejected" 2462 msgstr "R _efly"2462 msgstr "Re_fly" 2463 2463 2464 2464 msgid "pendflt_delete_rejected" -
locale/hu/mlx.po
r828 r830 383 383 msgid "flightsel_prehelp_rep_rej" 384 384 msgstr "" 385 "<span color=\"red\">%d visszautasított és %d jelentett járatod van.</span>\n\n "385 "<span color=\"red\">%d jelentett és %d visszautasított járatod van.</span>\n\n " 386 386 387 387 msgid "flightsel_help" … … 2473 2473 msgstr "Elutasított" 2474 2474 2475 msgid "pendflt_ edit_rejected"2476 msgstr " S_zerkesztés..."2475 msgid "pendflt_view_rejected" 2476 msgstr "_Megtekintés..." 2477 2477 2478 2478 msgid "pendflt_refly_rejected" -
src/mlx/gui/flightlist.py
r828 r830 243 243 ] 244 244 245 def __init__(self, which, wizard, window ):245 def __init__(self, which, wizard, window, pirepEditable = False): 246 246 """Construct the frame with the given title.""" 247 247 super(PendingFlightsFrame, self).__init__(xstr("pendflt_title_" + which)) … … 250 250 self._wizard = wizard 251 251 self._window = window 252 self._pirepEditable = pirepEditable 252 253 253 254 alignment = gtk.Alignment(xscale = 1.0, yscale = 1.0) … … 267 268 buttonBox = gtk.VBox() 268 269 269 self._editButton = gtk.Button(xstr("pendflt_edit_" + which)) 270 self._editButton = gtk.Button(xstr("pendflt_" + 271 ("edit" if pirepEditable else 272 "view") + "_" + which)) 270 273 self._editButton.set_sensitive(False) 274 self._editButton.connect("clicked", self._editClicked) 271 275 buttonBox.pack_start(self._editButton, False, False, 2) 272 276 … … 306 310 self._reflyButton.set_sensitive(len(selectedIndexes)>0) 307 311 self._deleteButton.set_sensitive(len(selectedIndexes)>0) 312 313 def _editClicked(self, button): 314 """Called when the Edit button is clicked.""" 315 gui = self._wizard.gui 316 gui.beginBusy(xstr("pendflt_pirep_busy")) 317 self.set_sensitive(False) 318 319 indexes = self._flightList.selectedIndexes 320 assert(len(indexes)==1) 321 322 flightID = self._flights[indexes[0]].id 323 gui.webHandler.getPIREP(self._pirepResultCallback, flightID) 324 325 def _pirepResultCallback(self, returned, result): 326 """Called when the PIREP query result is available.""" 327 gobject.idle_add(self._handlePIREPResult, returned, result) 328 329 def _handlePIREPResult(self, returned, result): 330 """Handle the refly result.""" 331 332 self.set_sensitive(True) 333 gui = self._wizard.gui 334 gui.endBusy() 335 336 if returned: 337 if self._pirepEditable: 338 gui.editPIREP(result.pirep) 339 else: 340 gui.viewPIREP(result.pirep) 308 341 309 342 def _reflyClicked(self, button): … … 408 441 vbox = gtk.VBox() 409 442 410 self._reportedFrame = PendingFlightsFrame("reported", wizard, self) 443 self._reportedFrame = PendingFlightsFrame("reported", wizard, self, 444 True) 411 445 vbox.pack_start(self._reportedFrame, True, True, 2) 412 446 -
src/mlx/gui/gui.py
r805 r830 1252 1252 else: 1253 1253 simulator.disableTimeSync() 1254 1255 def viewPIREP(self, pirep): 1256 """Display the PIREP viewer window with the given PIREP.""" 1257 self._pirepViewer.setPIREP(pirep) 1258 self._pirepViewer.show_all() 1259 self._pirepViewer.run() 1260 self._pirepViewer.hide() 1261 1262 def editPIREP(self, pirep): 1263 """Display the PIREP editor window and allow editing the PIREP.""" 1264 self.viewPIREP(pirep) 1254 1265 1255 1266 def _loadPIREP(self, menuItem):
Note:
See TracChangeset
for help on using the changeset viewer.