commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8354 - in trunk/gnue-forms/src: . GFObjects


From: johannes
Subject: [gnue] r8354 - in trunk/gnue-forms/src: . GFObjects
Date: Tue, 4 Apr 2006 04:39:16 -0500 (CDT)

Author: johannes
Date: 2006-04-04 04:39:16 -0500 (Tue, 04 Apr 2006)
New Revision: 8354

Modified:
   trunk/gnue-forms/src/GFObjects/GFButton.py
   trunk/gnue-forms/src/GFParser.py
Log:
Buttons honor the blocks' rows- and rowSpacer-attribute now. 
Additionally a button can override that values using it's own rows- and 
rowSpacer-attribute.

issue6 testing


Modified: trunk/gnue-forms/src/GFObjects/GFButton.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFButton.py  2006-04-04 09:06:30 UTC (rev 
8353)
+++ trunk/gnue-forms/src/GFObjects/GFButton.py  2006-04-04 09:39:16 UTC (rev 
8354)
@@ -55,6 +55,23 @@
 
 
     # -------------------------------------------------------------------------
+    # Implementation of virtual methods
+    # -------------------------------------------------------------------------
+
+    def _phase1Init_(self):
+
+        GFTabStop._phase1Init_(self)
+
+        self._block = self.getBlock()
+        if self._block:
+            self._rows = getattr(self._block, 'rows', self._rows)
+            self._gap  = getattr(self._block, 'rowSpacer', self._gap)
+
+        self._rows = getattr(self, 'rows', self._rows)
+        self._gap  = getattr(self, 'rowSpacer', self._gap)
+
+
+    # -------------------------------------------------------------------------
     # Fire the trigger associated with the button from outside GF
     # -------------------------------------------------------------------------
 

Modified: trunk/gnue-forms/src/GFParser.py
===================================================================
--- trunk/gnue-forms/src/GFParser.py    2006-04-04 09:06:30 UTC (rev 8353)
+++ trunk/gnue-forms/src/GFParser.py    2006-04-04 09:39:16 UTC (rev 8354)
@@ -752,6 +752,15 @@
                               'ties to. If a button is associated with '
                               'a block, then the button honors '
                               'the block\'s rows= value.' },
+            'rows': {
+               'Typecast': GTypecast.whole,
+               'Description': 'Overrides the rows setting defined at the '
+                              'block level. ' },
+            'rowSpacer': {
+               'Typecast': GTypecast.whole,
+               'Label': _('Row Spacing'),
+               'Description': 'Overriders the rowSpace setting defined at the '
+                              'block level.' },
             'focusorder': {
                'Typecast': GTypecast.whole,
                'Description': 'Defines what order the focus moves through '





reply via email to

[Prev in Thread] Current Thread [Next in Thread]