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() void ForumsDialog::checkUpdate()
{ {
if(!isVisible())
return ;
std::list<std::string> forumIds; std::list<std::string> forumIds;
std::list<std::string>::iterator it; std::list<std::string>::iterator it;
if (!rsForums) if (!rsForums)

View file

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

View file

@ -692,6 +692,9 @@ void NetworkDialog::getNetworkStatus()
void NetworkDialog::updateNetworkStatus() void NetworkDialog::updateNetworkStatus()
{ {
if(!isVisible())
return ;
rsiface->lockData(); /* Lock Interface */ rsiface->lockData(); /* Lock Interface */
/* now the extra bit .... switch on check boxes */ /* 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. */ /* get the list of peers from the RsIface. */
void PeersDialog::insertPeers() void PeersDialog::insertPeers()
{ {
if(!isVisible())
return ;
std::list<std::string> peers; std::list<std::string> peers;
std::list<std::string>::iterator it; std::list<std::string>::iterator it;