Helpviewer/HelpWindow.py

branch
6_0_x
changeset 4421
c6feadf410a4
parent 4330
2c278493b31e
diff -r 10b4c1e4d1cf -r c6feadf410a4 Helpviewer/HelpWindow.py
--- a/Helpviewer/HelpWindow.py	Wed Sep 02 18:47:08 2015 +0200
+++ b/Helpviewer/HelpWindow.py	Wed Sep 02 18:56:01 2015 +0200
@@ -20,8 +20,8 @@
 from PyQt5.QtGui import QDesktopServices, QKeySequence, QFont, QFontMetrics, \
     QIcon
 from PyQt5.QtWidgets import QWidget, QVBoxLayout, QSizePolicy, QDockWidget, \
-    QComboBox, QLabel, QSplitter, QMenu, QToolButton, QLineEdit, \
-    QApplication, QWhatsThis, QDialog, QHBoxLayout, QProgressBar, QAction
+    QComboBox, QLabel, QSplitter, QMenu, QToolButton, QApplication, \
+    QWhatsThis, QDialog, QHBoxLayout, QProgressBar, QAction
 from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest
 from PyQt5.QtWebKit import QWebSettings, QWebDatabase, QWebSecurityOrigin
 from PyQt5.QtWebKitWidgets import QWebPage
@@ -128,7 +128,6 @@
             from .HelpBrowserWV import HelpBrowser
             from .HelpTabWidget import HelpTabWidget
             from .AdBlock.AdBlockIcon import AdBlockIcon
-##            from .VirusTotalApi import VirusTotalAPI
             
             HelpWindow.setUseQtHelp(self.fromEric)
             
@@ -270,14 +269,6 @@
             
             self.__initHelpDb()
             
-##            self.__virusTotal = VirusTotalAPI(self)
-##            self.__virusTotal.submitUrlError.connect(
-##                self.__virusTotalSubmitUrlError)
-##            self.__virusTotal.urlScanReport.connect(
-##                self.__virusTotalUrlScanReport)
-##            self.__virusTotal.fileScanReport.connect(
-##                self.__virusTotalFileScanReport)
-##            
             self.__previewer = None
             self.__shutdownCalled = False
             
@@ -1823,76 +1814,6 @@
         self.bookmarksToolBar.newUrl.connect(self.openUrlNewTab)
         self.addToolBarBreak()
         self.addToolBar(self.bookmarksToolBar)
-##        
-##        self.addToolBarBreak()
-##        vttb = self.addToolBar(self.tr("VirusTotal"))
-##        vttb.setObjectName("VirusTotalToolBar")
-##        vttb.setIconSize(UI.Config.ToolBarIconSize)
-##        vttb.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
-##        self.virustotalSearchEdit = QLineEdit()
-##        self.virustotalSearchEdit.setMaximumWidth(250)
-##        self.virustotalSearchEdit.setWhatsThis(self.tr(
-##            """<h2>File search</h2>"""
-##            """<p>In order to search for the last VirusTotal report on a"""
-##            """ given file just enter its hash. Currently the allowed"""
-##            """ hashes are MD5, SHA1 and SHA256. You can also search for"""
-##            """ a particular file report by typing in its permalink id.</p>"""
-##            """<h2>URL search</h2>"""
-##            """<p>URL searches are simple, just type in the given URL, the"""
-##            """ application will normalize it and compare it with the"""
-##            """ entries in VirusTotal's database. Alternatively you may"""
-##            """ enter the MD5 hash of an URL preceded by "url:", e.g."""
-##            """ url:7f911bbcf618f052ac6b9928600d2820.</p>"""
-##            """<h2>User search</h2>"""
-##            """<p>Do you want to know whether a friend has a VT Community"""
-##            """ account? Simply type in his nick preceded by the symbol"""
-##            """ "@", e.g. @EmilianoMartinez.</p>"""
-##            """<h2>Search through comments</h2>"""
-##            """<p>The comments in VT Community may often help in"""
-##            """ disinfecting your PC or may proof themselves useful when"""
-##            """ analysing a particular malware sample, comment tags enable"""
-##            """ users to search through the VT Community reviews. The"""
-##            """ standard file tags are: {0} The standard URL tags are: {1}"""
-##            """User generated tags are preceded by the symbol "#", e.g."""
-##            """ #disinfect.</p>"""
-##        ).format(
-##            """<ul>"""
-##            """<li>goodware</li>"""
-##            """<li>malware</li>"""
-##            """<li>spamattachmentorlink</li>"""
-##            """<li>p2pdownload</li>"""
-##            """<li>impropagating</li>"""
-##            """<li>networkworm</li>"""
-##            """<li>drivebydownload</li>"""
-##            """</ul>""",
-##            """<ul>"""
-##            """<li>malicious</li>"""
-##            """<li>benign</li>"""
-##            """<li>malewaredownload</li>"""
-##            """<li>phishingsite</li>"""
-##            """<li>browserexploit</li>"""
-##            """<li>spamlink</li>"""
-##            """</ul>""",
-##        ))
-##        self.virustotalSearchEdit.textChanged.connect(
-##            self.__virusTotalSearchChanged)
-##        self.virustotalSearchEdit.returnPressed.connect(
-##            self.__virusTotalSearch)
-##        vttb.addWidget(self.virustotalSearchEdit)
-##        self.virustotalSearchAct = vttb.addAction(
-##            UI.PixmapCache.getIcon("virustotal.png"),
-##            self.tr("Search VirusTotal"),
-##            self.__virusTotalSearch)
-##        self.virustotalSearchAct.setEnabled(False)
-##        vttb.addSeparator()
-##        self.virustotalScanCurrentAct = vttb.addAction(
-##            UI.PixmapCache.getIcon("virustotal.png"),
-##            self.tr("Scan current site"),
-##            self.__virusTotalScanCurrentSite)
-##        if not Preferences.getHelp("VirusTotalEnabled") or \
-##           Preferences.getHelp("VirusTotalServiceKey") == "":
-##            self.virustotalSearchEdit.setEnabled(False)
-##            self.virustotalScanCurrentAct.setEnabled(False)
         
     def __nextTab(self):
         """
@@ -2506,16 +2427,6 @@
         self.tabWidget.preferencesChanged()
         
         self.searchEdit.preferencesChanged()
-##        
-##        self.__virusTotal.preferencesChanged()
-##        if not Preferences.getHelp("VirusTotalEnabled") or \
-##           Preferences.getHelp("VirusTotalServiceKey") == "":
-##            self.virustotalSearchEdit.setEnabled(False)
-##            self.virustotalScanCurrentAct.setEnabled(False)
-##        else:
-##            self.virustotalSearchEdit.setEnabled(True)
-##            self.virustotalScanCurrentAct.setEnabled(True)
-##        self.__virusTotalSearchChanged(self.virustotalSearchEdit.text())
     
     def masterPasswordChanged(self, oldPassword, newPassword):
         """
@@ -3580,78 +3491,6 @@
         
         super(HelpWindow, self).keyPressEvent(evt)
     
-##    ###########################################################################
-##    ## Interface to VirusTotal below                                         ##
-##    ###########################################################################
-##    
-##    def __virusTotalSearchChanged(self, txt):
-##        """
-##        Private slot to react upon changes of the VirusTotal search text.
-##        
-##        @param txt contents of the search (string)
-##        """
-##        self.virustotalSearchAct.setEnabled(
-##            txt != "" and
-##            Preferences.getHelp("VirusTotalEnabled") and
-##            Preferences.getHelp("VirusTotalServiceKey") != "")
-##    
-##    def __virusTotalSearch(self):
-##        """
-##        Private slot to search VirusTotal for a given entry.
-##        """
-##        search = self.virustotalSearchEdit.text()
-##        if search:
-##            from .VirusTotalApi import VirusTotalAPI
-##            requestData = VirusTotalAPI.getSearchRequestData(search)
-##            self.newTab(requestData=requestData)
-##    
-##    def __virusTotalScanCurrentSite(self):
-##        """
-##        Private slot to ask VirusTotal for a scan of the URL of the current
-##        browser.
-##        """
-##        cb = self.currentBrowser()
-##        if cb is not None:
-##            url = cb.url()
-##            if url.scheme() in ["http", "https", "ftp"]:
-##                self.requestVirusTotalScan(url)
-##    
-##    def requestVirusTotalScan(self, url):
-##        """
-##        Public method to submit a request to scan an URL by VirusTotal.
-##        
-##        @param url URL to be scanned (QUrl)
-##        """
-##        self.__virusTotal.submitUrl(url)
-##    
-##    def __virusTotalSubmitUrlError(self, msg):
-##        """
-##        Private slot to handle an URL scan submission error.
-##        
-##        @param msg error message (str)
-##        """
-##        E5MessageBox.critical(
-##            self,
-##            self.tr("VirusTotal Scan"),
-##            self.tr("""<p>The VirusTotal scan could not be"""
-##                    """ scheduled.<p>\n<p>Reason: {0}</p>""").format(msg))
-##    
-##    def __virusTotalUrlScanReport(self, url):
-##        """
-##        Private slot to initiate the display of the URL scan report page.
-##        
-##        @param url URL of the URL scan report page (string)
-##        """
-##        self.newTab(url)
-##    
-##    def __virusTotalFileScanReport(self, url):
-##        """
-##        Private slot to initiate the display of the file scan report page.
-##        
-##        @param url URL of the file scan report page (string)
-##        """
-##        self.newTab(url)
-##    
     def reloadUserStyleSheet(self):
         """
         Public method to reload the user style sheet.

eric ide

mercurial