Changeset 762:c49eee53b7c5
- Timestamp:
- 02/14/16 14:31:32 (9 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r759 r762 2282 2282 msgid "register_result_title" 2283 2283 msgstr "Registration" 2284 2285 msgid "student_title" 2286 msgstr "Student" 2287 2288 msgid "student_help" 2289 msgstr "" 2290 "You can initiate the entrace exam\n" 2291 "and the check flight here." 2292 2293 msgid "student_entry_exam" 2294 msgstr "Take the _entry exam" 2295 2296 msgid "student_entry_exam_tooltip" 2297 msgstr "" 2298 "Click this button to go to MAVA's training website and take " 2299 "the theoretical entry exam. If this button is greyed out, " 2300 "it means that you have already passed the exam earlier. Note, that " 2301 "its status is updated only a few minutes after passing the exam." -
locale/hu/mlx.po
r759 r762 2298 2298 msgid "register_result_title" 2299 2299 msgstr "Regisztráció" 2300 2301 msgid "student_title" 2302 msgstr "Tanuló" 2303 2304 msgid "student_help" 2305 msgstr "" 2306 "Itt intézheted a felvételi elméleti vizsgát\n" 2307 "és az ellenőrző repülést." 2308 2309 msgid "student_entry_exam" 2310 msgstr "_Elméleti vizsga" 2311 2312 msgid "student_entry_exam_tooltip" 2313 msgstr "" 2314 "Erre a gombra kattintva a MAVA oktatási weboldalára kerülsz " 2315 "böngésződben és kitöltheted az elméleti vizsga tesztjét. " 2316 "Ha a gomb inaktív, a vizsgát korábban már sikeresen teljesítetted. " 2317 "A gomb állapota csak néhány perccel a vizsga teljesítése után frissül." -
src/mlx/gui/flight.py
r760 r762 1367 1367 class StudentPage(Page): 1368 1368 """A page displayed to students after logging in.""" 1369 _entryExamStatusQueryInterval = 60*1000 1370 1369 1371 def __init__(self, wizard): 1370 1372 """Construct the student page.""" … … 1372 1374 xstr("student_title"), 1373 1375 xstr("student_help")) 1376 1377 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 1378 xscale = 0.5, yscale = 0.0) 1379 1380 table = gtk.Table(1, 1) 1381 table.set_row_spacings(4) 1382 table.set_col_spacings(32) 1383 alignment.add(table) 1384 self.setMainWidget(alignment) 1385 1386 row = 0 1387 1388 buttonAlignment = gtk.Alignment(xalign=0.0, xscale=1.0) 1389 button = self._entryExamButton = gtk.Button(xstr("student_entry_exam")) 1390 button.set_use_underline(True) 1391 button.connect("clicked", self._entryExamClicked) 1392 button.set_tooltip_text(xstr("student_entry_exam_tooltip")) 1393 1394 buttonAlignment.add(button) 1395 table.attach(buttonAlignment, 0, 1, 0, 1) 1396 1397 def activate(self): 1398 """Activate the student page.""" 1399 loginResult = self._wizard.loginResult 1400 self._entryExamButton.set_sensitive(not loginResult.entryExamPassed) 1401 self._getEntryExamStatus() 1402 1403 def _entryExamClicked(self, button): 1404 """Called when the entry exam button is clicked.""" 1405 1406 def _getEntryExamStatus(self): 1407 """Initiate the query of the entry exam status after the interval.""" 1408 gobject.timeout_add(StudentPage._entryExamStatusQueryInterval, 1409 lambda: self._wizard.gui.webHandler. \ 1410 getEntryExamStatus(self._entryExamStatusCallback)) 1411 1412 def _entryExamStatusCallback(self, returned, result): 1413 """Called when the entry exam status is available.""" 1414 gobject.idle_add(self._handleEntryExamStatus, returned, result) 1415 1416 def _handleEntryExamStatus(self, returned, result): 1417 """Called when the entry exam status is availabe.""" 1418 print "_handleEntryExamStatus", returned, result 1419 if returned: 1420 self._entryExamButton.set_sensitive(not result.entryExamPassed) 1421 self._getEntryExamStatus() 1374 1422 1375 1423 #-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.