mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Origin commit data
------------------
Commit: 107a8a1b5f
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-03-21 (Tue, 21 Mar 2017)
This commit is contained in:
@@ -81,7 +81,7 @@ void CProgressWindow::Init( signal<void, size_t, size_t, string> *statusSignal,
|
||||
if (globalSignal)
|
||||
*globalSignal->connect(mem_fun(*this, &CProgressWindow::showGlobalStatus));
|
||||
|
||||
global_progress = local_progress = 0;
|
||||
global_progress = local_progress = percent_progress = 0;
|
||||
|
||||
showFooter(false);
|
||||
|
||||
@@ -93,6 +93,8 @@ void CProgressWindow::Init( signal<void, size_t, size_t, string> *statusSignal,
|
||||
status_txt->doPaintBg(false);
|
||||
addWindowItem(status_txt);
|
||||
|
||||
cur_statusText = string();
|
||||
|
||||
//create local_bar object
|
||||
local_bar = getProgressItem();
|
||||
|
||||
@@ -130,10 +132,16 @@ CProgressBar* CProgressWindow::getProgressItem()
|
||||
void CProgressWindow::initStatus(const unsigned int prog, const unsigned int max, const string &statusText, CProgressBar *pBar)
|
||||
{
|
||||
pBar->allowPaint(true);
|
||||
pBar->setValues(prog, (int)max);
|
||||
if (!statusText.empty())
|
||||
showStatusMessageUTF(statusText);
|
||||
pBar->paint(false);
|
||||
unsigned int cur_perc = prog*100/(max+1);
|
||||
if (percent_progress != cur_perc || prog == 0){
|
||||
pBar->setValues(prog, (int)max);
|
||||
if (!statusText.empty() && (cur_statusText != statusText)){
|
||||
showStatusMessageUTF(statusText);
|
||||
cur_statusText = statusText;
|
||||
}
|
||||
pBar->paint(false);
|
||||
percent_progress = cur_perc;
|
||||
}
|
||||
}
|
||||
|
||||
void CProgressWindow::showStatus(const unsigned int prog, const unsigned int max, const string &statusText)
|
||||
|
Reference in New Issue
Block a user