[Commits] (jed) Changed horizontal layout to use box container rather than splitter. Fixed toolbars to calculate their width rather than always being a fixed size.

commits at osafoundation.org commits at osafoundation.org
Mon Jan 24 15:49:30 PST 2005


Commit by: jed
Modified files:
chandler/parcels/osaf/framework/blocks/ControlBlocks.py 1.156 1.157
chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py 1.32 1.33
chandler/parcels/osaf/views/main/parcel.xml 1.151 1.152

Log message:
Changed horizontal layout to use box container rather than splitter.  Fixed toolbars to calculate their width rather than always being a fixed size.

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/ControlBlocks.py.diff?r1=text&tr1=1.156&r2=text&tr2=1.157
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py.diff?r1=text&tr1=1.32&r2=text&tr2=1.33
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/views/main/parcel.xml.diff?r1=text&tr1=1.151&r2=text&tr2=1.152

Index: chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py
diff -u chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py:1.32 chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py:1.33
--- chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py:1.32	Fri Jan 21 14:43:51 2005
+++ chandler/parcels/osaf/framework/blocks/DynamicContainerBlocks.py	Mon Jan 24 15:49:29 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.32 $"
-__date__ = "$Date: 2005/01/21 22:43:51 $"
+__version__ = "$Revision: 1.33 $"
+__date__ = "$Date: 2005/01/24 23:49:29 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -758,7 +758,7 @@
         return wxToolbar(self.parentBlock.widget, 
                          Block.Block.getWidgetID(self),
                          wx.DefaultPosition,
-                         (300, self.toolSize.height+heightGutter),
+                         (-1, self.toolSize.height+heightGutter),
                          style=self.calculate_wxStyle())
 
     def calculate_wxStyle (self):

Index: chandler/parcels/osaf/framework/blocks/ControlBlocks.py
diff -u chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.156 chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.157
--- chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.156	Sun Jan 23 14:45:53 2005
+++ chandler/parcels/osaf/framework/blocks/ControlBlocks.py	Mon Jan 24 15:49:29 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.156 $"
-__date__ = "$Date: 2005/01/23 22:45:53 $"
+__version__ = "$Revision: 1.157 $"
+__date__ = "$Date: 2005/01/24 23:49:29 $"
 __copyright__ = "Copyright (c) 2003-2005 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -564,9 +564,13 @@
             for column in xrange (lastColumnIndex):
                 widthMinusLastColumn += self.GetColSize (column)
             lastColumnWidth = size.width - widthMinusLastColumn
-            if lastColumnWidth > 0:
-                self.SetColSize (lastColumnIndex, lastColumnWidth)
-                self.ForceRefresh()
+            # @@@ This does not work properly and needs to be looked at
+            # Removing it for the single column case because it causes the
+            # sidebar to grow indefinitely
+            if self.GetNumberCols() != 1:
+                if lastColumnWidth > 0:
+                    self.SetColSize (lastColumnIndex, lastColumnWidth)
+                    self.ForceRefresh()
         event.Skip()
 
     def OnColumnDrag(self, event):

Index: chandler/parcels/osaf/views/main/parcel.xml
diff -u chandler/parcels/osaf/views/main/parcel.xml:1.151 chandler/parcels/osaf/views/main/parcel.xml:1.152
--- chandler/parcels/osaf/views/main/parcel.xml:1.151	Mon Jan 24 14:40:05 2005
+++ chandler/parcels/osaf/views/main/parcel.xml	Mon Jan 24 15:49:29 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!-- $Revision: 1.151 $ -->
-<!-- $Date: 2005/01/24 22:40:05 $ -->
+<!-- $Revision: 1.152 $ -->
+<!-- $Date: 2005/01/24 23:49:29 $ -->
 <!-- Copyright (c) 2003-2004 Open Source Applications Foundation -->
 <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
 
@@ -1386,7 +1386,9 @@
     <treeTemplatePath>//parcels/osaf/views/main/SidebarDetailViewTemplate</treeTemplatePath>
   </SidebarDetailViewCache>
 
-  <calendar:MiniCalendar itsName="MiniCalendar"/>
+  <calendar:MiniCalendar itsName="MiniCalendar">
+    <stretchFactor>0</stretchFactor>
+  </calendar:MiniCalendar>
 
   <BoxContainer itsName="SidebarBoxContainer">
     <blockName>SidebarBoxContainer</blockName>
@@ -1397,6 +1399,7 @@
 
     <!-- Attributes -->
     <orientationEnum>Vertical</orientationEnum>
+    <stretchFactor>0</stretchFactor>
   </BoxContainer>
 
   <contentModel:ItemCollection itsName="sidebarItemCollection">
@@ -1424,7 +1427,7 @@
   <BoxContainer itsName="MainBoxContainer">
     <!-- Layout children -->
     <childrenBlocks itemref="doc:NavigationBar"/>
-    <childrenBlocks itemref="doc:MainSplitter"/>
+    <childrenBlocks itemref="doc:HorizontalMainContainer"/>
     
     <!-- Attributes -->
     <orientationEnum>Vertical</orientationEnum>
@@ -1441,16 +1444,14 @@
     <contextMenu itemref="doc:sidebarContextMenu"/>
   </Table>
  
-  <SplitterWindow itsName="MainSplitter">
+  <BoxContainer itsName="HorizontalMainContainer">
     <!-- Layout children -->
     <childrenBlocks itemref="doc:SidebarBoxContainer"/>
     <childrenBlocks itemref="doc:TabbedView"/>
 
     <!-- Attributes -->
-    <orientationEnum>Vertical</orientationEnum>
-    <splitPercentage>0.2</splitPercentage>
-    <allowResize>False</allowResize>
-  </SplitterWindow>
+    <orientationEnum>Horizontal</orientationEnum>
+  </BoxContainer>
   
   <SplitterWindow itsName="SidebarDetailViewTemplate">
     <childrenBlocks itemref="doc:SummaryView"/>



More information about the Commits mailing list