def searchDialogClosed(self, what, searchContext = None): print "[YTB] searchDialogClosed: ", what if what == SEARCH: dlg = self.session.openWithCallback(self.youTubeListScreenClosed, YouTubeListScreen) dlg.searchFeed(searchContext) elif what == CANCEL: interface.close() elif what == STDFEEDS: self.openStandardFeeds() else: if what == PLAYLISTS: callback = self.openPlaylists elif what == FAVORITES: callback = self.openFavorites if not interface.isLoggedIn(): self.session.openWithCallback(callback, YouTubeUserListScreen, youTubeUserConfig.getDefaultUser()) else: callback(YouTubeUserListScreen.LOGIN_SUCCESS)
def youTubeListScreenClosed(self, proceed): if proceed: self.openSearchDialog() else: interface.close()