Update of /cvsroot/freevo/freevo/WIP/Barbieri
In directory sc8-pr-cvs1:/tmp/cvs-serv15767/WIP/Barbieri

Modified Files:
        info_area.py 
Log Message:
Some fixes


Index: info_area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/WIP/Barbieri/info_area.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** info_area.py        22 Jun 2003 20:52:23 -0000      1.7
--- info_area.py        22 Jun 2003 22:43:46 -0000      1.8
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.8  2003/06/22 22:43:46  gsbarbieri
+ # Some fixes
+ #
  # Revision 1.7  2003/06/22 20:52:23  dischi
  # readded len() support. WARNING: len(...)[==|>|<][0-9] is now one statement, no 
spaces allowed
***************
*** 79,83 ****
          check if the content needs an update
          """
!         return 1 #self.last_item != list
  
  
--- 82,105 ----
          check if the content needs an update
          """
!         return self.last_item != list
! 
!     def get_expression( self, expression ):
!         """ create the python expression """
!         exp = ''                
!         for b in expression.split( ' ' ):
!             if b in ( 'and', 'or', 'not' ):
!                 # valid operator
!                 exp += ' %s' % ( b )
!                 
!             elif b[ :4 ] == 'len(' and b.find( ')' ) > 0 and \
!                      len(b) - b.find(')') < 5:
!                 # lenght of something
!                 exp += ' item.getattr("%s") %s' % (b[:b.find(')')+1],
!                                                    b[b.find(')')+1:])
!             else:
!                 # an attribute
!                 exp += ' item.getattr("%s")' % b
!                 
!         return exp.strip()
  
  
***************
*** 139,155 ****
                  # recurse
  
!                 # create the python expression:
!                 exp = ''                
!                 for b in i.expression.split(' '):
!                     if b in ('and', 'or', 'not'):
!                         exp += ' %s' % ( b )
!                     elif b[:4] == 'len(' and b.find(')') > 0 and \
!                              len(b) - b.find(')') < 5:
!                         exp += ' item.getattr("%s") %s' % (b[:b.find(')')+1],
!                                                            b[b.find(')')+1:])
!                     else:
!                         exp += ' item.getattr("%s")' % b
! 
!                 exp = exp.strip()
                  # Evaluate the expression:
                  try:
--- 161,165 ----
                  # recurse
  
!                 exp = self.get_expression( i.expression )
                  # Evaluate the expression:
                  try:
***************
*** 203,218 ****
                  if i.expression:
                      # Yes, evaluate the expression
!                     exp = ''                    
!                     for b in i.expression.split(' '):
!                         if b in ('and', 'or', 'not'):
!                             exp += ' %s' % ( b )
!                         elif b[:4] == 'len(' and b.find(')') > 0 and \
!                                  len(b) - b.find(')') < 5:
!                             exp += ' item.getattr("%s") %s' % (b[:b.find(')')+1],
!                                                                b[b.find(')')+1:])
!                         else:
!                             exp += ' item.getattr("%s")' % b
!                             
!                     exp=exp.strip()
                      try:
                          # evaluate the expression:
--- 213,217 ----
                  if i.expression:
                      # Yes, evaluate the expression
!                     exp= self.get_expression( i.expression )
                      try:
                          # evaluate the expression:
***************
*** 258,262 ****
                  if m_height > 0: r.height = min( r.height, m_height )
                  i.x, i.y, i.width, i.height = r.x, r.y, r.width, r.height
!                 
                  x += r.width 
                  
--- 257,261 ----
                  if m_height > 0: r.height = min( r.height, m_height )
                  i.x, i.y, i.width, i.height = r.x, r.y, r.width, r.height
!                
                  x += r.width 
                  
***************
*** 264,268 ****
  
  
!             # We should shink the width and go next line (overflow)
              if x > width:
                  x = 0
--- 263,267 ----
  
  
!             # We should shrink the width and go next line (overflow)
              if x > width:
                  x = 0




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to