Helpviewer/SiteInfo/SiteInfoDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3058
0a02c433f52d
--- a/Helpviewer/SiteInfo/SiteInfoDialog.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Helpviewer/SiteInfo/SiteInfoDialog.py	Fri Oct 18 23:00:41 2013 +0200
@@ -12,17 +12,17 @@
 import os
 
 from PyQt4.QtCore import pyqtSlot, QUrl, Qt, QFile, qVersion
-from PyQt4.QtGui import QDialog, QTreeWidgetItem, QPixmap, QGraphicsScene, QMenu, \
-    QCursor, QApplication, QListWidgetItem
+from PyQt4.QtGui import QDialog, QTreeWidgetItem, QPixmap, QGraphicsScene, \
+    QMenu, QCursor, QApplication, QListWidgetItem
 from PyQt4.QtWebKit import QWebSettings
 
 from E5Gui import E5MessageBox, E5FileDialog
 
 try:
-    from .Ui_SiteInfoDialog import Ui_SiteInfoDialog        # __IGNORE_WARNING__
+    from .Ui_SiteInfoDialog import Ui_SiteInfoDialog       # __IGNORE_WARNING__
     SSL = True
 except ImportError:
-    from .Ui_SiteInfoNoSslDialog import Ui_SiteInfoDialog   # __IGNORE_WARNING__
+    from .Ui_SiteInfoNoSslDialog import Ui_SiteInfoDialog  # __IGNORE_WARNING__
     SSL = False
 
 from ..Download.DownloadUtilities import dataString
@@ -48,11 +48,15 @@
         self.setupUi(self)
         
         # put icons
-        self.tabWidget.setTabIcon(0, UI.PixmapCache.getIcon("siteinfo-general.png"))
-        self.tabWidget.setTabIcon(1, UI.PixmapCache.getIcon("siteinfo-media.png"))
-        self.tabWidget.setTabIcon(2, UI.PixmapCache.getIcon("siteinfo-databases.png"))
+        self.tabWidget.setTabIcon(
+            0, UI.PixmapCache.getIcon("siteinfo-general.png"))
+        self.tabWidget.setTabIcon(
+            1, UI.PixmapCache.getIcon("siteinfo-media.png"))
+        self.tabWidget.setTabIcon(
+            2, UI.PixmapCache.getIcon("siteinfo-databases.png"))
         if SSL:
-            self.tabWidget.setTabIcon(3, UI.PixmapCache.getIcon("siteinfo-security.png"))
+            self.tabWidget.setTabIcon(
+                3, UI.PixmapCache.getIcon("siteinfo-security.png"))
         
         self.__mainFrame = browser.page().mainFrame()
         title = browser.title()
@@ -102,7 +106,8 @@
             self.securityLabel.setStyleSheet(SiteInfoDialog.nokStyle)
             self.securityLabel.setText('<b>Connection is not encrypted.</b>')
             self.securityDetailsButton.setEnabled(False)
-            self.tabWidget.setTabEnabled(self.tabWidget.indexOf(self.securityTab), False)
+            self.tabWidget.setTabEnabled(
+                self.tabWidget.indexOf(self.securityTab), False)
         
         # populate Media tab
         images = self.__mainFrame.findAllElements("img")
@@ -150,7 +155,8 @@
         """
         Private slot to show security details.
         """
-        self.tabWidget.setCurrentIndex(self.tabWidget.indexOf(self.securityTab))
+        self.tabWidget.setCurrentIndex(
+            self.tabWidget.indexOf(self.securityTab))
     
     @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
     def on_imagesTree_currentItemChanged(self, current, previous):
@@ -263,7 +269,8 @@
             E5MessageBox.critical(self,
                 self.trUtf8("Save Image"),
                 self.trUtf8(
-                    """<p>Cannot write to file <b>{0}</b>.</p>""".format(filename)))
+                    """<p>Cannot write to file <b>{0}</b>.</p>""")
+                    .format(filename))
             return
         f.write(cacheData.readAll())
         f.close()
@@ -286,6 +293,7 @@
             return
         
         db = databases[id]
-        self.databaseName.setText("{0} ({1})".format(db.displayName(), db.name()))
+        self.databaseName.setText(
+            "{0} ({1})".format(db.displayName(), db.name()))
         self.databasePath.setText(db.fileName())
         self.databaseSize.setText(dataString(db.size()))

eric ide

mercurial