Author: duncan
Date: Fri Sep 29 21:12:04 2006
New Revision: 8276
Modified:
branches/rel-1-5/freevo/src/audio/plugins/detach.py
Log:
[ 1567939 ] Patch - control for detached player
Patch applied.
Modified: branches/rel-1-5/freevo/src/audio/plugins/detach.py
==============================================================================
--- branches/rel-1-5/freevo/src/audio/plugins/detach.py (original)
+++ branches/rel-1-5/freevo/src/audio/plugins/detach.py Fri Sep 29 21:12:04 2006
@@ -1,4 +1,4 @@
-# -*- coding: iso-8859-1 -*-
+#if 0 /*
# -----------------------------------------------------------------------
# detach.py - Detach plugin for the audio player
# -----------------------------------------------------------------------
@@ -8,12 +8,31 @@
# Todo:
#
# -----------------------------------------------------------------------
-# $Log$
-# Revision 1.17 2004/07/10 12:33:37 dischi
-# header cleanup
+# $Log: detach.py,v $
+# Revision 1.14 2004/02/15 11:18:47 dischi
+# better detachbar plugin, does not need stuff in other files now
#
-# Revision 1.16 2004/04/25 11:23:58 dischi
-# Added support for animations. Most of the code is from Viggo Fredriksen
+# Revision 1.13 2004/02/06 18:33:06 dischi
+# fix mimetype handling
+#
+# Revision 1.12 2004/01/25 20:16:04 dischi
+# add type back to the plugin item
+#
+# Revision 1.11 2003/12/15 03:53:18 outlyer
+# Added Viggo Fredriksen's very cool detachbar plugin... it shows a
+# mini-player in the bottom corner of the screen if you detach a music player.
+#
+# Revision 1.10 2003/12/10 19:07:42 dischi
+# no need for the eventhandler anymore
+#
+# Revision 1.9 2003/12/09 20:32:29 dischi
+# fix plugin to match the new player structure
+#
+# Revision 1.8 2003/09/20 09:42:32 dischi
+# cleanup
+#
+# Revision 1.7 2003/09/19 22:10:11 dischi
+# check self.player before using it
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
@@ -35,6 +54,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ----------------------------------------------------------------------- */
+#endif
import config
@@ -52,7 +72,7 @@
"""
def __init__(self):
plugin.MainMenuPlugin.__init__(self)
- config.EVENTS['audio']['DISPLAY'] = Event(FUNCTION_CALL,
arg=self.detach)
+ config.EVENTS['audio']['EXIT'] = Event(FUNCTION_CALL, arg=self.detach)
self.show_item = menu.MenuItem(_('Show player'), action=self.show)
self.show_item.type = 'detached_player'
@@ -61,14 +81,6 @@
gui = audio.player.get()
# hide the player and show the menu
- mpav = plugin.getbyname( 'audio.mpav' )
- if mpav:
- mpav.stop_mpav()
-
- mplvis = plugin.getbyname( 'audio.mplayervis' )
- if mplvis:
- mplvis.stop_visual()
-
gui.hide()
gui.menuw.show()
@@ -79,7 +91,24 @@
if gui.item.parent:
gui.item.parent.menuw = None
rc.post_event(plugin.event('DETACH'))
-
+
+ def eventhandler(self,event,menuw=None):
+ if event == BUTTON:
+ gui = audio.player.get()
+ if gui:
+ p = gui.player
+ if event.arg=='FFWD':
+ p.eventhandler(Event('SEEK',arg='10',context='audio'))
+ elif event.arg=='REW':
+ p.eventhandler(Event('SEEK',arg='-10', context='audio'))
+ elif event.arg=='PAUSE':
+ p.eventhandler(Event('PLAY',context='audio'))
+ elif event.arg=='STOP':
+ p.eventhandler(Event('STOP'))
+ elif event.arg=='NEXT':
+ p.eventhandler(Event('PLAYLIST_NEXT',context='audio'))
+ elif event.arg=='PREV':
+ p.eventhandler(Event('PLAYLIST_PREV',context='audio'))
def items(self, parent):
gui = audio.player.get()
@@ -101,11 +130,3 @@
# hide the menu and show the player
menuw.hide()
gui.show()
- mpav = plugin.getbyname( 'audio.mpav' )
- if mpav:
- mpav.start_mpav()
-
- mplvis = plugin.getbyname( 'audio.mplayervis' )
- if mplvis:
- mplvis.stop_visual()
- mplvis.start_visual()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog