Changeset 1864

Show
Ignore:
Timestamp:
06/11/08 20:44:45 (2 months ago)
Author:
duncan
svm:headrev:

cc3e1ea1-1e01-0410-8d68-8b121e83a9d5:11146
Message:

[ 2214605 ] imdb searches fails
Fixed the selection using the ENTER key

Location:
freevo
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • freevo/ChangeLog

    r1862 r1864  
    3131 * Fixed imdb search when a season is specified but no episode (B#2214605) 
    3232 * Fixed joy plug-in to remove any pending events when enabled (B#1916407) 
     33 * Fixed menu selecting methods using ENTER instead of SELECT (B#2214605) 
    3334 * Fixed mplayer crash when auto cropping is enabled (B#2089592) 
    3435 * Fixed mplayer when playlist is enabled (B#2219657) 
  • freevo/src/menu.py

    r1827 r1864  
    686686    @benchmark(benchmarking, benchmarkcall) 
    687687    def _handle_submenu(self, menu, event): 
    688         #if hasattr(menu, 'is_submenu'): 
    689         #    self._handle_play_item(menu, event) 
    690         #    return 
     688        action = None 
     689        arg    = None 
     690        #try: 
     691        #    action = menu.selected.action 
     692        #except AttributeError: 
     693        #    pass 
    691694 
    692695        actions = menu.selected.actions() 
     
    696699            force   = True 
    697700 
    698         plugins = plugin.get('item') + plugin.get('item_%s' % menu.selected.type) 
    699  
    700         if hasattr(menu.selected, 'display_type'): 
    701             plugins += plugin.get('item_%s' % menu.selected.display_type) 
    702  
    703         plugins.sort(lambda l, o: cmp(l._level, o._level)) 
    704  
    705         for p in plugins: 
    706             for a in p.actions(menu.selected): 
    707                 if isinstance(a, MenuItem): 
    708                     actions.append(a) 
    709                 else: 
    710                     actions.append(a[:2]) 
    711                     if len(a) == 3 and a[2] == 'MENU_SUBMENU': 
    712                         a[0](menuw=self) 
    713                         return 
     701        if not hasattr(menu, 'is_submenu'): 
     702            plugins = plugin.get('item') + plugin.get('item_%s' % menu.selected.type) 
     703 
     704            if hasattr(menu.selected, 'display_type'): 
     705                plugins += plugin.get('item_%s' % menu.selected.display_type) 
     706 
     707            plugins.sort(lambda l, o: cmp(l._level, o._level)) 
     708 
     709            for p in plugins: 
     710                for a in p.actions(menu.selected): 
     711                    if isinstance(a, MenuItem): 
     712                        actions.append(a) 
     713                    else: 
     714                        actions.append(a[:2]) 
     715                        if len(a) == 3 and a[2] == 'MENU_SUBMENU': 
     716                            a[0](menuw=self) 
     717                            return 
    714718 
    715719        if actions: 
     
    719723                # if there is only one action, call it! 
    720724                action = actions[0] 
    721                 arg = None 
    722725                if isinstance(action, MenuItem): 
    723726                    action = action.function 
     
    726729                    action = action[0] 
    727730                action(arg=arg, menuw=self) 
    728         return 
    729731 
    730732