eric6/UI/UserInterface.py

changeset 6987
3371a03ed0a7
parent 6942
2602857055c5
child 6989
8b8cadf8d7e9
child 6998
a63ca2373f44
--- a/eric6/UI/UserInterface.py	Wed May 01 17:29:21 2019 +0200
+++ b/eric6/UI/UserInterface.py	Thu May 02 19:07:48 2019 +0200
@@ -845,10 +845,10 @@
                                   UI.PixmapCache.getIcon("codeDocuViewer.png"),
                                   self.tr("Code Documentation Viewer"))
         
-        # Create the debug viewer maybe without the embedded shell
+        # Create the debug viewer
         logging.debug("Creating Debug Viewer...")
         from Debugger.DebugViewer import DebugViewer
-        self.debugViewer = DebugViewer(debugServer, True, self.viewmanager)
+        self.debugViewer = DebugViewer(debugServer)
         self.rToolbox.addItem(self.debugViewer,
                               UI.PixmapCache.getIcon("debugViewer.png"),
                               self.tr("Debug-Viewer"))
@@ -906,6 +906,8 @@
                               self.tr("Log-Viewer"))
 
         # Create the shell
+        # TODO: shell should be available in left or right toolbox
+        #       alternatively
         logging.debug("Creating Shell...")
         from QScintilla.Shell import ShellAssembly
         self.shellAssembly = \
@@ -1004,10 +1006,10 @@
                 UI.PixmapCache.getIcon("codeDocuViewer.png"),
                 self.tr("Code Documentation Viewer"))
         
-        # Create the debug viewer maybe without the embedded shell
+        # Create the debug viewer
         logging.debug("Creating Debug Viewer...")
         from Debugger.DebugViewer import DebugViewer
-        self.debugViewer = DebugViewer(debugServer, True, self.viewmanager)
+        self.debugViewer = DebugViewer(debugServer)
         self.rightSidebar.addTab(
             self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"),
             self.tr("Debug-Viewer"))
@@ -1065,6 +1067,8 @@
                                   self.tr("Log-Viewer"))
 
         # Create the shell
+        # TODO: shell should be available in left or right sidebar
+        #       alternatively
         logging.debug("Creating Shell...")
         from QScintilla.Shell import ShellAssembly
         self.shellAssembly = \
@@ -1121,27 +1125,6 @@
         self.rightSidebar.setSplitter(self.rightSplitter)
         self.bottomSidebar.setSplitter(self.verticalSplitter)
         
-    def __configureDockareaCornerUsage(self):
-        """
-        Private method to configure the usage of the dockarea corners.
-        """
-        if Preferences.getUI("TopLeftByLeft"):
-            self.setCorner(Qt.TopLeftCorner, Qt.LeftDockWidgetArea)
-        else:
-            self.setCorner(Qt.TopLeftCorner, Qt.TopDockWidgetArea)
-        if Preferences.getUI("BottomLeftByLeft"):
-            self.setCorner(Qt.BottomLeftCorner, Qt.LeftDockWidgetArea)
-        else:
-            self.setCorner(Qt.BottomLeftCorner, Qt.BottomDockWidgetArea)
-        if Preferences.getUI("TopRightByRight"):
-            self.setCorner(Qt.TopRightCorner, Qt.RightDockWidgetArea)
-        else:
-            self.setCorner(Qt.TopRightCorner, Qt.TopDockWidgetArea)
-        if Preferences.getUI("BottomRightByRight"):
-            self.setCorner(Qt.BottomRightCorner, Qt.RightDockWidgetArea)
-        else:
-            self.setCorner(Qt.BottomRightCorner, Qt.BottomDockWidgetArea)
-        
     def addSideWidget(self, side, widget, icon, label):
         """
         Public method to add a widget to the sides.
@@ -3218,7 +3201,7 @@
         self.__statusBar.addPermanentWidget(self.sbZoom)
         self.sbZoom.setWhatsThis(self.tr(
             """<p>This part of the status bar allows zooming the current"""
-            """ editor, shell or terminal.</p>"""
+            """ editor or shell.</p>"""
         ))
         
         self.viewmanager.setSbInfo(
@@ -4085,7 +4068,17 @@
                     state = self.profiles[name][2][5]
                     if not state.isEmpty():
                         self.rightSidebar.restoreState(state)
-                self.__configureDockareaCornerUsage()
+                
+                if self.__layoutType == "Toolboxes":
+                    # set the corner usages
+                    self.setCorner(Qt.TopLeftCorner,
+                                   Qt.LeftDockWidgetArea)
+                    self.setCorner(Qt.BottomLeftCorner,
+                                   Qt.LeftDockWidgetArea)
+                    self.setCorner(Qt.TopRightCorner,
+                                   Qt.RightDockWidgetArea)
+                    self.setCorner(Qt.BottomRightCorner,
+                                   Qt.RightDockWidgetArea)
             
             # step 3: activate the windows of the new profile
             if self.__layoutType == "Toolboxes":
@@ -5921,8 +5914,6 @@
         self.__httpAlternatives = Preferences.getUI("VersionsUrls6")
         self.performVersionCheck(False)
         
-        self.__configureDockareaCornerUsage()
-        
         from QScintilla.SpellChecker import SpellChecker
         SpellChecker.setDefaultLanguage(
             Preferences.getEditor("SpellCheckingDefaultLanguage"))

eric ide

mercurial