4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing the shell history dialog. |
7 Module implementing the shell history dialog. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 import os |
12 import os |
11 |
13 |
12 from PyQt4.QtCore import pyqtSlot |
14 from PyQt4.QtCore import pyqtSlot |
13 from PyQt4.QtGui import QListWidgetItem, QItemSelectionModel, QDialog |
15 from PyQt4.QtGui import QListWidgetItem, QItemSelectionModel, QDialog |
25 |
27 |
26 @param history reference to the current shell history (list of strings) |
28 @param history reference to the current shell history (list of strings) |
27 @param vm reference to the viewmanager object |
29 @param vm reference to the viewmanager object |
28 @param shell reference to the shell object |
30 @param shell reference to the shell object |
29 """ |
31 """ |
30 super().__init__(shell) |
32 super(ShellHistoryDialog, self).__init__(shell) |
31 self.setupUi(self) |
33 self.setupUi(self) |
32 |
34 |
33 self.historyList.addItems(history) |
35 self.historyList.addItems(history) |
34 self.historyList.setCurrentRow(self.historyList.count() - 1, |
36 self.historyList.setCurrentRow(self.historyList.count() - 1, |
35 QItemSelectionModel.Clear) |
37 QItemSelectionModel.Clear) |