From 779a390537ad54869bdb5e09e72b3847d03b7677 Mon Sep 17 00:00:00 2001 From: spiff Date: Sat, 6 Oct 2012 17:52:10 +0200 Subject: [PATCH] added: SetTitle() to progress bar handle useful when you want to change the title of the task using it --- xbmc/dialogs/GUIDialogExtendedProgressBar.cpp | 6 ++++++ xbmc/dialogs/GUIDialogExtendedProgressBar.h | 1 + 2 files changed, 7 insertions(+) diff --git a/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp b/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp index bbb453e2d2c20..6485b91805419 100644 --- a/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp +++ b/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp @@ -45,6 +45,12 @@ void CGUIDialogProgressBarHandle::SetText(const string &strText) m_strText = strText; } +void CGUIDialogProgressBarHandle::SetTitle(const string &strTitle) +{ + CSingleLock lock(m_critSection); + m_strTitle = strTitle; +} + void CGUIDialogProgressBarHandle::SetProgress(int currentItem, int itemCount) { float fPercentage = (float)((currentItem*100)/itemCount); diff --git a/xbmc/dialogs/GUIDialogExtendedProgressBar.h b/xbmc/dialogs/GUIDialogExtendedProgressBar.h index 800fbd7f086e3..501eaf30fbccf 100644 --- a/xbmc/dialogs/GUIDialogExtendedProgressBar.h +++ b/xbmc/dialogs/GUIDialogExtendedProgressBar.h @@ -31,6 +31,7 @@ class CGUIDialogProgressBarHandle virtual ~CGUIDialogProgressBarHandle(void) {} const std::string &Title(void) { return m_strTitle; } + void SetTitle(const std::string &strTitle); std::string Text(void) const; void SetText(const std::string &strText);