[Commits] (john) - EditText and StaticText now handle isShown in synchronizeWidget

commits at osafoundation.org commits at osafoundation.org
Mon Aug 9 17:52:27 PDT 2004


Commit by: john
Modified files:
chandler/parcels/osaf/framework/blocks/ControlBlocks.py 1.95 1.96
chandler/parcels/osaf/framework/blocks/detail/parcel.xml 1.16 1.17

Log message:
- EditText and StaticText now handle isShown in synchronizeWidget
- DetailView is now completely hidden when starting out

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/ControlBlocks.py.diff?r1=text&tr1=1.95&r2=text&tr2=1.96
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/detail/parcel.xml.diff?r1=text&tr1=1.16&r2=text&tr2=1.17

Index: chandler/parcels/osaf/framework/blocks/ControlBlocks.py
diff -u chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.95 chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.96
--- chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.95	Fri Aug  6 17:08:11 2004
+++ chandler/parcels/osaf/framework/blocks/ControlBlocks.py	Mon Aug  9 17:52:25 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.95 $"
-__date__ = "$Date: 2004/08/07 00:08:11 $"
+__version__ = "$Revision: 1.96 $"
+__date__ = "$Date: 2004/08/10 00:52:25 $"
 __copyright__ = "Copyright (c) 2003 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -87,6 +87,10 @@
         minW, minH = arguments[-1] # assumes minimum size passed as last arg
         self.SetSizeHints(minW=minW, minH=minH)
 
+    def wxSynchronizeWidget(self):
+        if self.blockItem.isShown != self.IsShown():
+            self.Show (self.blockItem.isShown)
+
     def OnEnterPressed(self, event):
         self.blockItem.Post (Globals.repository.findPath('//parcels/osaf/framework/blocks/Events/EnterPressed'),
                              {'text':self.GetValue()})
@@ -655,6 +659,12 @@
                             (self.minimumSize.width, self.minimumSize.height),
                             self.choices, self.itemsPerLine, dimension)
 
+class wxStaticText(wx.StaticText):
+    def wxSynchronizeWidget(self):
+        if self.blockItem.isShown != self.IsShown():
+            self.Show (self.blockItem.isShown)
+
+
 class StaticText(RectangularChild):
     def instantiateWidget (self):
         if self.textAlignmentEnum == "Left":
@@ -664,12 +674,12 @@
         elif self.textAlignmentEnum == "Right":
             style = wx.ALIGN_RIGHT
 
-        staticText = wx.StaticText (self.parentBlock.widget,
-                                    -1,
-                                    self.title,
-                                    wx.DefaultPosition,
-                                    (self.minimumSize.width, self.minimumSize.height),
-                                    style)
+        staticText = wxStaticText (self.parentBlock.widget,
+                                   -1,
+                                   self.title,
+                                   wx.DefaultPosition,
+                                   (self.minimumSize.width, self.minimumSize.height),
+                                   style)
 
         staticText.SetFont(Font (self.characterStyle))
         return staticText

Index: chandler/parcels/osaf/framework/blocks/detail/parcel.xml
diff -u chandler/parcels/osaf/framework/blocks/detail/parcel.xml:1.16 chandler/parcels/osaf/framework/blocks/detail/parcel.xml:1.17
--- chandler/parcels/osaf/framework/blocks/detail/parcel.xml:1.16	Sun Aug  8 19:12:13 2004
+++ chandler/parcels/osaf/framework/blocks/detail/parcel.xml	Mon Aug  9 17:52:25 2004
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!-- $Revision: 1.16 $ -->
-<!-- $Date: 2004/08/09 02:12:13 $ -->
+<!-- $Revision: 1.17 $ -->
+<!-- $Date: 2004/08/10 00:52:25 $ -->
 <!-- Copyright (c) 2003 Open Source Applications Foundation -->
 <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
 
@@ -108,6 +108,7 @@
     <separatorWidth>50</separatorWidth>
     <subscribeWhenVisibleEvents itemref="doc:DummyEvent"/>
     <subscribeWhenVisibleEvents itemref="doc:ButtonPressed"/>
+    <isShown>False</isShown>
   </Toolbar>
 
   <!--
@@ -302,6 +303,7 @@
     <childrenBlocks itemref="doc:ToArea"/>
     <!-- Attributes -->
     <orientationEnum>Vertical</orientationEnum>
+    <isShown>False</isShown>
   </ContentItemDetail>
  
   <ContentItemDetail itsName="FromArea"
@@ -311,6 +313,7 @@
     <!-- Attributes -->
     <orientationEnum>Horizontal</orientationEnum>
     <selectedItemsAttribute>whoFrom</selectedItemsAttribute>
+    <isShown>False</isShown>
   </ContentItemDetail>
 
   <StaticText itsName="FromString"
@@ -320,6 +323,7 @@
     <textAlignmentEnum>Left</textAlignmentEnum>    
     <stretchFactor>0.0</stretchFactor>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </StaticText>
   
   <EditText itsName="FromEditField1"
@@ -330,6 +334,7 @@
     <readOnly>True</readOnly>
     <textAlignmentEnum>Left</textAlignmentEnum>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </EditText>
 
   <ContentItemDetail itsName="ToArea"
@@ -339,6 +344,7 @@
     <!-- Attributes -->
     <orientationEnum>Horizontal</orientationEnum>
     <selectedItemsAttribute>who</selectedItemsAttribute>
+    <isShown>False</isShown>
   </ContentItemDetail>
  
   <StaticText itsName="ToString"
@@ -348,6 +354,7 @@
     <textAlignmentEnum>Left</textAlignmentEnum>    
     <stretchFactor>0.0</stretchFactor>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </StaticText>
   
   <EditText itsName="ToEditField1"
@@ -358,6 +365,7 @@
     <readOnly>True</readOnly>
     <textAlignmentEnum>Left</textAlignmentEnum>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </EditText>
 
   <!-- CoreIndent -->
@@ -367,18 +375,21 @@
     <childrenBlocks itemref="doc:Indent2"/>
     <!-- Attributes -->
     <stretchFactor>2</stretchFactor>
+    <isShown>False</isShown>
   </ContentItemDetail>
  
   <ContentItemDetail itsName="Indent">
     <!-- Attributes -->
     <size>80,80</size>
     <stretchFactor>0</stretchFactor>
+    <isShown>False</isShown>
   </ContentItemDetail>
  
   <ContentItemDetail itsName="Indent2">
     <!-- Attributes -->
     <size>80,80</size>
     <stretchFactor>0</stretchFactor>
+    <isShown>False</isShown>
   </ContentItemDetail>
  
   <!-- CoreArea -->
@@ -389,6 +400,7 @@
     <!-- Attributes -->
     <orientationEnum>Vertical</orientationEnum>
     <stretchFactor>2</stretchFactor>
+    <isShown>False</isShown>
   </ContentItemDetail>
  
   <StaticText itsName="KindLabel"
@@ -398,6 +410,7 @@
     <textAlignmentEnum>Center</textAlignmentEnum>    
     <stretchFactor>0.0</stretchFactor>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </StaticText>
   
   <StaticText itsName="Headline"
@@ -407,6 +420,7 @@
     <textAlignmentEnum>Center</textAlignmentEnum>    
     <stretchFactor>0.0</stretchFactor>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </StaticText>
   
   <StaticText itsName="DateTime"
@@ -416,6 +430,7 @@
     <textAlignmentEnum>Center</textAlignmentEnum>    
     <stretchFactor>0.0</stretchFactor>
     <minimumSize>80, 24</minimumSize>
+    <isShown>False</isShown>
   </StaticText>
   
   <!-- NotesArea -->
@@ -428,6 +443,7 @@
     <textAlignmentEnum>Left</textAlignmentEnum>
     <stretchFactor>1</stretchFactor>
     <minimumSize>380, 120</minimumSize>
+    <isShown>False</isShown>
   </EditText>
 
 </core:Parcel>



More information about the Commits mailing list