Permalink
Browse files

Merge pull request #4531 from Black09/container-isupdating

Added Container.IsUpdating
  • Loading branch information...
2 parents 13f8d3c + 14d100b commit 44040c976aa59f3f89982e99ee0e2a31bbe4caac @jmarshallnz jmarshallnz committed Apr 28, 2014
Showing with 8 additions and 3 deletions.
  1. +5 −2 xbmc/GUIInfoManager.cpp
  2. +1 −1 xbmc/GUIInfoManager.h
  3. +2 −0 xbmc/guilib/GUIBaseContainer.cpp
@@ -435,7 +435,8 @@ const infomap container_bools[] ={{ "onnext", CONTAINER_MOVE_NEXT },
{ "hasprevious", CONTAINER_HAS_PREVIOUS },
{ "canfilter", CONTAINER_CAN_FILTER },
{ "canfilteradvanced",CONTAINER_CAN_FILTERADVANCED },
- { "filtered", CONTAINER_FILTERED }};
+ { "filtered", CONTAINER_FILTERED },
+ { "isupdating", CONTAINER_ISUPDATING }};
const infomap container_ints[] = {{ "row", CONTAINER_ROW },
{ "column", CONTAINER_COLUMN },
@@ -2390,7 +2391,8 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
if (pWindow)
bReturn = ((CGUIMediaWindow*)pWindow)->CurrentDirectory().HasArt("thumb");
}
- else if (condition == CONTAINER_HAS_NEXT || condition == CONTAINER_HAS_PREVIOUS || condition == CONTAINER_SCROLLING)
+ else if (condition == CONTAINER_HAS_NEXT || condition == CONTAINER_HAS_PREVIOUS
+ || condition == CONTAINER_SCROLLING || condition == CONTAINER_ISUPDATING)
{
CGUIWindow *window = GetWindowWithCondition(contextWindow, WINDOW_CONDITION_IS_MEDIA_WINDOW);
if (window)
@@ -2936,6 +2938,7 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
case CONTAINER_HAS_PREVIOUS:
case CONTAINER_SCROLLING:
case CONTAINER_SUBITEM:
+ case CONTAINER_ISUPDATING:
{
const CGUIControl *control = NULL;
if (info.GetData1())
@@ -288,7 +288,7 @@ namespace INFO
#define CONTAINER_STATIC 347
#define CONTAINER_MOVE_NEXT 348
#define CONTAINER_SCROLL_NEXT 349
-
+#define CONTAINER_ISUPDATING 350
#define CONTAINER_HASFILES 351
#define CONTAINER_HASFOLDERS 352
#define CONTAINER_STACKED 353
@@ -1159,6 +1159,8 @@ bool CGUIBaseContainer::GetCondition(int condition, int data) const
}
case CONTAINER_SCROLLING:
return (m_scrollTimer.GetElapsedMilliseconds() > std::max(m_scroller.GetDuration(), SCROLLING_THRESHOLD) || m_pageChangeTimer.IsRunning());
+ case CONTAINER_ISUPDATING:
+ return (m_listProvider) ? m_listProvider->IsUpdating() : false;
default:
return false;
}

0 comments on commit 44040c9

Please sign in to comment.