Dear Wiki user, You have subscribed to a wiki page or wiki category on "Freevo Wiki" for change notification.
The following page has been changed by 217.172.65.50: http://freevo.sourceforge.net/cgi-bin/moin.cgi/TipsAndTricks ------------------------------------------------------------------------------ @@ -3,6 +3,72 @@ ''Freevo's interface is straight forward, but sometimes features are more in how you use what you have than adding new options.'' [[BR]][[BR]] +== Get Mouse support == +This trick adds a simple "mouse support" to the Freevo Interface. I'm using actually a 1.5rc2 version. I know this is not an elegant version, i'm working in this. I prefer next version of freevo add this funcionality. + + +1.- Modidy the "listing_area.py" file +<verbatim> +#nl. 330 aprox. +.... + if val.rectangle: + + r = self.get_item_rectangle(val.rectangle, width, val.font.h)[2] + + # introducci�n del objeto rectangle..... + choice.rectangle = (x0 + hskip + r.x + x_icon - BOX_UNDER_ICON * x_icon,y0 + vskip + r.y, + r.width - icon_x + BOX_UNDER_ICON * icon_x,r.height) +.... +</verbatim> + +2.- First to generate the mouse event, edit the "osd.py" file. this is necessary for store the mouse position and detection. +<verbatim> + + while 1: + event = pygame.event.poll() + if event.type == 6: + self.mouse = (1,event.pos) + return 1 + else: + self.mouse = (0,()) + +</verbatim> + +3.- To get the event and make the action for the item, edit the "menu.py" file +<verbatim> +#nl. 337 aprox. +for i in self.all_items: + #the item has been "marked" for the mouse events + if hasattr(i,'rectangle'): + i.rect=Rect(i.rectangle) + + #has been detected? + if osd.mouse[0] == 1: + if i.rect.collidepoint(osd.mouse[1][0],osd.mouse[1][1]): + print '----------> DETECCION de MOUSE en ',i.name,' <-------------' + + action = None + arg = None + try: + action = i.action + except AttributeError: + action = i.actions() + if action: + action = action[0] + if isinstance(action, MenuItem): + action = action.function + arg = action.arg + else: + action = action[0] + if not action: + print 'No action.. ' + AlertBox(text=_('No action defined for this choice!')).show() + else: + action( arg=arg, menuw=self ) + return + +</verbatim> + == Get Daily Cartoons on your Freevo == (By Tom Van den Bon) @@ -69,3 +135,6 @@ == Favourites/Favorites == If you find that your favourite programs are not being picked up automatically, you need to do one of either of the following two things - either ensure you are picking up the xmltv guide info via the command "freevo tv_grab" or you need to run the helper script "freevo schedulefavorites" after manually putting the latest TV.xml file in the /tmp directory. + + + ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Freevo-wikilog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-wikilog
