--- a/QScintilla/ShellWindow.py Sun Jul 09 19:44:33 2017 +0200 +++ b/QScintilla/ShellWindow.py Mon Jul 10 18:24:35 2017 +0200 @@ -40,7 +40,6 @@ from eric6config import getConfig -# TODO: implement history handling changes (Shell.historyStyleChanged) class ShellWindow(E5MainWindow): """ Class implementing a stand alone shell window. @@ -93,6 +92,8 @@ self.__readSettings() + self.__shell.historyStyleChanged.connect(self.__historyStyleChanged) + # now start the debug client self.__debugServer.startClient(False) @@ -1133,6 +1134,7 @@ self.__historyMenu.addAction(self.selectHistoryAct) self.__historyMenu.addAction(self.showHistoryAct) self.__historyMenu.addAction(self.clearHistoryAct) + self.__historyMenu.setEnabled(self.__shell.isHistoryEnabled()) self.__startMenu = self.menuBar().addMenu(self.tr("&Start")) self.__startMenu.aboutToShow.connect(self.__showLanguageMenu) @@ -1204,10 +1206,11 @@ viewtb.addAction(self.zoomResetAct) viewtb.addAction(self.zoomToAct) - historytb = self.addToolBar(self.tr("History")) - historytb.setIconSize(UI.Config.ToolBarIconSize) - historytb.addAction(self.showHistoryAct) - historytb.addAction(self.clearHistoryAct) + self.__historyToolbar = self.addToolBar(self.tr("History")) + self.__historyToolbar.setIconSize(UI.Config.ToolBarIconSize) + self.__historyToolbar.addAction(self.showHistoryAct) + self.__historyToolbar.addAction(self.clearHistoryAct) + self.__historyToolbar.setEnabled(self.__shell.isHistoryEnabled()) helptb = self.addToolBar(self.tr("Help")) helptb.setIconSize(UI.Config.ToolBarIconSize) @@ -1236,3 +1239,14 @@ self.__sbZoom.valueChanged.connect(self.__zoomTo) self.__sbZoom.setValue(0) + + def __historyStyleChanged(self, historyStyle): + """ + Private slot to handle a change of the shell history style. + + @param historyStyle style to be used for the history + @type ShellHistoryStyle + """ + enabled = self.__shell.isHistoryEnabled() + self.__historyMenu.setEnabled(enabled) + self.__historyToolbar.setEnabled(enabled)