Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22125/src/audio/plugins

Modified Files:
        cdbackup.py detach.py logger.py mplayervis.py playlist.py 
        radio.py 
Log Message:
adjust to new event interface

Index: detach.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/detach.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** detach.py   26 Jun 2005 17:04:18 -0000      1.29
--- detach.py   16 Jul 2005 09:48:21 -0000      1.30
***************
*** 39,42 ****
--- 39,43 ----
  import os.path
  import kaa.mevas.image
+ import kaa.notifier
  
  # freevo modules
***************
*** 47,51 ****
  import plugin
  import config
- import eventhandler
  
  from gui.animation.base import BaseAnimation
--- 48,51 ----
***************
*** 68,78 ****
          """
          IdleBarPlugin.__init__(self)
!         config.EVENTS['audio']['DISPLAY'] = Event(FUNCTION_CALL,
!                                                   arg=self.detach)
          plugin.register(self, 'audio.detach')
  
          # register for events
!         eventhandler.register(self, PLAY_START)
!         eventhandler.register(self, DETACH_AUDIO_STOP)
  
          self.visible    = False
--- 68,77 ----
          """
          IdleBarPlugin.__init__(self)
!         config.EVENTS['audio']['DISPLAY'] = Event(FUNCTION_CALL, self.detach)
          plugin.register(self, 'audio.detach')
  
          # register for events
!         handler = kaa.notifier.EventHandler(self.eventhandler)
!         handler.register(PLAY_START, DETACH_AUDIO_STOP)
  
          self.visible    = False
***************
*** 153,157 ****
                         a_handler, PLAYLIST_PREV),
                       ( _('Rew'), '%srew.png'  % path,
!                        a_handler, Event(SEEK, arg=-10)),
                       ( _('Pause'), '%spause.png'% path,
                         a_handler, PAUSE ),
--- 152,156 ----
                         a_handler, PLAYLIST_PREV),
                       ( _('Rew'), '%srew.png'  % path,
!                        a_handler, Event(SEEK, -10)),
                       ( _('Pause'), '%spause.png'% path,
                         a_handler, PAUSE ),
***************
*** 161,165 ****
                         self.eventhandler, STOP ),
                       ( _('FFwd'), '%sffwd.png' % path,
!                        a_handler, Event(SEEK,arg=10)),
                       ( _('Next'), '%snext.png' % path,
                         a_handler, PLAYLIST_NEXT),
--- 160,164 ----
                         self.eventhandler, STOP ),
                       ( _('FFwd'), '%sffwd.png' % path,
!                        a_handler, Event(SEEK, 10)),
                       ( _('Next'), '%snext.png' % path,
                         a_handler, PLAYLIST_NEXT),
***************
*** 352,356 ****
          if not audioplayer().running:
              # not running, stop
!             eventhandler.post(DETACH_AUDIO_STOP)
  
          self.frame += 1
--- 351,356 ----
          if not audioplayer().running:
              # not running, stop
!             # FIXME: maybe this is a Signal
!             DETACH_AUDIO_STOP.post()
  
          self.frame += 1

Index: playlist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/playlist.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** playlist.py 1 Aug 2004 10:41:52 -0000       1.10
--- playlist.py 16 Jul 2005 09:48:22 -0000      1.11
***************
*** 67,72 ****
      Add something like this to your local_conf.py
  
!     EVENTS['menu']['REC']  = Event(MENU_CALL_ITEM_ACTION, arg='queue_a_track')
!     EVENTS['menu']['SAVE'] = Event(MENU_CALL_ITEM_ACTION, 
arg='close_playlist')
  
      """
--- 67,72 ----
      Add something like this to your local_conf.py
  
!     EVENTS['menu']['REC']  = Event(MENU_CALL_ITEM_ACTION, 'queue_a_track')
!     EVENTS['menu']['SAVE'] = Event(MENU_CALL_ITEM_ACTION, 'close_playlist')
  
      """

Index: radio.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/radio.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** radio.py    4 Jun 2005 17:18:12 -0000       1.12
--- radio.py    16 Jul 2005 09:48:22 -0000      1.13
***************
*** 19,22 ****
--- 19,25 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.13  2005/07/16 09:48:22  dischi
+ # adjust to new event interface
+ #
  # Revision 1.12  2005/06/04 17:18:12  dischi
  # adjust to gui changes
***************
*** 66,70 ****
  import audio.player
  from item import Item
- import eventhandler
  from event import *
  from gui.windows import MessageBox
--- 69,72 ----
***************
*** 97,101 ****
          if error and menuw:
              MessageBox(text=error).show()
!             eventhandler.post(PLAY_END)
  
      def stop(self, arg=None, menuw=None):
--- 99,103 ----
          if error and menuw:
              MessageBox(text=error).show()
!             PLAY_END.post()
  
      def stop(self, arg=None, menuw=None):

Index: cdbackup.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/cdbackup.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** cdbackup.py 2 Jul 2005 16:46:24 -0000       1.46
--- cdbackup.py 16 Jul 2005 09:48:21 -0000      1.47
***************
*** 29,32 ****
--- 29,35 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.47  2005/07/16 09:48:21  dischi
+ # adjust to new event interface
+ #
  # Revision 1.46  2005/07/02 16:46:24  dischi
  # use kaa.metadata instead of mmpython
***************
*** 111,115 ****
  import util
  import plugin
- import eventhandler
  
  from gui.windows import MessageBox
--- 114,117 ----
***************
*** 292,296 ****
          menuw.delete_submenu(False)
          # show message
!         eventhandler.post(Event(OSD_MESSAGE, _( 'Ripping started' )))
  
  
--- 294,298 ----
          menuw.delete_submenu(False)
          # show message
!         OSD_MESSAGE.post(_( 'Ripping started' ))
  
  
***************
*** 441,445 ****
          for i in range (0, len(song_names)):
              if self.abort:
!                 eventhandler.post(Event(OSD_MESSAGE, arg=_('Ripping 
aborted')))
                  self.current_track = -1
                  return
--- 443,447 ----
          for i in range (0, len(song_names)):
              if self.abort:
!                 OSD_MESSAGE.post(_('Ripping aborted'))
                  self.current_track = -1
                  return
***************
*** 494,498 ****
              run(cdparanoia_command, self, 9)
              if self.abort:
!                 eventhandler.post(Event(OSD_MESSAGE, arg=_('Ripping 
aborted')))
                  self.current_track = -1
  
--- 496,500 ----
              run(cdparanoia_command, self, 9)
              if self.abort:
!                 OSD_MESSAGE.post(_('Ripping aborted'))
                  self.current_track = -1
  
***************
*** 564,568 ****
              # abort set?
              if self.abort:
!                 eventhandler.post(Event(OSD_MESSAGE, arg=_('Ripping 
aborted')))
                  self.current_track = -1
  
--- 566,570 ----
              # abort set?
              if self.abort:
!                 OSD_MESSAGE.post(_('Ripping aborted'))
                  self.current_track = -1
  
***************
*** 577,581 ****
  
          # done
!         eventhandler.post(Event(OSD_MESSAGE, arg=_('Ripping complete')))
          self.current_track = -1
  
--- 579,583 ----
  
          # done
!         OSD_MESSAGE.post(_('Ripping complete'))
          self.current_track = -1
  

Index: logger.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/logger.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** logger.py   9 Jun 2005 19:43:53 -0000       1.10
--- logger.py   16 Jul 2005 09:48:21 -0000      1.11
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.11  2005/07/16 09:48:21  dischi
+ # adjust to new event interface
+ #
  # Revision 1.10  2005/06/09 19:43:53  dischi
  # clean up eventhandler usage
***************
*** 61,65 ****
  from event import *
  from util.dbutil import *
- import eventhandler
  import util
  import os
--- 64,67 ----
***************
*** 102,104 ****
          if event == RATING and str(event.arg[0]) in '12345':
              self.log_rating(event.arg[1],event.arg[0])
!             eventhandler.post(Event(OSD_MESSAGE,'Rated: %s' % 
str(event.arg[0])))
--- 104,106 ----
          if event == RATING and str(event.arg[0]) in '12345':
              self.log_rating(event.arg[1],event.arg[0])
!             OSD_MESSAGE.post('Rated: %s' % str(event.arg[0]))

Index: mplayervis.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/mplayervis.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** mplayervis.py       15 Jul 2005 20:42:53 -0000      1.22
--- mplayervis.py       16 Jul 2005 09:48:22 -0000      1.23
***************
*** 50,53 ****
--- 50,55 ----
  import os
  
+ import kaa.notifier
+ 
  # freevo modules
  import plugin
***************
*** 56,60 ****
  import gui.widgets
  import gui.theme
- import eventhandler
  
  from event import *
--- 58,61 ----
***************
*** 99,104 ****
          plugin.register(self, self.plugin_name)
  
!         eventhandler.register(self, AUDIO_VISUAL_SHOW)
!         eventhandler.register(self, AUDIO_VISUAL_HIDE)
  
  
--- 100,106 ----
          plugin.register(self, self.plugin_name)
  
!         # register for events
!         handler = kaa.notifier.EventHandler(self.eventhandler)
!         handler.register(AUDIO_VISUAL_SHOW, AUDIO_VISUAL_HIDE)
  
  
***************
*** 371,376 ****
  
          # send osd notification
!         msg = Event(OSD_MESSAGE, arg=_('Visualization: %s') % actor)
!         eventhandler.post(msg)
  
  
--- 373,377 ----
  
          # send osd notification
!         OSD_MESSAGE.post(_('Visualization: %s') % actor)
  
  



-------------------------------------------------------
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

Reply via email to