Helpviewer/History/HistoryManager.py

changeset 539
87f9bce38a44
parent 501
5c615a85241a
child 644
7c1c3abedf1c
--- a/Helpviewer/History/HistoryManager.py	Tue Aug 31 12:36:10 2010 +0200
+++ b/Helpviewer/History/HistoryManager.py	Tue Aug 31 13:23:27 2010 +0200
@@ -11,6 +11,8 @@
 from PyQt4.QtGui import *
 from PyQt4.QtWebKit import QWebHistoryInterface, QWebSettings
 
+from E5Gui import E5MessageBox
+
 from .HistoryModel import HistoryModel
 from .HistoryFilterModel import HistoryFilterModel
 from .HistoryTreeModel import HistoryTreeModel
@@ -336,7 +338,7 @@
         if not historyFile.exists():
             return
         if not historyFile.open(QIODevice.ReadOnly):
-            QMessageBox.warning(None,
+            E5MessageBox.warning(None,
                 self.trUtf8("Loading History"),
                 self.trUtf8("""<p>Unable to open history file <b>{0}</b>.<br/>"""
                             """Reason: {1}</p>""")\
@@ -412,7 +414,7 @@
             opened = f.open(QIODevice.Append)
         
         if not opened:
-            QMessageBox.warning(None,
+            E5MessageBox.warning(None,
                 self.trUtf8("Saving History"),
                 self.trUtf8("""<p>Unable to open history file <b>{0}</b>.<br/>"""
                             """Reason: {1}</p>""")\
@@ -432,13 +434,13 @@
         f.close()
         if saveAll:
             if historyFile.exists() and not historyFile.remove():
-                QMessageBox.warning(None,
+                E5MessageBox.warning(None,
                     self.trUtf8("Saving History"),
                     self.trUtf8("""<p>Error removing old history file <b>{0}</b>."""
                                 """<br/>Reason: {1}</p>""")\
                         .format(historyFile.fileName(), historyFile.errorString()))
             if not f.copy(historyFile.fileName()):
-                QMessageBox.warning(None,
+                E5MessageBox.warning(None,
                     self.trUtf8("Saving History"),
                     self.trUtf8("""<p>Error moving new history file over old one """
                                 """(<b>{0}</b>).<br/>Reason: {1}</p>""")\
@@ -461,4 +463,4 @@
         Private method to start the timer to recalculate the frequencies.
         """
         tomorrow = QDateTime(QDate.currentDate().addDays(1), QTime(3, 0))
-        self.__frequencyTimer.start(QDateTime.currentDateTime().secsTo(tomorrow) * 1000)
+        self.__frequencyTimer.start(QDateTime.currentDateTime().secsTo(tomorrow) * 1000)
\ No newline at end of file

eric ide

mercurial