[Pychord-commits] r63 - in trunk: pgui pychord2

danilo at garage.maemo.org danilo at garage.maemo.org
Sun Mar 23 00:10:01 EET 2008


Author: danilo
Date: 2008-03-23 00:10:00 +0200 (Sun, 23 Mar 2008)
New Revision: 63

Modified:
   trunk/pgui/widget.py
   trunk/pychord2/window_search.py
   trunk/pychord2/window_show.py
Log:
- Changing the widget.draw function to works when widget.father == None

Modified: trunk/pgui/widget.py
===================================================================
--- trunk/pgui/widget.py	2008-03-22 22:05:49 UTC (rev 62)
+++ trunk/pgui/widget.py	2008-03-22 22:10:00 UTC (rev 63)
@@ -35,8 +35,11 @@
         
     def draw(self, screen, force = False, rect = None):
         
+        if self.father == None:
+            pguiobject.draw(self, screen, force)
+        
         # Verifing if the image really needs to be painted
-        if self.rect.colliderect(self.father.rect):
+        elif self.rect.colliderect(self.father.rect):
             
             #calculating what needs to be painted
             r = self.father.rect.clip(self.rect)

Modified: trunk/pychord2/window_search.py
===================================================================
--- trunk/pychord2/window_search.py	2008-03-22 22:05:49 UTC (rev 62)
+++ trunk/pychord2/window_search.py	2008-03-22 22:10:00 UTC (rev 63)
@@ -15,10 +15,6 @@
         # creating window
         window.__init__(self, None, screen )
         
-        uplabel = label(self,[300,200],"Opening Song", ptsize = 40, bgcolor = (255,0,0))
-        uplabel.draw(self.screen)
-        pygame.display.flip()
-        
         # Put something in the screen
         # while sqlite search by the keyword
         # When it finish, clean the event list

Modified: trunk/pychord2/window_show.py
===================================================================
--- trunk/pychord2/window_show.py	2008-03-22 22:05:49 UTC (rev 62)
+++ trunk/pychord2/window_show.py	2008-03-22 22:10:00 UTC (rev 63)
@@ -2,6 +2,7 @@
 from pgui import window
 
 from pgui import Ibutton
+from pgui import label
 
 from chordlist import chordlist 
 from pysql import *
@@ -16,6 +17,10 @@
     
     
     def __init__(self, screen, pyc, SongCod):
+        
+        uplabel = label(None,[300,200],"Opening Song", ptsize = 40, bgcolor = (255,0,0))
+        uplabel.draw(screen)
+        pygame.display.flip()
       
         window.__init__(self, None, screen )
         pygame.event.clear()



More information about the Pychord-commits mailing list