Author: reinhard Date: 2010-10-20 10:22:17 -0500 (Wed, 20 Oct 2010) New Revision: 10207
Modified: trunk/gnue-forms/ trunk/gnue-forms/src/uidrivers/wx/widgets/image.py Log: Defined a default size of 100x100 for images. Property changes on: trunk/gnue-forms ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-10-20 16:19:05.575999975 +0200 committer: Reinhard Müller <[email protected]> properties: branch-nick: forms + timestamp: 2010-10-20 16:30:45.153000116 +0200 committer: Reinhard Müller <[email protected]> properties: branch-nick: forms Name: bzr:revision-id:v4 - 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] + 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] Modified: trunk/gnue-forms/src/uidrivers/wx/widgets/image.py =================================================================== --- trunk/gnue-forms/src/uidrivers/wx/widgets/image.py 2010-10-20 14:20:26 UTC (rev 10206) +++ trunk/gnue-forms/src/uidrivers/wx/widgets/image.py 2010-10-20 15:22:17 UTC (rev 10207) @@ -33,18 +33,6 @@ from gnue.forms.uidrivers.wx.widgets import _base # ============================================================================= -# Exceptions -# ============================================================================= - -class MissingSizeError(GParser.MarkupError): - """ Image has no size given """ - def __init__(self, image): - msg = u_("Image '%(name)s' is missing one of Sizer:width or " - "Sizer:height") % {'name': image.name} - GParser.MarkupError.__init__(self, msg, image._url, image._lineNumber) - - -# ============================================================================= # ImageViewer # ============================================================================= @@ -177,10 +165,8 @@ def __get_default_size(self): if self.managed: - width = int(getattr(self._gfObject, 'Sizer__width', -1)) - height = int(getattr(self._gfObject, 'Sizer__height', -1)) - if width == -1 or height == -1: - raise MissingSizeError(self._gfObject) + width = int(getattr(self._gfObject, 'Sizer__width', 100)) + height = int(getattr(self._gfObject, 'Sizer__height', 100)) else: width = self._uiDriver.cellWidth * self.chr_w height = self._uiDriver.cellHeight * self.chr_h _______________________________________________ commit-gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/commit-gnue
