def __on_right_press_items(self, widget, x, y, current_item, select_items): if current_item and select_items: if len(select_items) > 1: items = [ (None, _("Add to Playlist"), lambda : self.emit_to_playlist(select_items)), # (None, _("Delete"), None), ] else: items = [ (None, _("Play"), lambda : Dispatcher.play_webcast(current_item.webcast)), (None, _("Add to Playlist"), lambda : self.emit_to_playlist([current_item])), self.get_favorite_menu_item(current_item), # None, # (None, _("Clear List"), None), ] Menu(items, True).show((int(x), int(y)))
def __on_right_press_items(self, widget, x, y, current_item, select_items): if current_item and select_items: if len(select_items) > 1: items = [ (None, _("Add to Playlist"), lambda: self.emit_to_playlist(select_items)), # (None, _("Delete"), None), ] else: items = [ (None, _("Play"), lambda: Dispatcher.play_webcast(current_item.webcast)), (None, _("Add to Playlist"), lambda: self.emit_to_playlist([current_item])), self.get_favorite_menu_item(current_item), # None, # (None, _("Clear List"), None), ] Menu(items, True).show((int(x), int(y)))
def __on_double_click_item(self, widget, item, column, x, y): Dispatcher.play_webcast(item.webcast)