Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18266
Modified Files:
eventhandler.py
Log Message:
make it possible that the current applications hides
Index: eventhandler.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/eventhandler.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** eventhandler.py 27 Aug 2004 14:25:48 -0000 1.8
--- eventhandler.py 15 Sep 2004 19:38:20 -0000 1.9
***************
*** 9,12 ****
--- 9,15 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.9 2004/09/15 19:38:20 dischi
+ # make it possible that the current applications hides
+ #
# Revision 1.8 2004/08/27 14:25:48 dischi
# small typo bugfix
***************
*** 364,401 ****
p.eventhandler(event=event)
- if event == FUNCTION_CALL:
- return event.arg()
-
- if event.handler:
- return event.handler(event=event)
-
if config.TIME_DEBUG:
t1 = time.clock()
try:
! if str(event) in self.registered:
for c in self.registered[str(event)]:
c.eventhandler(event=event)
elif len(self.popups) and self.popups[-1].eventhandler(event=event):
pass
elif not self.applications[-1].eventhandler(event=event):
for p in self.eventhandler_plugins:
if p.eventhandler(event=event):
break
else:
_debug_('no eventhandler for event %s (app: %s)' \
% (event, self.applications[-1]), 2)
if self.stack_change:
# our stack has changed, reset the focus
self.set_focus()
! elif self.applications[-1]._evt_stopped:
! # the current application wants to be removed
previous, current = self.applications[-2:]
self.applications.remove(current)
self.stack_change = current, previous
self.set_focus()
!
if config.TIME_DEBUG:
print time.clock() - t1
--- 367,419 ----
p.eventhandler(event=event)
if config.TIME_DEBUG:
t1 = time.clock()
try:
! if event == FUNCTION_CALL:
! # event is a direct function call, call it and do not pass it
! # on the the normal handling
! event.arg()
!
! elif event.handler:
! # event has it's own handler function, call this function and do
! # not pass it on the the normal handling
! event.handler(event=event)
!
! elif str(event) in self.registered:
! # event is in the list of registered events. This events are special
! # and should only go to the callbacks registered
for c in self.registered[str(event)]:
c.eventhandler(event=event)
+
elif len(self.popups) and self.popups[-1].eventhandler(event=event):
+ # handled by the current popup
pass
elif not self.applications[-1].eventhandler(event=event):
+ # pass event to the current application
for p in self.eventhandler_plugins:
+ # pass it to all plugins when the application didn't use it
if p.eventhandler(event=event):
break
else:
+ # nothing found for this event
_debug_('no eventhandler for event %s (app: %s)' \
% (event, self.applications[-1]), 2)
+ # now do some checking if the focus needs to be changed
if self.stack_change:
# our stack has changed, reset the focus
self.set_focus()
! elif self.applications[-1]._evt_stopped or \
! not self.applications[-1].visible:
! # the current application wants to be removed, either because
! # stop() is called or the hide() function was called from the
! # event handling
previous, current = self.applications[-2:]
self.applications.remove(current)
self.stack_change = current, previous
self.set_focus()
!
if config.TIME_DEBUG:
print time.clock() - t1
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog