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 <reinhard.muel...@bytewise.at>
properties: 
        branch-nick: forms

   + timestamp: 2010-10-20 16:30:45.153000116 +0200
committer: Reinhard Müller <reinhard.muel...@bytewise.at>
properties: 
        branch-nick: forms

Name: bzr:revision-id:v4
   - 3116 reinhard.muel...@bytewise.at-20100426083500-vtmq0qvd7htz02zx
3117 reinhard.muel...@bytewise.at-20100512151744-2jx8tmtop30kl5n0
3118 reinhard.muel...@bytewise.at-20100705094014-ks9yv7b8gs6ychrb
3119 reinhard.muel...@bytewise.at-20100706085143-hyxadj30ayg28jpx
3120 reinhard.muel...@bytewise.at-20100706140804-sn3npws1ykm81ubx
3121 reinhard.muel...@bytewise.at-20100909134008-5p7jq048nkutldse
3122 reinhard.muel...@bytewise.at-20100923144753-e8hthxho7n5mwg9z
3123 reinhard.muel...@bytewise.at-20100929193018-7r3injoy8g28fwm6
3124 reinhard.muel...@bytewise.at-20100930073631-ilf6smgjt6mfvkpz
3125 reinhard.muel...@bytewise.at-20101011191957-yaj9rkqbervc91ac
3126 reinhard.muel...@bytewise.at-20101020084039-jmfxjbctt6vc2usd
3127 reinhard.muel...@bytewise.at-20101020124425-0dpprxsmanmaenty
3128 reinhard.muel...@bytewise.at-20101020124541-zppkmzww1lnsk8x4
3129 reinhard.muel...@bytewise.at-20101020141905-vjg7r3wihnm7mxam

   + 3116 reinhard.muel...@bytewise.at-20100426083500-vtmq0qvd7htz02zx
3117 reinhard.muel...@bytewise.at-20100512151744-2jx8tmtop30kl5n0
3118 reinhard.muel...@bytewise.at-20100705094014-ks9yv7b8gs6ychrb
3119 reinhard.muel...@bytewise.at-20100706085143-hyxadj30ayg28jpx
3120 reinhard.muel...@bytewise.at-20100706140804-sn3npws1ykm81ubx
3121 reinhard.muel...@bytewise.at-20100909134008-5p7jq048nkutldse
3122 reinhard.muel...@bytewise.at-20100923144753-e8hthxho7n5mwg9z
3123 reinhard.muel...@bytewise.at-20100929193018-7r3injoy8g28fwm6
3124 reinhard.muel...@bytewise.at-20100930073631-ilf6smgjt6mfvkpz
3125 reinhard.muel...@bytewise.at-20101011191957-yaj9rkqbervc91ac
3126 reinhard.muel...@bytewise.at-20101020084039-jmfxjbctt6vc2usd
3127 reinhard.muel...@bytewise.at-20101020124425-0dpprxsmanmaenty
3128 reinhard.muel...@bytewise.at-20101020124541-zppkmzww1lnsk8x4
3129 reinhard.muel...@bytewise.at-20101020141905-vjg7r3wihnm7mxam
3130 reinhard.muel...@bytewise.at-20101020143045-pf9ywx1s3hdqbsh7


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
commit-gnue@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to