Helpviewer/Download/DownloadAskActionDialog.py

branch
6_0_x
changeset 4329
399e14805a5c
parent 4022
f5f42921717e
equal deleted inserted replaced
4328:6420f6f8d9ac 4329:399e14805a5c
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 from PyQt5.QtWidgets import QDialog 12 from PyQt5.QtWidgets import QDialog
13 13
14 from .Ui_DownloadAskActionDialog import Ui_DownloadAskActionDialog 14 from .Ui_DownloadAskActionDialog import Ui_DownloadAskActionDialog
15
16 import Preferences
17 15
18 16
19 class DownloadAskActionDialog(QDialog, Ui_DownloadAskActionDialog): 17 class DownloadAskActionDialog(QDialog, Ui_DownloadAskActionDialog):
20 """ 18 """
21 Class implementing a dialog to ask for a download action. 19 Class implementing a dialog to ask for a download action.
34 32
35 self.infoLabel.setText("<b>{0}</b>".format(fileName)) 33 self.infoLabel.setText("<b>{0}</b>".format(fileName))
36 self.typeLabel.setText(mimeType) 34 self.typeLabel.setText(mimeType)
37 self.siteLabel.setText(baseUrl) 35 self.siteLabel.setText(baseUrl)
38 36
39 if not Preferences.getHelp("VirusTotalEnabled") or \ 37 self.scanButton.setHidden(True)
40 Preferences.getHelp("VirusTotalServiceKey") == "":
41 self.scanButton.setHidden(True)
42 38
43 msh = self.minimumSizeHint() 39 msh = self.minimumSizeHint()
44 self.resize(max(self.width(), msh.width()), msh.height()) 40 self.resize(max(self.width(), msh.width()), msh.height())
45 41
46 def getAction(self): 42 def getAction(self):

eric ide

mercurial