added viewable condition to all updates to gain CPU

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.4.x@1825 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2009-11-14 22:51:09 +00:00
parent 4207b438a9
commit ff55eb45da
4 changed files with 13 additions and 0 deletions

View File

@ -241,6 +241,9 @@ void ForumsDialog::togglefileview()
void ForumsDialog::checkUpdate()
{
if(!isVisible())
return ;
std::list<std::string> forumIds;
std::list<std::string>::iterator it;
if (!rsForums)

View File

@ -339,6 +339,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
void MainWindow::updateStatus()
{
if(!isVisible())
return ;
if (ratesstatus)
ratesstatus->getRatesStatus();
@ -508,6 +510,8 @@ void MainWindow::doQuit()
if ((QMessageBox::question(this, tr("Really quit ? "),queryWrn,QMessageBox::Ok|QMessageBox::No, QMessageBox::Ok))== QMessageBox::Ok)
{
delete rsicontrol ;
delete rsiface ;
qApp->quit();
}
else

View File

@ -692,6 +692,9 @@ void NetworkDialog::getNetworkStatus()
void NetworkDialog::updateNetworkStatus()
{
if(!isVisible())
return ;
rsiface->lockData(); /* Lock Interface */
/* now the extra bit .... switch on check boxes */

View File

@ -226,6 +226,9 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
/* get the list of peers from the RsIface. */
void PeersDialog::insertPeers()
{
if(!isVisible())
return ;
std::list<std::string> peers;
std::list<std::string>::iterator it;