diff -r 684f491a3bfc -r 3308e8349e4c src/eric7/UI/UserInterface.py --- a/src/eric7/UI/UserInterface.py Fri Jan 26 16:17:05 2024 +0100 +++ b/src/eric7/UI/UserInterface.py Mon Jan 29 19:50:44 2024 +0100 @@ -83,6 +83,7 @@ from eric7.Preferences import Shortcuts from eric7.Project.Project import Project from eric7.QScintilla.SpellChecker import SpellChecker +from eric7.RemoteServerInterface.EricServerInterface import EricServerInterface from eric7.Sessions.SessionFile import SessionFile from eric7.SystemUtilities import ( DesktopUtilities, @@ -393,6 +394,9 @@ self.stdout = Redirector(False, self) self.stderr = Redirector(True, self) + # create the remote server interface + self.__ericServerInterface = EricServerInterface(self) + # set a few dialog members for non-modal dialogs created on demand self.programsDialog = None self.shortcutsDialog = None @@ -635,6 +639,7 @@ ericApp().registerObject("MicroPython", self.microPythonWidget) ericApp().registerObject("JediAssistant", self.jediAssistant) ericApp().registerObject("PluginRepositoryViewer", self.pluginRepositoryViewer) + ericApp().registerObject("EricServer", self.__ericServerInterface) # create the various JSON file interfaces self.__sessionFile = SessionFile(True) @@ -3572,6 +3577,9 @@ # initialize multi project actions self.multiProject.initActions() + # initialize eric-ide server actions + self.__ericServerInterface.initActions() + def __initQtDocActions(self): """ Private slot to initialize the action to show the Qt documentation. @@ -3781,6 +3789,12 @@ mb.setNativeMenuBar(False) ############################################################## + ## Remote Server menu + ############################################################## + + self.__menus["server"] = self.__ericServerInterface.initMenu() + + ############################################################## ## File menu ############################################################## @@ -3795,6 +3809,9 @@ act = self.__menus["file"].actions()[0] sep = self.__menus["file"].insertSeparator(act) self.__menus["file"].insertAction(sep, self.newWindowAct) + self.__menus["file"].insertSeparator(sep) + self.__menus["file"].insertMenu(sep, self.__menus["server"]) + self.__menus["file"].insertSeparator(sep) self.__menus["file"].aboutToShow.connect(self.__showFileMenu) ############################################################## @@ -4092,6 +4109,7 @@ helptb = QToolBar(self.tr("Help"), self) profilestb = QToolBar(self.tr("Profiles"), self) pluginstb = QToolBar(self.tr("Plugins"), self) + servertb = self.__ericServerInterface.initToolbar(self.toolbarManager) toolstb.setObjectName("ToolsToolbar") testingtb.setObjectName("UnittestToolbar") @@ -4194,6 +4212,7 @@ # add the various toolbars self.addToolBar(filetb) + self.addToolBar(servertb) self.addToolBar(edittb) self.addToolBar(searchtb) self.addToolBar(viewtb) @@ -4244,6 +4263,7 @@ ] self.__toolbars["spelling"] = [spellingtb.windowTitle(), spellingtb, ""] self.__toolbars["vcs"] = [vcstb.windowTitle(), vcstb, "vcs"] + self.__toolbars["server"] = [servertb.windowTitle(), servertb, ""] def __initDebugToolbarsLayout(self): """