RefactoringRope/ConfirmationDialog.py

branch
eric5
changeset 88
e71619898d0f
parent 86
3339c75dc777
equal deleted inserted replaced
86:3339c75dc777 88:e71619898d0f
7 Module implementing the Confirmation dialog. 7 Module implementing the Confirmation dialog.
8 """ 8 """
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 from PyQt5.QtCore import pyqtSlot 12 from PyQt4.QtCore import pyqtSlot
13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton 13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QAbstractButton
14 14
15 from Ui_ConfirmationDialog import Ui_ConfirmationDialog 15 from Ui_ConfirmationDialog import Ui_ConfirmationDialog
16 16
17 import Utilities 17 import Utilities
18 18
33 self.setupUi(self) 33 self.setupUi(self)
34 34
35 self.__changes = changes 35 self.__changes = changes
36 36
37 self.description.setText( 37 self.description.setText(
38 self.tr("Shall the refactoring <b>{0}</b> be done?") 38 self.trUtf8("Shall the refactoring <b>{0}</b> be done?")
39 .format(Utilities.html_encode(self.__changes.description))) 39 .format(Utilities.html_encode(self.__changes.description)))
40 40
41 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) 41 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok)
42 self.__previewButton = self.buttonBox.addButton( 42 self.__previewButton = self.buttonBox.addButton(
43 self.tr("Preview"), QDialogButtonBox.ActionRole) 43 self.trUtf8("Preview"), QDialogButtonBox.ActionRole)
44 self.__previewButton.setDefault(True) 44 self.__previewButton.setDefault(True)
45 45
46 msh = self.minimumSizeHint() 46 msh = self.minimumSizeHint()
47 self.resize(max(self.width(), msh.width()), msh.height()) 47 self.resize(max(self.width(), msh.width()), msh.height())
48 48

eric ide

mercurial