Helpviewer/History/HistoryManager.py

changeset 3034
7ce719013078
parent 3020
542e97d4ecb3
child 3035
36e9f388958b
equal deleted inserted replaced
3033:58fe260e7469 3034:7ce719013078
385 E5MessageBox.warning( 385 E5MessageBox.warning(
386 None, 386 None,
387 self.trUtf8("Loading History"), 387 self.trUtf8("Loading History"),
388 self.trUtf8( 388 self.trUtf8(
389 """<p>Unable to open history file <b>{0}</b>.<br/>""" 389 """<p>Unable to open history file <b>{0}</b>.<br/>"""
390 """Reason: {1}</p>""")\ 390 """Reason: {1}</p>""")
391 .format(historyFile.fileName, historyFile.errorString())) 391 .format(historyFile.fileName, historyFile.errorString()))
392 return 392 return
393 393
394 history = [] 394 history = []
395 395
465 E5MessageBox.warning( 465 E5MessageBox.warning(
466 None, 466 None,
467 self.trUtf8("Saving History"), 467 self.trUtf8("Saving History"),
468 self.trUtf8( 468 self.trUtf8(
469 """<p>Unable to open history file <b>{0}</b>.<br/>""" 469 """<p>Unable to open history file <b>{0}</b>.<br/>"""
470 """Reason: {1}</p>""")\ 470 """Reason: {1}</p>""")
471 .format(f.fileName(), f.errorString())) 471 .format(f.fileName(), f.errorString()))
472 return 472 return
473 473
474 for index in range(first, -1, -1): 474 for index in range(first, -1, -1):
475 data = QByteArray() 475 data = QByteArray()
488 E5MessageBox.warning( 488 E5MessageBox.warning(
489 None, 489 None,
490 self.trUtf8("Saving History"), 490 self.trUtf8("Saving History"),
491 self.trUtf8( 491 self.trUtf8(
492 """<p>Error removing old history file <b>{0}</b>.""" 492 """<p>Error removing old history file <b>{0}</b>."""
493 """<br/>Reason: {1}</p>""")\ 493 """<br/>Reason: {1}</p>""")
494 .format(historyFile.fileName(), 494 .format(historyFile.fileName(),
495 historyFile.errorString())) 495 historyFile.errorString()))
496 if not f.copy(historyFile.fileName()): 496 if not f.copy(historyFile.fileName()):
497 E5MessageBox.warning( 497 E5MessageBox.warning(
498 None, 498 None,
499 self.trUtf8("Saving History"), 499 self.trUtf8("Saving History"),
500 self.trUtf8( 500 self.trUtf8(
501 """<p>Error moving new history file over old one """ 501 """<p>Error moving new history file over old one """
502 """(<b>{0}</b>).<br/>Reason: {1}</p>""")\ 502 """(<b>{0}</b>).<br/>Reason: {1}</p>""")
503 .format(historyFile.fileName(), f.errorString())) 503 .format(historyFile.fileName(), f.errorString()))
504 self.historySaved.emit() 504 self.historySaved.emit()
505 try: 505 try:
506 self.__lastSavedUrl = self.__history[0].url 506 self.__lastSavedUrl = self.__history[0].url
507 except IndexError: 507 except IndexError:

eric ide

mercurial