Hi,

i am currently trying to write a small plugin, but i am stuck on the
event handling.
I create the MainMenuPlugin staff:

class PluginInterface(plugin.MainMenuPlugin):
        def items(self, parent):
                item = VolumeMainMenuItem()
                item.name = "Volume"
                item.parent = parent
                return [ item ]

Then, in class VolumeMainMenuItem() i want to have the eventhandler.
I tried it this way:

class VolumeMainMenuItem(Item):

        def actions(self):
                items = [ (self.create_menu, 'Volume') ]
                return items
        
        def create_menu(self, arg=None, menuw=None):
                items = [ menu.MenuItem('blablubb')  ]
                mymenu = menu.Menu(('Volume'), items,  
reload_func=menuwidget.goto_main_menu)
                menuw_backup = menuw
#                menuw.hide()
                menuwidget.pushmenu(mymenu)
                menuwidget.refresh()

        def eventhandler(self, event=None, menuw=None, arg=None):

                print "eventhandler2"
                if event == em.INPUT_LEFT:
                        print "left"
                        system("aumix -v -10")
                        system("aumix -v q")
                        return 1
[...]

but unfortunately it won't get the events.
Clearly, i missed something important, how freevo handles its events.
I looked at some other plugins but i can't get, what i am doing wrong.

It would be very nice , if someone can push me in the right direction.


regards,
        andreas



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to