9 |
9 |
10 from PyQt4.QtCore import Qt, pyqtSlot |
10 from PyQt4.QtCore import Qt, pyqtSlot |
11 from PyQt4.QtGui import QDialogButtonBox, QListWidgetItem, QMessageBox, \ |
11 from PyQt4.QtGui import QDialogButtonBox, QListWidgetItem, QMessageBox, \ |
12 QApplication |
12 QApplication |
13 |
13 |
14 from E5Gui import E5MessageBox |
|
15 from E5Gui.E5Application import e5App |
14 from E5Gui.E5Application import e5App |
16 |
15 |
17 from PreviewDialogBase import PreviewDialogBase |
16 from PreviewDialogBase import PreviewDialogBase |
18 from ProgressHandle import ProgressHandle |
17 from ProgressHandle import ProgressHandle |
19 |
18 |
93 id = self.changesList.currentItem()\ |
92 id = self.changesList.currentItem()\ |
94 .data(HistoryDialog.ChangeIDRole) |
93 .data(HistoryDialog.ChangeIDRole) |
95 change = self.__changes[id] |
94 change = self.__changes[id] |
96 |
95 |
97 if self.__isUndo: |
96 if self.__isUndo: |
98 res = E5MessageBox.question(None, |
97 res = QMessageBox.question(None, |
99 self.trUtf8("Undo refactorings"), |
98 self.trUtf8("Undo refactorings"), |
100 self.trUtf8("""Shall all refactorings up to <b>{0}</b>""" |
99 self.trUtf8("""Shall all refactorings up to <b>{0}</b>""" |
101 """ be undone?""")\ |
100 """ be undone?""")\ |
102 .format(Utilities.html_encode(str(change))), |
101 .format(Utilities.html_encode(str(change))), |
103 QMessageBox.StandardButtons(\ |
102 QMessageBox.StandardButtons(\ |
104 QMessageBox.No | \ |
103 QMessageBox.No | \ |
105 QMessageBox.Yes), |
104 QMessageBox.Yes), |
106 QMessageBox.No) |
105 QMessageBox.No) |
107 else: |
106 else: |
108 res = E5MessageBox.question(None, |
107 res = QMessageBox.question(None, |
109 self.trUtf8("Redo refactorings"), |
108 self.trUtf8("Redo refactorings"), |
110 self.trUtf8("""Shall all refactorings up to <b>{0}</b>""" |
109 self.trUtf8("""Shall all refactorings up to <b>{0}</b>""" |
111 """ be redone?""")\ |
110 """ be redone?""")\ |
112 .format(Utilities.html_encode(str(change))), |
111 .format(Utilities.html_encode(str(change))), |
113 QMessageBox.StandardButtons(\ |
112 QMessageBox.StandardButtons(\ |