Made the toolbars of the initial layout more minimalistic.

Thu, 06 Jan 2011 19:06:51 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 06 Jan 2011 19:06:51 +0100
changeset 816
53e282890577
parent 815
093b3b8204d1
child 817
84b3d694c142

Made the toolbars of the initial layout more minimalistic.

Cooperation/ChatWidget.ui file | annotate | diff | comparison | revisions
Debugger/DebugUI.py file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric5.UI.UserInterface.html file | annotate | diff | comparison | revisions
MultiProject/MultiProject.py file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
changelog file | annotate | diff | comparison | revisions
--- a/Cooperation/ChatWidget.ui	Thu Jan 06 18:59:49 2011 +0100
+++ b/Cooperation/ChatWidget.ui	Thu Jan 06 19:06:51 2011 +0100
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>303</width>
-    <height>777</height>
+    <width>300</width>
+    <height>600</height>
    </rect>
   </property>
   <property name="windowTitle">
--- a/Debugger/DebugUI.py	Thu Jan 06 18:59:49 2011 +0100
+++ b/Debugger/DebugUI.py	Thu Jan 06 19:06:51 2011 +0100
@@ -585,7 +585,7 @@
         @param toolbarManager reference to a toolbar manager object (E5ToolBarManager)
         @return the generated toolbars (list of QToolBar)
         """
-        starttb = QToolBar(self.trUtf8("Start"), self.parent())
+        starttb = QToolBar(self.trUtf8("Start"), self.ui)
         starttb.setIconSize(UI.Config.ToolBarIconSize)
         starttb.setObjectName("StartToolbar")
         starttb.setToolTip(self.trUtf8('Start'))
@@ -599,7 +599,7 @@
         starttb.addAction(self.debugAct)
         starttb.addAction(self.debugProjectAct)
         
-        debugtb = QToolBar(self.trUtf8("Debug"), self.parent())
+        debugtb = QToolBar(self.trUtf8("Debug"), self.ui)
         debugtb.setIconSize(UI.Config.ToolBarIconSize)
         debugtb.setObjectName("DebugToolbar")
         debugtb.setToolTip(self.trUtf8('Debug'))
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Thu Jan 06 18:59:49 2011 +0100
+++ b/Documentation/Help/source.qhp	Thu Jan 06 19:06:51 2011 +0100
@@ -4001,6 +4001,7 @@
       <keyword name="UserInterface.__importPreferences" id="UserInterface.__importPreferences" ref="eric5.UI.UserInterface.html#UserInterface.__importPreferences" />
       <keyword name="UserInterface.__importShortcuts" id="UserInterface.__importShortcuts" ref="eric5.UI.UserInterface.html#UserInterface.__importShortcuts" />
       <keyword name="UserInterface.__initActions" id="UserInterface.__initActions" ref="eric5.UI.UserInterface.html#UserInterface.__initActions" />
+      <keyword name="UserInterface.__initDebugToolbarsLayout" id="UserInterface.__initDebugToolbarsLayout" ref="eric5.UI.UserInterface.html#UserInterface.__initDebugToolbarsLayout" />
       <keyword name="UserInterface.__initEricDocAction" id="UserInterface.__initEricDocAction" ref="eric5.UI.UserInterface.html#UserInterface.__initEricDocAction" />
       <keyword name="UserInterface.__initExternalToolsActions" id="UserInterface.__initExternalToolsActions" ref="eric5.UI.UserInterface.html#UserInterface.__initExternalToolsActions" />
       <keyword name="UserInterface.__initMenus" id="UserInterface.__initMenus" ref="eric5.UI.UserInterface.html#UserInterface.__initMenus" />
--- a/Documentation/Source/eric5.UI.UserInterface.html	Thu Jan 06 18:59:49 2011 +0100
+++ b/Documentation/Source/eric5.UI.UserInterface.html	Thu Jan 06 19:06:51 2011 +0100
@@ -310,6 +310,9 @@
 <td><a href="#UserInterface.__initActions">__initActions</a></td>
 <td>Private method to define the user interface actions.</td>
 </tr><tr>
+<td><a href="#UserInterface.__initDebugToolbarsLayout">__initDebugToolbarsLayout</a></td>
+<td>Private slot to initialize the toolbars layout for the debug profile.</td>
+</tr><tr>
 <td><a href="#UserInterface.__initEricDocAction">__initEricDocAction</a></td>
 <td>Private slot to initialize the action to show the eric5 documentation.</td>
 </tr><tr>
@@ -1088,6 +1091,11 @@
 <b>__initActions</b>(<i></i>)
 <p>
         Private method to define the user interface actions.
+</p><a NAME="UserInterface.__initDebugToolbarsLayout" ID="UserInterface.__initDebugToolbarsLayout"></a>
+<h4>UserInterface.__initDebugToolbarsLayout</h4>
+<b>__initDebugToolbarsLayout</b>(<i></i>)
+<p>
+        Private slot to initialize the toolbars layout for the debug profile.
 </p><a NAME="UserInterface.__initEricDocAction" ID="UserInterface.__initEricDocAction"></a>
 <h4>UserInterface.__initEricDocAction</h4>
 <b>__initEricDocAction</b>(<i></i>)
--- a/MultiProject/MultiProject.py	Thu Jan 06 18:59:49 2011 +0100
+++ b/MultiProject/MultiProject.py	Thu Jan 06 19:06:51 2011 +0100
@@ -682,7 +682,7 @@
         @param toolbarManager reference to a toolbar manager object (E5ToolBarManager)
         @return the toolbar generated (QToolBar)
         """
-        tb = QToolBar(self.trUtf8("Multiproject"), self.parent())
+        tb = QToolBar(self.trUtf8("Multiproject"), self.ui)
         tb.setIconSize(UI.Config.ToolBarIconSize)
         tb.setObjectName("MultiProjectToolbar")
         tb.setToolTip(self.trUtf8('Multiproject'))
--- a/Preferences/__init__.py	Thu Jan 06 18:59:49 2011 +0100
+++ b/Preferences/__init__.py	Thu Jan 06 19:06:51 2011 +0100
@@ -91,7 +91,7 @@
         "Style" : "System",
         "StyleSheet" : "",
         "ViewManager" : "tabview",
-        "LayoutType" : "Toolboxes",
+        "LayoutType" : "Sidebars",
         # allowed values are "DockWindows", "FloatingWindows", "Toolboxes" and "Sidebars"
         "LayoutShellEmbedded" : 0,          # 0 = separate
                                             # 1 = embedded in debug browser
@@ -139,7 +139,7 @@
             "debug" : [
                     # visibility (0)
                     [ False, False, True,  True, True, True, False, False, 
-                      True,  True,  False, False], 
+                      True,  False,  False, False], 
                     # saved state main window with dock windows (1)
                     b"",
                     # saved states floating windows (2)
--- a/Project/Project.py	Thu Jan 06 18:59:49 2011 +0100
+++ b/Project/Project.py	Thu Jan 06 19:06:51 2011 +0100
@@ -3329,7 +3329,7 @@
         @param toolbarManager reference to a toolbar manager object (E5ToolBarManager)
         @return the toolbar generated (QToolBar)
         """
-        tb = QToolBar(self.trUtf8("Project"), self.parent())
+        tb = QToolBar(self.trUtf8("Project"), self.ui)
         tb.setIconSize(UI.Config.ToolBarIconSize)
         tb.setObjectName("ProjectToolbar")
         tb.setToolTip(self.trUtf8('Project'))
--- a/UI/UserInterface.py	Thu Jan 06 18:59:49 2011 +0100
+++ b/UI/UserInterface.py	Thu Jan 06 19:06:51 2011 +0100
@@ -218,7 +218,7 @@
         
         g = Preferences.getGeometry("MainGeometry")
         if g.isEmpty():
-            s = QSize(800, 600)
+            s = QSize(1280, 1024)
             self.resize(s)
         else:
             self.restoreGeometry(g)
@@ -2465,6 +2465,7 @@
         pluginstb.addAction(self.pluginRepoAct)
         self.toolbarManager.addToolBar(pluginstb, pluginstb.windowTitle())
         
+        # add the various toolbars
         self.addToolBar(filetb)
         self.addToolBar(edittb)
         self.addToolBar(searchtb)
@@ -2474,14 +2475,25 @@
         self.addToolBar(debugtb)
         self.addToolBar(multiprojecttb)
         self.addToolBar(projecttb)
-        self.addToolBar(toolstb)
+        self.addToolBar(Qt.RightToolBarArea, settingstb)
+        self.addToolBar(Qt.RightToolBarArea, toolstb)
         self.addToolBar(helptb)
-        self.addToolBar(settingstb)
         self.addToolBar(bookmarktb)
         self.addToolBar(spellingtb)
         self.addToolBar(unittesttb)
         self.addToolBar(profilestb)
         self.addToolBar(pluginstb)
+        
+        # hide toolbars not wanted in the initial layout
+        searchtb.hide()
+        quicksearchtb.hide()
+        viewtb.hide()
+        debugtb.hide()
+        multiprojecttb.hide()
+        helptb.hide()
+        spellingtb.hide()
+        unittesttb.hide()
+        pluginstb.hide()
 
         # just add new toolbars to the end of the list
         self.__toolbars = {}
@@ -2503,6 +2515,23 @@
         self.__toolbars["multiproject"] = [multiprojecttb.windowTitle(), multiprojecttb]
         self.__toolbars["spelling"] = [spellingtb.windowTitle(), spellingtb]
         
+    def __initDebugToolbarsLayout(self):
+        """
+        Private slot to initialize the toolbars layout for the debug profile.
+        """
+        # Step 1: set the edit profile to be sure
+        self.__setEditProfile()
+        
+        # Step 2: switch to debug profile and do the layout
+        initSize = self.size()
+        self.setDebugProfile()
+        self.__toolbars["project"][1].hide()
+        self.__toolbars["debug"][1].show()
+        self.resize(initSize)
+        
+        # Step 3: switch back to edit profile
+        self.__setEditProfile()
+        
     def __initStatusbar(self):
         """
         Private slot to set up the status bar.
@@ -5616,6 +5645,8 @@
         the configuration dialog is shown.
         """
         if not Preferences.isConfigured():
+            self.__initDebugToolbarsLayout()
+            
             E5MessageBox.information(self,
                 self.trUtf8("First time usage"),
                 self.trUtf8("""eric5 has not been configured yet. """
--- a/ViewManager/ViewManager.py	Thu Jan 06 18:59:49 2011 +0100
+++ b/ViewManager/ViewManager.py	Thu Jan 06 19:06:51 2011 +0100
@@ -707,11 +707,10 @@
         tb.addAction(self.saveAsAct)
         tb.addAction(self.saveAllAct)
         tb.addAction(self.saveToProjectAct)
-        tb.addSeparator()
-        tb.addAction(self.printPreviewAct)
-        tb.addAction(self.printAct)
         
         toolbarManager.addToolBar(tb, tb.windowTitle())
+        toolbarManager.addAction(self.printPreviewAct, tb.windowTitle())
+        toolbarManager.addAction(self.printAct, tb.windowTitle())
         
         return tb
         
--- a/changelog	Thu Jan 06 18:59:49 2011 +0100
+++ b/changelog	Thu Jan 06 19:06:51 2011 +0100
@@ -1,5 +1,9 @@
 Change Log
 ----------
+Version 5.1-snapshot-2011mmdd:
+- bug fixes
+- made the toolbars of the initial layout more minimalistic
+
 Version 5.1-snapshot-20110106:
 - bug fixes
 - added support for the display of inline annotations (used to show

eric ide

mercurial