Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22125/src
Modified Files:
event.py eventhandler.py playlist.py plugin.py
Log Message:
adjust to new event interface
Index: playlist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/playlist.py,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** playlist.py 15 Jul 2005 20:50:36 -0000 1.94
--- playlist.py 16 Jul 2005 09:48:20 -0000 1.95
***************
*** 479,484 ****
# if event == PLAY_END:
# if self.__current and self.__current.type == 'audio':
! # e = Event(AUDIO_LOG, arg=self.__current.filename)
! # eventhandler.post(e)
#
# if event in (INPUT_1, INPUT_2, INPUT_3, INPUT_4, INPUT_5) and \
--- 479,483 ----
# if event == PLAY_END:
# if self.__current and self.__current.type == 'audio':
! # AUDIO_LOG.post(self.__current.filename)
#
# if event in (INPUT_1, INPUT_2, INPUT_3, INPUT_4, INPUT_5) and \
***************
*** 486,491 ****
# hasattr(self.__current,'type'):
# if (self.__current.type == 'audio'):
! # e = Event(RATING,(event.arg, self.__current.filename))
! # eventhandler.post(e)
if event == PLAYLIST_TOGGLE_REPEAT:
--- 485,489 ----
# hasattr(self.__current,'type'):
# if (self.__current.type == 'audio'):
! # RATING.post(event.arg, self.__current.filename)
if event == PLAYLIST_TOGGLE_REPEAT:
Index: eventhandler.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/eventhandler.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** eventhandler.py 16 Jul 2005 08:41:11 -0000 1.29
--- eventhandler.py 16 Jul 2005 09:48:20 -0000 1.30
***************
*** 109,119 ****
- def register(application, event):
- """
- Register for a specific event
- """
- return get_singleton().register(application, event)
-
-
def get():
"""
--- 109,112 ----
***************
*** 131,141 ****
- def post(event):
- """
- Send an event to the event queue
- """
- return get_singleton().post(event)
-
-
#
-----------------------------------------------------------------------------
--- 124,127 ----
***************
*** 250,263 ****
- def register(self, application, event):
- """
- Register for a specific event
- """
- if hasattr(application, 'eventhandler'):
- application = application.eventhandler
- handler = kaa.notifier.EventHandler(application)
- handler.register(event)
-
-
def get(self):
"""
--- 236,239 ----
***************
*** 274,286 ****
- def post(self, event):
- """
- Send an event to the event queue
- """
- if not isinstance(event, Event):
- event = Event(event)
- event.post()
-
-
def handle(self, event):
"""
--- 250,253 ----
Index: plugin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugin.py,v
retrieving revision 1.93
retrieving revision 1.94
diff -C2 -d -r1.93 -r1.94
*** plugin.py 15 Jul 2005 20:41:57 -0000 1.93
--- plugin.py 16 Jul 2005 09:48:20 -0000 1.94
***************
*** 255,263 ****
! def event(name, arg=None):
"""
create plugin event
"""
! return Event('PLUGIN_EVENT %s' % name, arg=arg)
--- 255,263 ----
! def event(name, *args):
"""
create plugin event
"""
! return Event('PLUGIN_EVENT %s' % name, *args)
Index: event.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/event.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** event.py 16 Jul 2005 08:56:07 -0000 1.61
--- event.py 16 Jul 2005 09:48:20 -0000 1.62
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.62 2005/07/16 09:48:20 dischi
+ # adjust to new event interface
+ #
# Revision 1.61 2005/07/16 08:56:07 dischi
# add function to set the handler
***************
*** 99,117 ****
activate some action.
"""
! def __init__(self, name, arg=None, handler=None):
! if isinstance(name, Event):
! self.name = name.name
! self.arg = name.arg
! self.handler = name.handler
! else:
! self.name = name
! self.arg = None
! self.handler = None
!
! if arg or arg == 0:
! self.arg = arg
!
! if handler:
! self.handler = handler
--- 102,108 ----
activate some action.
"""
! def __init__(self, name, *args):
! kaa.notifier.Event.__init__(self, name, *args)
! self.handler = None
***************
*** 125,130 ****
def __int__(self):
"""
! return the event as int (the last char of the name will be returned
! as integer value
"""
return int(self.name[-1])
--- 116,121 ----
def __int__(self):
"""
! Return the event as int (the last char of the name will be returned
! as integer value. FIXME: remove this function!
"""
return int(self.name[-1])
***************
*** 137,142 ****
#
! MIXER_VOLUP = Event('MIXER_VOLUP', arg=5)
! MIXER_VOLDOWN = Event('MIXER_VOLDOWN', arg=5)
MIXER_MUTE = Event('MIXER_MUTE')
TOGGLE_CONTROL = Event('TOGGLE_CONTROL')
--- 128,133 ----
#
! MIXER_VOLUP = Event('MIXER_VOLUP', 5)
! MIXER_VOLDOWN = Event('MIXER_VOLDOWN', 5)
MIXER_MUTE = Event('MIXER_MUTE')
TOGGLE_CONTROL = Event('TOGGLE_CONTROL')
***************
*** 145,149 ****
# local_conf.py (setting VOL+ step size to 2)
#
! # EVENTS['global']['VOL+'] = Event('MIXER_VOLUP', arg=2)
--- 136,140 ----
# local_conf.py (setting VOL+ step size to 2)
#
! # EVENTS['global']['VOL+'] = Event('MIXER_VOLUP', 2)
***************
*** 269,282 ****
INPUT_UP = Event('INPUT_UP')
INPUT_DOWN = Event('INPUT_DOWN')
! INPUT_1 = Event('INPUT_1', arg=1)
! INPUT_2 = Event('INPUT_2', arg=2)
! INPUT_3 = Event('INPUT_3', arg=3)
! INPUT_4 = Event('INPUT_4', arg=4)
! INPUT_5 = Event('INPUT_5', arg=5)
! INPUT_6 = Event('INPUT_6', arg=6)
! INPUT_7 = Event('INPUT_7', arg=7)
! INPUT_8 = Event('INPUT_8', arg=8)
! INPUT_9 = Event('INPUT_9', arg=9)
! INPUT_0 = Event('INPUT_0', arg=0)
INPUT_ALL_NUMBERS = (INPUT_0, INPUT_1, INPUT_2, INPUT_3, INPUT_4, INPUT_5,
--- 260,273 ----
INPUT_UP = Event('INPUT_UP')
INPUT_DOWN = Event('INPUT_DOWN')
! INPUT_1 = Event('INPUT_1', 1)
! INPUT_2 = Event('INPUT_2', 2)
! INPUT_3 = Event('INPUT_3', 3)
! INPUT_4 = Event('INPUT_4', 4)
! INPUT_5 = Event('INPUT_5', 5)
! INPUT_6 = Event('INPUT_6', 6)
! INPUT_7 = Event('INPUT_7', 7)
! INPUT_8 = Event('INPUT_8', 8)
! INPUT_9 = Event('INPUT_9', 9)
! INPUT_0 = Event('INPUT_0', 0)
INPUT_ALL_NUMBERS = (INPUT_0, INPUT_1, INPUT_2, INPUT_3, INPUT_4, INPUT_5,
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog