To get rid of the default value for strDirectory in Update() and to gain control of whether we want to clear the cache or not, this will use Refresh() instead of Update() in all PVR windows to refresh the directory listing.
// we need to register the window to receive changes from the new group
m_group->RegisterObserver(this);
g_PVRManager.SetPlayingGroup(m_group);
- Update();
+ Refresh();
}
}
return false;
g_PVRChannelGroups->GetGroupAll(channel->IsRadio())->RemoveFromGroup(*channel);
- Update();
+ Refresh(true);
return true;
}
public:
virtual void OnInitWindow(void);
virtual bool OnMessage(CGUIMessage& message);
- virtual bool Update(const std::string &strDirectory = "", bool updateFilterPath = true);
+ virtual bool Update(const std::string &strDirectory, bool updateFilterPath = true);
virtual void UpdateButtons(void);
virtual bool OnAction(const CAction &action);
virtual bool OnBack(int actionID);
/* show the visible channels instead */
m_bShowHiddenChannels = false;
lock.Leave();
- Update();
+ Refresh(true);
}
return bReturn;
case ObservableMessageChannelGroupReset:
{
if (IsActive())
- Update();
+ Refresh(true);
bReturn = true;
break;
}
return bReturn;
g_PVRManager.GetPlayingGroup(m_bRadio)->RemoveFromGroup(*channel);
- Update();
+ Refresh(true);
bReturn = true;
}
return bReturn;
group->ToggleChannelLocked(*item);
- Update();
+ Refresh(true);
bReturn = true;
}
if (newIndex != channel->ChannelNumber())
{
g_PVRManager.GetPlayingGroup()->MoveChannel(channel->ChannelNumber(), newIndex);
- Update();
+ Refresh(true);
}
bReturn = true;
channelPtr->SetIconPath(strThumb, true);
channelPtr->Persist();
- Update();
+ Refresh(true);
}
bReturn = true;
if (button == CONTEXT_BUTTON_SHOW_HIDDEN)
{
m_bShowHiddenChannels = !m_bShowHiddenChannels;
- Update();
+ Refresh(true);
bReturn = true;
}
bool OnMessage(CGUIMessage& message);
void GetContextButtons(int itemNumber, CContextButtons &buttons);
bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
- bool Update(const std::string &strDirectory = "", bool updateFilterPath = true);
+ bool Update(const std::string &strDirectory, bool updateFilterPath = true);
void UpdateButtons(void);
void ResetObservers(void);
void UnregisterObservers(void);
{
// let's set the view mode first before update
CGUIWindowPVRBase::OnMessage(message);
- Update();
+ Refresh(true);
bReturn = true;
}
break;
m_bUpdateRequired = true;
/* update the current window if the EPG timeline view is visible */
if (IsActive() && m_viewControl.GetCurrentControl() == GUIDE_VIEW_TIMELINE)
- Update();
+ Refresh(true);
bReturn = true;
break;
}
bool OnAction(const CAction &action);
void GetContextButtons(int itemNumber, CContextButtons &buttons);
bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
- bool Update(const std::string &strDirectory = "", bool updateFilterPath = true);
+ bool Update(const std::string &strDirectory, bool updateFilterPath = true);
void ResetObservers(void);
void UnregisterObservers(void);
case ObservableMessageTimersReset:
{
if (IsActive())
- Update();
+ Refresh(true);
bReturn = true;
break;
}
if (CGUIKeyboardFactory::ShowAndGetInput(strNewName, g_localizeStrings.Get(19041), false))
{
if (g_PVRRecordings->RenameRecording(*item, strNewName))
- Update();
+ Refresh(true);
}
}
g_PVRRecordings->SetRecordingsPlayCount(item, 1);
m_viewControl.SetSelectedItem(newSelection);
- Update();
+ Refresh(true);
}
if (button == CONTEXT_BUTTON_MARK_UNWATCHED)
g_PVRRecordings->SetRecordingsPlayCount(item, 0);
- Update();
+ Refresh(true);
}
return bReturn;
bool OnAction(const CAction &action);
void GetContextButtons(int itemNumber, CContextButtons &buttons);
bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
- bool Update(const std::string &strDirectory = "", bool updateFilterPath = true);
+ bool Update(const std::string &strDirectory, bool updateFilterPath = true);
void UnregisterObservers(void);
void ResetObservers(void);
m_bSearchConfirmed = false;
m_searchfilter.Reset();
- Update();
+ Refresh(true);
}
return bReturn;
if (pDlgInfo->IsConfirmed())
{
m_bSearchConfirmed = true;
- Update();
+ Refresh(true);
}
}
bool OnMessage(CGUIMessage& message);
void GetContextButtons(int itemNumber, CContextButtons &buttons);
bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
- bool Update(const std::string &strDirectory = "", bool updateFilterPath = true);
+ bool Update(const std::string &strDirectory, bool updateFilterPath = true);
private:
void Search(void);
case ObservableMessageTimersReset:
{
if (IsActive())
- Update();
+ Refresh(true);
bReturn = true;
break;
}
bool OnMessage(CGUIMessage& message);
void GetContextButtons(int itemNumber, CContextButtons &buttons);
bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
- bool Update(const std::string &strDirectory = "", bool updateFilterPath = true);
+ bool Update(const std::string &strDirectory, bool updateFilterPath = true);
void UnregisterObservers(void);
void ResetObservers(void);