Helpviewer/History/HistoryManager.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3345
071afe8be2a1
child 3656
441956d8fce5
--- a/Helpviewer/History/HistoryManager.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/Helpviewer/History/HistoryManager.py	Thu Apr 03 23:05:31 2014 +0200
@@ -11,8 +11,9 @@
 
 import os
 
-from PyQt4.QtCore import pyqtSignal, QFileInfo, QDateTime, QDate, QTime, \
-    QUrl, QTimer, QFile, QIODevice, QByteArray, QDataStream, QTemporaryFile
+from PyQt4.QtCore import pyqtSignal, pyqtSlot, QFileInfo, QDateTime, QDate, \
+    QTime, QUrl, QTimer, QFile, QIODevice, QByteArray, QDataStream, \
+    QTemporaryFile
 from PyQt4.QtWebKit import QWebHistoryInterface, QWebSettings
 
 from E5Gui import E5MessageBox
@@ -341,6 +342,7 @@
         """
         self.setDaysToExpire(Preferences.getHelp("HistoryLimit"))
     
+    @pyqtSlot()
     def clear(self, period=0):
         """
         Public slot to clear the complete history.
@@ -386,8 +388,8 @@
         if not historyFile.open(QIODevice.ReadOnly):
             E5MessageBox.warning(
                 None,
-                self.trUtf8("Loading History"),
-                self.trUtf8(
+                self.tr("Loading History"),
+                self.tr(
                     """<p>Unable to open history file <b>{0}</b>.<br/>"""
                     """Reason: {1}</p>""")
                 .format(historyFile.fileName, historyFile.errorString()))
@@ -466,8 +468,8 @@
         if not opened:
             E5MessageBox.warning(
                 None,
-                self.trUtf8("Saving History"),
-                self.trUtf8(
+                self.tr("Saving History"),
+                self.tr(
                     """<p>Unable to open history file <b>{0}</b>.<br/>"""
                     """Reason: {1}</p>""")
                 .format(f.fileName(), f.errorString()))
@@ -489,8 +491,8 @@
             if historyFile.exists() and not historyFile.remove():
                 E5MessageBox.warning(
                     None,
-                    self.trUtf8("Saving History"),
-                    self.trUtf8(
+                    self.tr("Saving History"),
+                    self.tr(
                         """<p>Error removing old history file <b>{0}</b>."""
                         """<br/>Reason: {1}</p>""")
                     .format(historyFile.fileName(),
@@ -498,8 +500,8 @@
             if not f.copy(historyFile.fileName()):
                 E5MessageBox.warning(
                     None,
-                    self.trUtf8("Saving History"),
-                    self.trUtf8(
+                    self.tr("Saving History"),
+                    self.tr(
                         """<p>Error moving new history file over old one """
                         """(<b>{0}</b>).<br/>Reason: {1}</p>""")
                     .format(historyFile.fileName(), f.errorString()))

eric ide

mercurial