Author: reinhard Date: 2009-12-09 16:02:49 -0600 (Wed, 09 Dec 2009) New Revision: 10111
Modified: trunk/gnue-forms/src/GFObjects/GFEntry.py Log: Consider empty "label" style entries as disabled for the sake of disabling the enclosing boxes. Modified: trunk/gnue-forms/src/GFObjects/GFEntry.py =================================================================== --- trunk/gnue-forms/src/GFObjects/GFEntry.py 2009-12-09 22:01:12 UTC (rev 10110) +++ trunk/gnue-forms/src/GFObjects/GFEntry.py 2009-12-09 22:02:49 UTC (rev 10111) @@ -118,7 +118,16 @@ # "label" style entries don't get disabled when the attached field is # not editable. if self.style == 'label': - return GFTabStop._is_enabled_(self, index) + if not GFTabStop._is_enabled_(self, index): + return False + else: + # Consider empty labels disabled. This makes a difference for + # the enclosing boxes. + if index is None: + offset = 0 + else: + offset = index - self._visibleIndex + return (self._field.get_value(offset) is not None) else: return GFFieldBound._is_enabled_(self, index) _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue