-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple content elements in a single container #10730
Conversation
Nice, thanks. |
Nice, tested and works great. Thx for this addition! |
Picked and Squashed, thanks! |
xbmc/listproviders/MultiProvider.h
Outdated
virtual void Reset(bool immediately = false); | ||
virtual bool OnClick(const CGUIListItemPtr &item); | ||
virtual bool OnInfo(const CGUIListItemPtr &item); | ||
virtual bool OnContextMenu(const CGUIListItemPtr &item); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
looks good +1 |
this would be great for some home screen widgets on Estuary in v17. Are there any major concerns to hold it back for v17 (besides of feature freeze)? |
xbmc/listproviders/MultiProvider.h
Outdated
|
||
protected: | ||
std::vector<IListProviderPtr> m_providers; | ||
mutable std::map<CGUIListItem*, IListProviderPtr> m_itemMap; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
9709f5c
to
1b35c45
Compare
Fixed conflicts and squashed |
Is there anything else I need to get this merged? I don't want it to get forgotten and miss the boat for v18.... |
jenkins build this please |
xbmc/listproviders/MultiProvider.cpp
Outdated
@@ -0,0 +1,109 @@ | |||
/* | |||
* Copyright (C) 2013 Team XBMC | |||
* http://xbmc.org |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/listproviders/MultiProvider.cpp
Outdated
provider->Fetch(subItems); | ||
for (auto& item : subItems) | ||
{ | ||
m_itemMap[item.get()] = provider; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
6174b73
to
f99eb35
Compare
…ntent> blocks in a single container.
f99eb35
to
2bdf705
Compare
jenkins build this please |
Description
This change adds a new IListProvider, called CMultiProvider, which aggregates several independent <content> blocks (either DirectoryProviders or StaticProviders or both).
Motivation and Context
DirectoryProviders (dynamically filled <content> blocks) are a powerful feature. But currently you can only fill a list with a single directory at a time, and you also cannot add other static elements to a dynamic list. For example, you might like to add some navigational list entries at the top of a list, and have it fill with dynamic content below those static entries. Or maybe you would like to combine two different directories in one list for some reason. This was hinted as a potential new feature in 2014, but it seems it never got added: http://forum.kodi.tv/showthread.php?tid=176864
How Has This Been Tested?
I tested this by trying a few different combinations of multiple <content> blocks.
Screenshots (if appropriate):
Types of change
Checklist: