Update of /cvsroot/freevo/freevo/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv15753
Modified Files:
AlertBox.py Border.py Button.py ConfirmBox.py Container.py
GUIObject.py Image.py InputBox.py Label.py LayoutManagers.py
LetterBox.py LetterBoxGroup.py ListBox.py ListItem.py
OptionBox.py Panel.py PasswordInputBox.py PasswordLetterBox.py
PopupBox.py ProgressBox.py Progressbar.py RegionScroller.py
Scrollbar.py VideoBox.py ZIndexRenderer.py __init__.py
debug.py listboxdemo.py optiondemo.py scrolldemo.py
Log Message:
change debug to use _debug_ and set level to 2
Index: AlertBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/AlertBox.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** AlertBox.py 13 Sep 2003 10:08:22 -0000 1.19
--- AlertBox.py 12 Oct 2003 10:56:19 -0000 1.20
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.20 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.19 2003/09/13 10:08:22 dischi
# i18n support
***************
*** 126,131 ****
from types import *
- DEBUG = 0
-
import event as em
--- 129,132 ----
***************
*** 166,173 ****
def eventhandler(self, event):
! if DEBUG: print 'AlertBox: EVENT = %s for %s' % (event, self)
if event in (em.INPUT_ENTER, em.INPUT_EXIT):
! if DEBUG: print 'HIT OK'
self.destroy()
if self.handler:
--- 167,174 ----
def eventhandler(self, event):
! _debug_('AlertBox: EVENT = %s for %s' % (event, self))
if event in (em.INPUT_ENTER, em.INPUT_EXIT):
! _debug_('HIT OK')
self.destroy()
if self.handler:
Index: Border.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Border.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Border.py 1 Sep 2003 18:50:04 -0000 1.7
--- Border.py 12 Oct 2003 10:56:19 -0000 1.8
***************
*** 8,11 ****
--- 8,14 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.8 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.7 2003/09/01 18:50:04 dischi
# fix pygame bug by drawing more than one 1 pixel rec
***************
*** 79,88 ****
import pygame
from GUIObject import *
- DEBUG = 0
-
-
class Border(GUIObject):
"""
--- 82,89 ----
import pygame
+ import config
from GUIObject import *
class Border(GUIObject):
"""
***************
*** 177,182 ****
Todo: Implement what to do for other borders than flat.
"""
! if DEBUG: print " Inside Border.draw..."
! if DEBUG: print " Border type: ", self.style
# XXX Hack to make border draw inside the areas we expect.
--- 178,183 ----
Todo: Implement what to do for other borders than flat.
"""
! _debug_(" Inside Border.draw...", 2)
! _debug_(" Border type: ", self.style, 2)
# XXX Hack to make border draw inside the areas we expect.
***************
*** 189,194 ****
(i, i, w-2*i, h-2*i), 1)
! if DEBUG: print 'Border: x=%s, y=%s, w=%s, h=%s' % \
! (self.left, self.top, self.width, self.height)
# if self.style == self.BORDER_SHADOW:
--- 190,195 ----
(i, i, w-2*i, h-2*i), 1)
! _debug_('Border: x=%s, y=%s, w=%s, h=%s' % \
! (self.left, self.top, self.width, self.height), 2)
# if self.style == self.BORDER_SHADOW:
***************
*** 213,225 ****
# XXX Making hack to fix, but should be done proper.
! if DEBUG: print " Inside Border erase."
x,y,w,h = self.get_erase_rect()
! if DEBUG: print " Thick: ", self.thickness
! if DEBUG: print " Width: ", w
self.osd.screen.blit(self.parent.bg_image, (x,y), (x,y,w,h))
! if DEBUG: save_image(self)
! if DEBUG: print " Waiting at bottom of border erase"
! if DEBUG: self.osd.update()
! if DEBUG: wait_loop()
--- 214,227 ----
# XXX Making hack to fix, but should be done proper.
! _debug_(" Inside Border erase.", 2)
x,y,w,h = self.get_erase_rect()
! _debug_(" Thick: %s" % self.thickness, 2)
! _debug_(" Width: %s" % w, 2)
self.osd.screen.blit(self.parent.bg_image, (x,y), (x,y,w,h))
! if config.DEBUG > 1:
! save_image(self)
! _debug_(" Waiting at bottom of border erase", 2)
! self.osd.update()
! wait_loop()
Index: Button.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Button.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Button.py 13 Sep 2003 10:32:55 -0000 1.15
--- Button.py 12 Oct 2003 10:56:19 -0000 1.16
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.16 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.15 2003/09/13 10:32:55 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 91,97 ****
from types import *
- DEBUG = 0
-
-
class Button(Container):
"""
--- 94,97 ----
***************
*** 216,220 ****
def set_text(self, text):
! if DEBUG: print "Button::set_text: text=%s" % text
if type(text) in StringTypes:
self.text = text
--- 216,220 ----
def set_text(self, text):
! _debug_("Button::set_text: text=%s" % text, 2)
if type(text) in StringTypes:
self.text = text
Index: ConfirmBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/ConfirmBox.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** ConfirmBox.py 13 Sep 2003 10:34:19 -0000 1.20
--- ConfirmBox.py 12 Oct 2003 10:56:19 -0000 1.21
***************
*** 11,14 ****
--- 11,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.21 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.20 2003/09/13 10:34:19 dischi
# map EXIT to close the box
***************
*** 121,126 ****
from types import *
- DEBUG = 0
-
import event as em
--- 124,127 ----
***************
*** 171,175 ****
def eventhandler(self, event):
! if DEBUG: print 'ConfirmBox: EVENT = %s' % event
if event in (em.INPUT_LEFT, em.INPUT_RIGHT):
--- 172,176 ----
def eventhandler(self, event):
! _debug_('ConfirmBox: EVENT = %s' % event, 2)
if event in (em.INPUT_LEFT, em.INPUT_RIGHT):
***************
*** 185,189 ****
elif event == em.INPUT_ENTER:
if self.b0.selected:
! if DEBUG: print 'HIT OK'
self.destroy()
if self.handler: self.handler()
--- 186,190 ----
elif event == em.INPUT_ENTER:
if self.b0.selected:
! _debug_('HIT OK', 2)
self.destroy()
if self.handler: self.handler()
Index: Container.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Container.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Container.py 1 Sep 2003 18:48:36 -0000 1.6
--- Container.py 12 Oct 2003 10:56:19 -0000 1.7
***************
*** 7,10 ****
--- 7,13 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.7 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.6 2003/09/01 18:48:36 dischi
# fix typo
***************
*** 60,65 ****
from Border import Border
- DEBUG = config.DEBUG
-
class Container(GUIObject):
--- 63,66 ----
***************
*** 174,178 ****
def _draw(self):
! if DEBUG: print 'Container::draw %s' % self
for child in self.children:
--- 175,179 ----
def _draw(self):
! _debug_('Container::draw %s' % self, 2)
for child in self.children:
Index: GUIObject.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/GUIObject.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** GUIObject.py 8 Oct 2003 03:14:51 -0000 1.29
--- GUIObject.py 12 Oct 2003 10:56:19 -0000 1.30
***************
*** 8,11 ****
--- 8,14 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.30 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.29 2003/10/08 03:14:51 outlyer
# Make sure get_size() always returns int
***************
*** 107,112 ****
from Color import *
- DEBUG = 0
-
class GUIObject:
"""
--- 110,113 ----
***************
*** 147,151 ****
self.event_context = None
! if DEBUG: print "inside GUIOBJECT INIT"
# XXX: skin settings
--- 148,152 ----
self.event_context = None
! _debug_("inside GUIOBJECT INIT", 2)
# XXX: skin settings
***************
*** 348,357 ****
def get_selected_child(self):
! if DEBUG: print 'GSC: %s' % self
for child in self.children:
if not child.is_visible(): continue
! if DEBUG: print ' child: %s' % child
if child.selected == 1:
! if DEBUG: print ' selected'
return child
else:
--- 349,358 ----
def get_selected_child(self):
! _debug_('GSC: %s' % self)
for child in self.children:
if not child.is_visible(): continue
! _debug_(' child: %s' % child, 2)
if child.selected == 1:
! _debug_(' selected', 2)
return child
else:
***************
*** 384,388 ****
def draw(self, surface=None):
! if DEBUG: print 'GUIObject::draw %s' % self
if self.is_visible() == 0: return FALSE
--- 385,389 ----
def draw(self, surface=None):
! _debug_('GUIObject::draw %s' % self, 2)
if self.is_visible() == 0: return FALSE
***************
*** 426,430 ****
def bg_replace(self):
if not self.bg_surface: return
! if DEBUG: print 'GUIObject::draw: have bg_surface'
if self.parent.surface:
--- 427,431 ----
def bg_replace(self):
if not self.bg_surface: return
! _debug_('GUIObject::draw: have bg_surface', 2)
if self.parent.surface:
***************
*** 467,476 ****
self.visible = 0
! if DEBUG:
if self.bg_image:
iname = '/tmp/bg-%s-%s.bmp' % (self.left, self.top)
pygame.image.save( self.bg_image, iname )
!
! if DEBUG: print 'GUIObject.destroy(): %s' % self
if self.children:
--- 468,476 ----
self.visible = 0
! if config.DEBUG > 1:
if self.bg_image:
iname = '/tmp/bg-%s-%s.bmp' % (self.left, self.top)
pygame.image.save( self.bg_image, iname )
! print 'GUIObject.destroy(): %s' % self
if self.children:
***************
*** 479,483 ****
child.destroy() # the child will remove itself from children
! if DEBUG: print 'parent: %s' % self.parent
if self.parent:
self.parent.children.remove(self)
--- 479,483 ----
child.destroy() # the child will remove itself from children
! _debug_('parent: %s' % self.parent, 2)
if self.parent:
self.parent.children.remove(self)
Index: Image.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Image.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Image.py 5 Sep 2003 15:59:20 -0000 1.4
--- Image.py 12 Oct 2003 10:56:19 -0000 1.5
***************
*** 12,15 ****
--- 12,18 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.4 2003/09/05 15:59:20 outlyer
# Use StringTypes instead of "StringType" since StringTypes includes unicode,
***************
*** 56,62 ****
import config
from GUIObject import GUIObject
-
- DEBUG = config.DEBUG
-
class Image(GUIObject):
--- 59,62 ----
Index: InputBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/InputBox.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** InputBox.py 6 Sep 2003 13:29:00 -0000 1.12
--- InputBox.py 12 Oct 2003 10:56:19 -0000 1.13
***************
*** 11,14 ****
--- 11,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.12 2003/09/06 13:29:00 gsbarbieri
# PopupBox and derivates now support you to choose mode (soft/hard) and
***************
*** 92,97 ****
from LetterBoxGroup import *
from types import *
-
- DEBUG = 0
import event as em
--- 95,98 ----
Index: Label.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Label.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Label.py 13 Sep 2003 10:32:55 -0000 1.21
--- Label.py 12 Oct 2003 10:56:19 -0000 1.22
***************
*** 10,13 ****
--- 10,16 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.22 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.21 2003/09/13 10:32:55 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 142,148 ****
from GUIObject import *
- DEBUG = 0
-
-
class Label(GUIObject):
"""
--- 145,148 ----
***************
*** 237,243 ****
Uses _getfont in osd, and the fontcache in osd.
"""
! if DEBUG: print 'LABEL: state=%s' % state
! if DEBUG: print 'LABEL: font=%s' % font
! if DEBUG: print 'LABEL: size=%s' % size
if type(font) in StringTypes and type(size) is IntType:
--- 237,243 ----
Uses _getfont in osd, and the fontcache in osd.
"""
! _debug_('LABEL: state=%s' % state, 2)
! _debug_('LABEL: font=%s' % font, 2)
! _debug_('LABEL: size=%s' % size, 2)
if type(font) in StringTypes and type(size) is IntType:
***************
*** 301,306 ****
def render(self):
! if DEBUG: print 'Label::_draw %s' % self
! if DEBUG: print ' text=%s' % self.text
if not self.font: raise TypeError, 'Oops, no font.'
--- 301,306 ----
def render(self):
! _debug_('Label::_draw %s' % self, 2)
! _debug_(' text=%s' % self.text, 2)
if not self.font: raise TypeError, 'Oops, no font.'
***************
*** 312,333 ****
if self.parent.selected:
- if DEBUG: print ' SELECTED'
fgc = self.selected_fg_color.get_color_trgb()
font = self.selected_font_name
size = self.selected_font_size
else:
- if DEBUG: print ' NOT SELECTED'
fgc = self.fg_color.get_color_trgb()
font = self.font_name
size = self.font_size
- if DEBUG: print ' fgc=%s' % fgc
-
(pw, ph) = self.parent.get_size()
if self.width > pw: self.width = pw
if self.height > ph: self.height = ph
self.surface = self.parent.surface.subsurface((self.left, self.top,
self.width, self.height))
- if DEBUG: print ' surface=%s' % self.surface
-
align_h = self.text_prop[ 'align_h' ]
align_v = self.text_prop[ 'align_v' ]
--- 312,327 ----
***************
*** 341,346 ****
layer=self.surface)
- if DEBUG: print ' %s,%s,%s,%s,%s' % (rest_words,return_x0,return_y0,
- return_x1,return_y1)
# LABEL: ,71,17,294,43
self.width = return_x1 - return_x0
--- 335,338 ----
***************
*** 351,360 ****
# self.height = return_y1
! if DEBUG: print ' parent="%s"' % self.parent
! if DEBUG: print ' self.surface="%s"' % self.surface
! if DEBUG: print ' surface.rect: %s' % self.surface.get_rect()
! if DEBUG: print ' self.rect: %s,%s,%s,%s' % self.get_rect()
! if DEBUG: print ' parent.surface="%s"' % self.parent.surface
! if DEBUG: print ' position="%s,%s"' % self.get_position()
--- 343,352 ----
# self.height = return_y1
! _debug_(' parent="%s"' % self.parent, 2)
! _debug_(' self.surface="%s"' % self.surface, 2)
! _debug_(' surface.rect: %s' % self.surface.get_rect(), 2)
! _debug_(' self.rect: %s,%s,%s,%s' % self.get_rect(), 2)
! _debug_(' parent.surface="%s"' % self.parent.surface, 2)
! _debug_(' position="%s,%s"' % self.get_position(), 2)
***************
*** 362,366 ****
self.render()
! if DEBUG: print ' draw position="%s,%s"' % self.get_position()
self.blit_parent()
--- 354,358 ----
self.render()
! _debug_(' draw position="%s,%s"' % self.get_position(), 2)
self.blit_parent()
Index: LayoutManagers.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/LayoutManagers.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** LayoutManagers.py 7 Sep 2003 11:16:16 -0000 1.13
--- LayoutManagers.py 12 Oct 2003 10:56:19 -0000 1.14
***************
*** 12,15 ****
--- 12,18 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.14 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.13 2003/09/07 11:16:16 dischi
# add option to center the container on screen
***************
*** 86,91 ****
from Label import *
- DEBUG = 0
-
class LayoutManager:
--- 89,92 ----
***************
*** 132,147 ****
for i in range(num_children):
child = self.container.children[i]
! if DEBUG: print 'FlowLayout: container="%s"' % self.container
! if DEBUG: print ' child="%s"' % child
! if DEBUG: print ' child is %sx%s' % (child.width,child.height)
if not child.is_visible():
! if DEBUG: print ' skipping something invisible'
continue
if isinstance(child, Border):
! if DEBUG: print ' skipping border'
continue
if isinstance(child, Scrollbar):
! if DEBUG: print ' skipping scrollbar'
continue
--- 133,148 ----
for i in range(num_children):
child = self.container.children[i]
! _debug_('FlowLayout: container="%s"' % self.container, 2)
! _debug_(' child="%s"' % child, 2)
! _debug_(' child is %sx%s' % (child.width,child.height), 2)
if not child.is_visible():
! _debug_(' skipping something invisible', 2)
continue
if isinstance(child, Border):
! _debug_(' skipping border', 2)
continue
if isinstance(child, Scrollbar):
! _debug_(' skipping scrollbar', 2)
continue
***************
*** 152,156 ****
if child.width == -1:
! if DEBUG: print ' child width not set'
# if next and next.h_align == Align.RIGHT and next.width > 0:
# if DEBUG: print ' next align is RIGHT'
--- 153,157 ----
if child.width == -1:
! _debug_(' child width not set', 2)
# if next and next.h_align == Align.RIGHT and next.width > 0:
# if DEBUG: print ' next align is RIGHT'
***************
*** 163,167 ****
child.width = self.container.width - \
2 * self.container.h_margin
! if DEBUG: print ' child width set to %s' % child.width
--- 164,168 ----
child.width = self.container.width - \
2 * self.container.h_margin
! _debug_(' child width set to %s' % child.width, 2)
***************
*** 172,189 ****
child.height = self.container.height - \
self.container.v_margin - y
! if DEBUG: print ' child was %sx%s' %
(child.width,child.height)
child.get_rendered_size()
! if DEBUG: print ' child now %sx%s' %
(child.width,child.height)
end = x + child.width + self.container.h_margin
! if DEBUG: print ' end is %s' % end
!
! if DEBUG: print ' child row len is %s' % len(self.table[row])
! if DEBUG: print ' child h_align is %s' % child.h_align
if end > self.container.width or \
(len(self.table[row]) and (child.h_align == Align.LEFT or \
child.h_align == Align.CENTER)):
- if DEBUG: print ' new row'
row += 1
self.table.append([])
--- 173,188 ----
child.height = self.container.height - \
self.container.v_margin - y
! _debug_(' child was %sx%s' % (child.width,child.height),
2)
child.get_rendered_size()
! _debug_(' child now %sx%s' % (child.width,child.height),
2)
end = x + child.width + self.container.h_margin
! _debug_(' end is %s' % end, 2)
! _debug_(' child row len is %s' % len(self.table[row]), 2)
! _debug_(' child h_align is %s' % child.h_align, 2)
if end > self.container.width or \
(len(self.table[row]) and (child.h_align == Align.LEFT or \
child.h_align == Align.CENTER)):
row += 1
self.table.append([])
***************
*** 194,198 ****
if child.height > line_height:
line_height = child.height
- if DEBUG: print ' line_height now %s' % line_height
if y + child.height > \
--- 193,196 ----
***************
*** 201,207 ****
self.container.height = y + child.height + \
self.container.v_margin
! if DEBUG:
! print 'LAYOUT: fit me in! (%s) - %s' % \
! (self.container.height, self)
else:
break
--- 199,204 ----
self.container.height = y + child.height + \
self.container.v_margin
! _debug_('LAYOUT: fit me in! (%s) - %s' % \
! (self.container.height, self), 2)
else:
break
***************
*** 210,214 ****
next_y = y
! if DEBUG: print ' position="%s,%s"' % (x, y)
child.set_position(x, y)
self.table[row].append(child)
--- 207,211 ----
next_y = y
! _debug_(' position="%s,%s"' % (x, y), 2)
child.set_position(x, y)
self.table[row].append(child)
***************
*** 236,240 ****
(child.left + child.width / 2)
child.left += x_offset
! if DEBUG: print ' moved right by %s' % x_offset
if child.h_align == Align.LEFT:
--- 233,237 ----
(child.left + child.width / 2)
child.left += x_offset
! _debug_(' moved right by %s' % x_offset, 2)
if child.h_align == Align.LEFT:
***************
*** 247,251 ****
(child.top + child.height / 2)
child.top += y_offset
! if DEBUG: print ' moved down by %s' % y_offset
# If there is really just one visible child inside this
--- 244,248 ----
(child.top + child.height / 2)
child.top += y_offset
! _debug_(' moved down by %s' % y_offset, 2)
# If there is really just one visible child inside this
***************
*** 275,279 ****
for child in row:
child.left += x_offset
! if DEBUG: print ' moved right by %s' % x_offset
elif len(row) == 1 and row[0].h_align == Align.CENTER:
--- 272,276 ----
for child in row:
child.left += x_offset
! _debug_(' moved right by %s' % x_offset, 2)
elif len(row) == 1 and row[0].h_align == Align.CENTER:
***************
*** 281,285 ****
(row[0].left + row[0].width / 2)
row[0].left += x_offset
! if DEBUG: print ' moved right by %s' % x_offset
--- 278,282 ----
(row[0].left + row[0].width / 2)
row[0].left += x_offset
! _debug_(' moved right by %s' % x_offset, 2)
Index: LetterBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/LetterBox.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** LetterBox.py 2 Jun 2003 03:28:41 -0000 1.12
--- LetterBox.py 12 Oct 2003 10:56:19 -0000 1.13
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.12 2003/06/02 03:28:41 rshortt
# Fixes for event changes.
***************
*** 86,91 ****
from GUIObject import Align
from Button import Button
-
- DEBUG = 0
--- 89,92 ----
Index: LetterBoxGroup.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/LetterBoxGroup.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** LetterBoxGroup.py 25 Jun 2003 02:27:39 -0000 1.12
--- LetterBoxGroup.py 12 Oct 2003 10:56:19 -0000 1.13
***************
*** 11,14 ****
--- 11,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.12 2003/06/25 02:27:39 rshortt
# Allow 'frame' containers to grow verticly to hold all contents. Also
***************
*** 86,91 ****
from LetterBox import *
from PasswordLetterBox import *
-
- DEBUG = 0
--- 89,92 ----
Index: ListBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/ListBox.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ListBox.py 13 Sep 2003 10:32:55 -0000 1.18
--- ListBox.py 12 Oct 2003 10:56:19 -0000 1.19
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.19 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.18 2003/09/13 10:32:55 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 105,111 ****
import pygame
- DEBUG = 0
-
-
class ListBox(RegionScroller):
"""
--- 108,111 ----
***************
*** 162,166 ****
def scroll(self, direction):
! if DEBUG: print 'listbox scroll: direction="%s"' % direction
if direction in (em.INPUT_RIGHT, em.INPUT_LEFT):
--- 162,166 ----
def scroll(self, direction):
! _debug_('listbox scroll: direction="%s"' % direction, 2)
if direction in (em.INPUT_RIGHT, em.INPUT_LEFT):
***************
*** 302,309 ****
def eventhandler(self, event):
! if DEBUG: print 'ListBox::eventhandler: event=%s' % event
if event in (em.INPUT_UP, em.INPUT_DOWN, em.INPUT_LEFT, em.INPUT_RIGHT ):
! if DEBUG: print 'ListBox::eventhandler: should scroll'
self.scroll(event)
self.parent.draw()
--- 302,309 ----
def eventhandler(self, event):
! _debug_('ListBox::eventhandler: event=%s' % event, 2)
if event in (em.INPUT_UP, em.INPUT_DOWN, em.INPUT_LEFT, em.INPUT_RIGHT ):
! _debug_('ListBox::eventhandler: should scroll', 2)
self.scroll(event)
self.parent.draw()
Index: ListItem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/ListItem.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ListItem.py 13 Sep 2003 10:32:56 -0000 1.12
--- ListItem.py 12 Oct 2003 10:56:19 -0000 1.13
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.12 2003/09/13 10:32:56 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 86,92 ****
from Label import *
from types import *
-
- DEBUG = 0
-
class ListItem(Button):
--- 89,92 ----
Index: OptionBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/OptionBox.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** OptionBox.py 13 Sep 2003 10:32:56 -0000 1.10
--- OptionBox.py 12 Oct 2003 10:56:19 -0000 1.11
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.11 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.10 2003/09/13 10:32:56 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 81,87 ****
from Label import *
from types import *
-
- DEBUG = 0
-
class OptionBox(Button):
--- 84,87 ----
Index: Panel.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Panel.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Panel.py 25 Jun 2003 02:27:39 -0000 1.4
--- Panel.py 12 Oct 2003 10:56:19 -0000 1.5
***************
*** 7,10 ****
--- 7,13 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.4 2003/06/25 02:27:39 rshortt
# Allow 'frame' containers to grow verticly to hold all contents. Also
***************
*** 47,53 ****
from Container import Container
from LayoutManagers import FlowLayout
-
- DEBUG = config.DEBUG
-
class Panel(Container):
--- 50,53 ----
Index: PasswordInputBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/PasswordInputBox.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** PasswordInputBox.py 27 May 2003 17:53:34 -0000 1.7
--- PasswordInputBox.py 12 Oct 2003 10:56:19 -0000 1.8
***************
*** 11,14 ****
--- 11,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.8 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.7 2003/05/27 17:53:34 dischi
# Added new event handler module
***************
*** 72,78 ****
import event as em
-
- DEBUG = 0
-
class PasswordInputBox(PopupBox):
--- 75,78 ----
Index: PasswordLetterBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/PasswordLetterBox.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PasswordLetterBox.py 13 Sep 2003 10:32:56 -0000 1.4
--- PasswordLetterBox.py 12 Oct 2003 10:56:19 -0000 1.5
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.4 2003/09/13 10:32:56 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 59,64 ****
from LetterBox import *
from types import *
-
- DEBUG = 0
--- 62,65 ----
Index: PopupBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/PopupBox.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** PopupBox.py 14 Sep 2003 09:15:08 -0000 1.34
--- PopupBox.py 12 Oct 2003 10:56:19 -0000 1.35
***************
*** 11,14 ****
--- 11,17 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.35 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.34 2003/09/14 09:15:08 dischi
# removed debug
***************
*** 93,98 ****
from types import *
- DEBUG = 0
-
import rc
import event as em
--- 96,99 ----
***************
*** 139,143 ****
parent.add_child(self)
! if DEBUG: print 'set focus to %s' % self
self.osd.add_app(self)
--- 140,144 ----
parent.add_child(self)
! _debug_('set focus to %s' % self, 2)
self.osd.add_app(self)
***************
*** 260,264 ****
"""
! if DEBUG: print 'PopupBox::_draw %s' % self
if not self.width or not self.height:
--- 261,265 ----
"""
! _debug_('PopupBox::_draw %s' % self, 2)
if not self.width or not self.height:
***************
*** 286,290 ****
"""
! if DEBUG: print " Inside PopupBox._erase..."
# Only update the part of screen we're at.
self.osd.screen.blit(self.bg_surface, self.get_position(),
--- 287,291 ----
"""
! _debug_(" Inside PopupBox._erase...", 2)
# Only update the part of screen we're at.
self.osd.screen.blit(self.bg_surface, self.get_position(),
***************
*** 292,300 ****
if self.border:
! if DEBUG: print " Has border, doing border erase."
self.border._erase()
- if DEBUG: print " ...", self
-
def refresh(self):
--- 293,299 ----
if self.border:
! _debug_(" Has border, doing border erase.", 2)
self.border._erase()
def refresh(self):
***************
*** 307,313 ****
def eventhandler(self, event):
! if DEBUG: print 'PopupBox: event = %s' % event
! elif event == em.INPUT_EXIT:
self.destroy()
else:
--- 306,312 ----
def eventhandler(self, event):
! _debug_('PopupBox: event = %s' % event, 2)
! if event == em.INPUT_EXIT:
self.destroy()
else:
Index: ProgressBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/ProgressBox.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ProgressBox.py 1 Sep 2003 18:52:55 -0000 1.1
--- ProgressBox.py 12 Oct 2003 10:56:19 -0000 1.2
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.2 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.1 2003/09/01 18:52:55 dischi
# Add progressbar and box with progressbar
***************
*** 44,49 ****
from Label import *
from types import *
-
- DEBUG = 0
import event as em
--- 47,50 ----
Index: Progressbar.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Progressbar.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Progressbar.py 13 Sep 2003 10:32:56 -0000 1.2
--- Progressbar.py 12 Oct 2003 10:56:19 -0000 1.3
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.3 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.2 2003/09/13 10:32:56 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 49,55 ****
from Label import *
from types import *
-
- DEBUG = 0
-
class Progressbar(Container):
--- 52,55 ----
Index: RegionScroller.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/RegionScroller.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** RegionScroller.py 24 Sep 2003 18:21:27 -0000 1.19
--- RegionScroller.py 12 Oct 2003 10:56:19 -0000 1.20
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.20 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.19 2003/09/24 18:21:27 outlyer
# Fix assignment to None. I screwed up the first time I did it, but this
***************
*** 119,125 ****
import event as em
- DEBUG = 0
-
-
class RegionScroller(Container):
"""
--- 122,125 ----
***************
*** 216,220 ****
def scroll(self, direction):
! if DEBUG: print 'scrolldir: direction="%s"' % direction
if direction == em.INPUT_RIGHT:
--- 216,220 ----
def scroll(self, direction):
! _debug_('scrolldir: direction="%s"' % direction, 2)
if direction == em.INPUT_RIGHT:
***************
*** 238,242 ****
new_y = 0
self.v_y = new_y
! if DEBUG: self.print_stuff()
--- 238,243 ----
new_y = 0
self.v_y = new_y
! if config.DEBUG > 1:
! self.print_stuff()
***************
*** 299,303 ****
GUIObject.set_position(self, left, top)
if isinstance(self.border, Border):
! if DEBUG: print "updating borders set_postion as well"
self.border.set_position(left, top)
--- 300,304 ----
GUIObject.set_position(self, left, top)
if isinstance(self.border, Border):
! _debug_("updating borders set_postion as well", 2)
self.border.set_position(left, top)
Index: Scrollbar.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/Scrollbar.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Scrollbar.py 13 Sep 2003 10:32:56 -0000 1.11
--- Scrollbar.py 12 Oct 2003 10:56:19 -0000 1.12
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.12 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.11 2003/09/13 10:32:56 dischi
# fix a font problem and cleanup some unneeded stuff
***************
*** 85,90 ****
from types import *
- DEBUG = 0
-
class Scrollbar(GUIObject):
--- 88,91 ----
***************
*** 147,151 ****
(a, b, c) = self.parent.get_view_percent(self.orientation)
! if DEBUG: print 'SB: a,b,c = %s,%s,%s' % (a, b, c)
if a == 100 or b == 100 or c == 100:
--- 148,152 ----
(a, b, c) = self.parent.get_view_percent(self.orientation)
! _debug_('SB: a,b,c = %s,%s,%s' % (a, b, c), 2)
if a == 100 or b == 100 or c == 100:
***************
*** 167,171 ****
fg_y = 0
! if DEBUG: print 'SB: handle_rect = %s,%s,%s,%s' % (fg_x, fg_y, fg_width,
fg_height)
return (fg_x, fg_y, fg_width, fg_height)
--- 168,172 ----
fg_y = 0
! _debug_('SB: handle_rect = %s,%s,%s,%s' % (fg_x, fg_y, fg_width, fg_height),
2)
return (fg_x, fg_y, fg_width, fg_height)
***************
*** 208,213 ****
self.border.height = self.height
! if DEBUG: print 'SB: parent_rect = %s,%s,%s,%s' % (self.parent.left,
self.parent.top, self.parent.width, self.parent.height)
! if DEBUG: print 'SB: self_rect = %s,%s,%s,%s' % (self.left, self.top,
self.width, self.height)
--- 209,217 ----
self.border.height = self.height
! if config.DEBUG > 1:
! print 'SB: parent_rect = %s,%s,%s,%s' % (self.parent.left,
self.parent.top,
! self.parent.width,
self.parent.height)
! print 'SB: self_rect = %s,%s,%s,%s' % (self.left, self.top, self.width,
! self.height)
***************
*** 230,234 ****
fg_c = self.fg_color.get_color_sdl()
! if DEBUG: print 'SB: fg_c = %s,%s,%s,%s' % fg_c
fg_a = self.fg_color.get_alpha()
--- 234,238 ----
fg_c = self.fg_color.get_color_sdl()
! _debug_('SB: fg_c = %s,%s,%s,%s' % fg_c, 2)
fg_a = self.fg_color.get_alpha()
***************
*** 240,244 ****
if self.border: self.border.draw()
! if DEBUG: print 'SB::_draw: pos=%s,%s' % (self.left, self.top)
self.blit_parent()
--- 244,248 ----
if self.border: self.border.draw()
! _debug_('SB::_draw: pos=%s,%s' % (self.left, self.top), 2)
self.blit_parent()
Index: VideoBox.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/VideoBox.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VideoBox.py 14 Jul 2003 19:39:01 -0000 1.1
--- VideoBox.py 12 Oct 2003 10:56:19 -0000 1.2
***************
*** 7,10 ****
--- 7,13 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.2 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.1 2003/07/14 19:39:01 rshortt
# A new class for having a small video preview window. It doesn't work yet!
***************
*** 39,45 ****
from gui.Border import Border
- DEBUG = config.DEBUG
-
-
class VideoBox(GUIObject):
"""
--- 42,45 ----
***************
*** 78,82 ****
def _draw(self):
! if DEBUG: print 'VideoBox::_draw %s' % self
if not self.width or not self.height:
--- 78,82 ----
def _draw(self):
! _debug_('VideoBox::_draw %s' % self, 2)
if not self.width or not self.height:
Index: ZIndexRenderer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/ZIndexRenderer.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ZIndexRenderer.py 12 Jul 2003 10:11:34 -0000 1.9
--- ZIndexRenderer.py 12 Oct 2003 10:56:19 -0000 1.10
***************
*** 7,10 ****
--- 7,13 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.10 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.9 2003/07/12 10:11:34 dischi
# load osd only when needed
***************
*** 98,107 ****
import osd
import pygame
- DEBUG = 0
-
_singleton = None
--- 101,109 ----
+ import config
import osd
import pygame
_singleton = None
***************
*** 209,213 ****
# osd.putsurface(o.bg_surface, o.left, o.top)
# osd.update()
! if DEBUG:
o.bg_image = o.bg_surface.convert()
iname = '/tmp/last-hide.bmp'
--- 211,215 ----
# osd.putsurface(o.bg_surface, o.left, o.top)
# osd.update()
! if config.DEBUG > 1:
o.bg_image = o.bg_surface.convert()
iname = '/tmp/last-hide.bmp'
***************
*** 249,253 ****
# o.bg_surface = osd.getsurface(o.left, o.top,
# o.width, o.height)
! if DEBUG:
o.bg_image = o.bg_surface.convert()
iname = '/tmp/bg1-%s.bmp' % xx
--- 251,255 ----
# o.bg_surface = osd.getsurface(o.left, o.top,
# o.width, o.height)
! if config.DEBUG > 1:
o.bg_image = o.bg_surface.convert()
iname = '/tmp/bg1-%s.bmp' % xx
Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/__init__.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** __init__.py 2 May 2003 01:09:03 -0000 1.8
--- __init__.py 12 Oct 2003 10:56:19 -0000 1.9
***************
*** 20,23 ****
--- 20,26 ----
#-----------------------------------------------------------------------
# $Log$
+ # Revision 1.9 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.8 2003/05/02 01:09:03 rshortt
# Changes in the way these objects draw. They all maintain a self.surface
***************
*** 91,99 ****
- DEBUG = 0
-
import sys
import os.path
!
from gui.Border import *
from gui.Color import *
--- 94,101 ----
import sys
import os.path
! import config
!
from gui.Border import *
from gui.Color import *
***************
*** 119,125 ****
! if DEBUG:
from gui.debug import *
-
-
-
--- 121,124 ----
! if config.DEBUG > 1:
from gui.debug import *
Index: debug.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/debug.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** debug.py 15 Aug 2003 19:25:15 -0000 1.3
--- debug.py 12 Oct 2003 10:56:19 -0000 1.4
***************
*** 33,38 ****
import util
- DEBUG = 1
-
# ======================================================================
# XXX These functions are here for debug.. I'll remove them in time.
--- 33,36 ----
Index: listboxdemo.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/listboxdemo.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** listboxdemo.py 13 Jul 2003 19:28:58 -0000 1.11
--- listboxdemo.py 12 Oct 2003 10:56:19 -0000 1.12
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.12 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.11 2003/07/13 19:28:58 rshortt
# Bugfix.
***************
*** 88,94 ****
import event as em
-
- DEBUG = 0
-
class listboxdemo(PopupBox):
--- 91,94 ----
Index: optiondemo.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/optiondemo.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** optiondemo.py 13 Jul 2003 19:28:58 -0000 1.11
--- optiondemo.py 12 Oct 2003 10:56:19 -0000 1.12
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.12 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.11 2003/07/13 19:28:58 rshortt
# Bugfix.
***************
*** 88,94 ****
import event as em
-
- DEBUG = 0
-
class optiondemo(PopupBox):
--- 91,94 ----
Index: scrolldemo.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/scrolldemo.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** scrolldemo.py 27 May 2003 17:53:34 -0000 1.10
--- scrolldemo.py 12 Oct 2003 10:56:19 -0000 1.11
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.11 2003/10/12 10:56:19 dischi
+ # change debug to use _debug_ and set level to 2
+ #
# Revision 1.10 2003/05/27 17:53:34 dischi
# Added new event handler module
***************
*** 84,89 ****
import event as em
-
- DEBUG = 0
--- 87,90 ----
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog