Re: [Freevo-users] Help writing plugin.
My first idea is that MenuItem needs to return a function that builds a new Item. You might need to create a blank Item class (no functions) and then dynamically create those functions using the lamda operator. That's the most extensible. Or you could just have 3 Item subclasses, which would be less confusing to create. eg. ha_menu_items[1] = ControlItem() ControlItem.createMenu = lamda(menuCreateFunction(device[1]) class ControItem(): def __init__(self, parent): Item.__init__(self,parent) Rande I've made a good deal more progress, thanks alot to Rande. Its all working now except for I still have not figured out how to tuck things into sub menus. Heres my current local_conf.py layout: begin config HA_ITEMS = [ (Living Room,( (Corner Light,( (On,command to run when On is selected from menu), (Off,command), (Dim,command) )), (Ceiling Fan,( (On,command), (Off,command) )), (TV,( (On,command), (Off,command) )) )), (Bedroom,( (Ceiling Lights,( (On,command), (Off,command), (Dim,command) )), (Table Lamp,( (On,command), (Off,command), (Dim,command) )) )) ] end config and here is my automatedhouse.py code so far: begin code import os import sys import menu import config from gui import ConfirmBox from item import Item from plugin import MainMenuPlugin class HomeAutomationItem(Item): def __init__(self, parent): Item.__init__(self,parent) self.name = _( 'Home Automation' ) def config(self): return [('HA_ITEMS', [ (Living Room, Corner Light,On,Off,Dim), (Bedroom, Ceiling Lights,On,Off,Dim) ], Home automation items)] def actions(self): items = [(self.createMenu, _('Home Automation'))] return items def createMenu(self, arg=None, menuw=None): ha_menu_items=[] for room in config.HA_ITEMS: ha_menu_items+=[menu.MenuItem(room[0])] for device in room[1]: ha_menu_items+=[menu.MenuItem(device[0])] for control in device[1]: ha_menu_items+=[menu.MenuItem(control[0],os.system(control[1]))] ha_menu=menu.Menu(Home Automation, ha_menu_items) menuw.pushmenu(ha_menu) menuw.refresh() class PluginInterface(MainMenuPlugin): def items(self, parent): return [ HomeAutomationItem(parent) ] end code --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Help writing plugin.
The problem I having is that I do not know how to create sub-menus off the rooms. How do you add a sub menu? --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
[Freevo-users] Freevo + fullscreen on FBdev
Question: How can I enable fullscreen of freevo or mplayer/xine while running in fbdev? I can get fullscreen just using xine -Vfb or mplayer But I can't get it to fullscreen when freevo is started. This is EPIA M10K on Gentoo -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 98% Microsoft(tm) Free!! Neuromancer 23:28:38 up 1:44, 2 users, load average: 0.36, 0.16, 0.11 --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Help writing plugin.
Another problem I'm having is that the following code: ha_menu_items+=[menu.MenuItem(control[0],os.system(control[1]))] executes the os,system(control[1]) when the menu loads, not when the menu is selected, what did I do wrong? --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Help writing plugin.
you are returning the function result rather than the function itself. try encapsulating it in a lamda. Rande Another problem I'm having is that the following code: ha_menu_items+=[menu.MenuItem(control[0],os.system(control[1]))] executes the os,system(control[1]) when the menu loads, not when the menu is selected, what did I do wrong? --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Help writing plugin.
you just need to create a new menu object, and call the pushmenu function - when the pushmenu function is called, you will enter that menu. eg, if you do menuw.pushmenu(ha_menu) menuw.pushmenu(ha_menu) menuw.pushmenu(ha_menu) then you will go down 3 levels of menus (admitted the _same_ menu), and have to go back up 3 menus to get back to where you were. Rande The problem I having is that I do not know how to create sub-menus off the rooms. How do you add a sub menu? --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
[Freevo-users] Re: ATI Remote and Keybindings
Anyone have any clues? The remote works, up and down and 'ok' works (the default settings), but every other binding isnt working, have I missed something with my configuration? mediabawx:/etc/freevo# cat local_conf.py | grep EVENT # EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -100') EVENTS['menu']['54'] = Event(MENU_BACK_ONE_MENU) EVENTS['menu']['222'] = Event(MENU_GOTO_MAINMENU) EVENTS['video']['54'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='quit') EVENTS['video']['152'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -200') EVENTS['video']['233'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek +200') EVENTS['video']['110'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='pause') EVENTS['video']['232'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='pause') EVENTS['video']['36'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='pause') EVENTS['video']['165'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='volume -1') EVENTS['video']['158'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='volume 1') EVENTS['video']['166'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='mute') EVENTS['video']['10'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -1') EVENTS['video']['11'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast 1') EVENTS['video']['12'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='brightness -1') EVENTS['video']['13'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='brightness 1') EVENTS['video']['100'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -10') EVENTS['video']['98'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek +30') EVENTS['video']['104'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -30') EVENTS['video']['102'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek +10') EVENTS['video']['222'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='quit') mediabawx:/etc/X11/xinit# cat xinitrc xmodmap -e keycode 54 = esc xmodmap -e keycode 222 = esc xmodmap -e keycode 110 = space xmodmap -e keycode 168 = Return xmodmap -e keycode 222 = Power xmodmap -e keycode 166 = Mute xmodmap -e keycode 110 = Pause xmodmap -e keycode 152 = Rewind xmodmap -e keycode 233 = Forward # directional xmodmap -e keycode 36 = Ok xmodmap -e keycode 233 = Up xmodmap -e keycode 152 = Down xmodmap -e keycode 100 = Left xmodmap -e keycode 102 = Right #Volume xmodmap -e keycode 165 = v xmodmap -e keycode 158 = j #Contrast/Brightness xmodmap -e keycode 10 = 1 xmodmap -e keycode 11 = 2 xmodmap -e keycode 12 = 3 xmodmap -e keycode 13 = 4 --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Freevo + fullscreen on FBdev
On Sat, 2005-02-12 at 23:29 +0800, Ow Mun Heng wrote: How can I enable fullscreen of freevo or mplayer/xine while running in fbdev? I can get fullscreen just using xine -Vfb or mplayer But I can't get it to fullscreen when freevo is started. You have configured /etc/freevo/freevo.conf correctly, have you? (display and geometry come to mind here...) HaJo -- HaJo Schatz [EMAIL PROTECTED] http://www.HaJo.Net PGP-Key: http://www.hajo.net/hajonet/keys/pgpkey_hajo.txt --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users
[Freevo-users] Unable to adjust volume
I am unable to adjust the volume while watching a recorded show. Looking at the help screen from within freevo, it looks like the 'n' and 'm' keys should increase and decrease the volume. However 'm' mutes. I have also tried using aumix to lower the volume settings, but this doesn't change the playback volume. What I am doing wrong? I have to adjust the volume with the TV setting, but this isn't working too well since I have to lower the volume really low before starting to playback a show. Thanks! Jon HWj)bh+yNLv-yv'z\jwbv,xnv!3jj[z('!lXzm^*^Jv)!lgri
Re: [Freevo-users] Unable to adjust volume
On Sat, 2005-02-12 at 22:48 -0800, Jon Morris wrote: I am unable to adjust the volume while watching a recorded show. Looking at the help screen from within freevo, it looks like the 'n' and 'm' keys should increase and decrease the volume. However 'm' mutes. I have also tried using aumix to lower the volume settings, but this doesn't change the playback volume. mplayer? try the keys 0 and 9 instead. Seems that the freevo keymapping doesn't get forwarded into mplayer correctly. Haven't found out yet why, though. -- HaJo Schatz [EMAIL PROTECTED] http://www.HaJo.Net PGP-Key: http://www.hajo.net/hajonet/keys/pgpkey_hajo.txt --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users