Permalink
Browse files

Cosmetic changes

  • Loading branch information...
1 parent 1da515f commit 6c22dd59c818aa7167fc0f1bf6f4634b8ec9a0e3 @Black09 Black09 committed Feb 25, 2014
@@ -800,9 +800,11 @@ void CGUIBaseContainer::AllocResources()
{
CGUIControl::AllocResources();
CalculateLayout();
- UpdateListProvider(true);
if (m_listProvider)
+ {
+ UpdateListProvider(true);
SelectItem(m_listProvider->GetDefaultItem());
+ }
}
void CGUIBaseContainer::FreeResources(bool immediately)
@@ -869,11 +871,11 @@ void CGUIBaseContainer::UpdateVisibility(const CGUIListItem *item)
UpdateListProvider();
}
-void CGUIBaseContainer::UpdateListProvider(bool refreshItems)
+void CGUIBaseContainer::UpdateListProvider(bool forceRefresh /* = false */)
{
if (m_listProvider)
{
- if (m_listProvider->Update(refreshItems))
+ if (m_listProvider->Update(forceRefresh))
{
// save the current item
int currentItem = GetSelectedItem();
@@ -122,7 +122,7 @@ class CGUIBaseContainer : public IGUIContainer
virtual int GetCurrentPage() const;
bool InsideLayout(const CGUIListItemLayout *layout, const CPoint &point) const;
virtual void OnFocus();
- void UpdateListProvider(bool refreshItems = false);
+ void UpdateListProvider(bool forceRefresh = false);
int ScrollCorrectionRange() const;
inline float Size() const;
@@ -102,7 +102,7 @@ class CDirectoryJob : public CJob
initThumbLoader<CProgramThumbLoader>(PROGRAM);
return m_thumbloaders[PROGRAM];
}
-
+
template<class CThumbLoaderClass>
void initThumbLoader(InfoTagType type)
{
@@ -141,7 +141,6 @@ CDirectoryProvider::CDirectoryProvider(const TiXmlElement *element, int parentID
m_jobID(0)
{
assert(element);
-
if (!element->NoChildren())
{
const char *target = element->Attribute("target");
@@ -156,7 +155,7 @@ CDirectoryProvider::~CDirectoryProvider()
Reset(true);
}
-bool CDirectoryProvider::Update(bool refresh)
+bool CDirectoryProvider::Update(bool forceRefresh)
{
// we never need to force refresh here
bool changed = false;
@@ -53,7 +53,7 @@ class CDirectoryProvider :
CDirectoryProvider(const TiXmlElement *element, int parentID);
virtual ~CDirectoryProvider();
- virtual bool Update(bool refresh);
+ virtual bool Update(bool forceRefresh);
virtual void Announce(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data);
virtual void Fetch(std::vector<CGUIListItemPtr> &items) const;
virtual void Reset(bool immediately = false);
@@ -47,7 +47,7 @@ class IListProvider
/*! \brief Update the list content
\return true if the content has changed, false otherwise.
*/
- virtual bool Update(bool refresh)=0;
+ virtual bool Update(bool forceRefresh)=0;
/*! \brief Fetch the current list of items.
\param items [out] the list to be filled.
@@ -64,9 +64,9 @@ CStaticListProvider::~CStaticListProvider()
{
}
-bool CStaticListProvider::Update(bool refresh)
+bool CStaticListProvider::Update(bool forceRefresh)
{
- bool changed = refresh;
+ bool changed = forceRefresh;
if (!m_updateTime)
m_updateTime = CTimeUtils::GetFrameTime();
else if (CTimeUtils::GetFrameTime() - m_updateTime > 1000)
@@ -30,7 +30,7 @@ class CStaticListProvider : public IListProvider
CStaticListProvider(const std::vector<CGUIStaticItemPtr> &items); // for python
virtual ~CStaticListProvider();
- virtual bool Update(bool refresh);
+ virtual bool Update(bool forceRefresh);
virtual void Fetch(std::vector<CGUIListItemPtr> &items) const;
virtual bool OnClick(const CGUIListItemPtr &item);
virtual void SetDefaultItem(int item, bool always);

0 comments on commit 6c22dd5

Please sign in to comment.