- Moved the setting maxTimeBeforeIdle from the section [%General] to [General] in the profile. Please set your prefered value again.

- Saved the selected tab in the TransferDialog in the profile.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4555 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-08-10 22:47:18 +00:00
parent a7b36d8252
commit babbea6599
2 changed files with 9 additions and 3 deletions

View File

@ -381,6 +381,9 @@ void TransfersDialog::processSettings(bool bLoad)
// state of splitter // state of splitter
ui.splitter->restoreState(Settings->value("Splitter").toByteArray()); ui.splitter->restoreState(Settings->value("Splitter").toByteArray());
// selected tab
ui.tabWidget->setCurrentIndex(Settings->value("selectedTab").toInt());
} else { } else {
// save settings // save settings
@ -393,6 +396,9 @@ void TransfersDialog::processSettings(bool bLoad)
// state of splitter // state of splitter
Settings->setValue("Splitter", ui.splitter->saveState()); Settings->setValue("Splitter", ui.splitter->saveState());
// selected tab
Settings->setValue("selectedTab", ui.tabWidget->currentIndex());
} }
Settings->endGroup(); Settings->endGroup();
@ -1005,7 +1011,7 @@ void TransfersDialog::insertTransfers()
double dlspeed = pit->tfRate * 1024.0; double dlspeed = pit->tfRate * 1024.0;
qlonglong fileSize = info.size; qlonglong fileSize = info.size;
qlonglong completed = pit->transfered; qlonglong completed = pit->transfered;
double progress = (info.size > 0)?(pit->transfered * 100.0 / info.size):0.0; // double progress = (info.size > 0)?(pit->transfered * 100.0 / info.size):0.0;
qlonglong remaining = (info.size - pit->transfered) / (pit->tfRate * 1024.0); qlonglong remaining = (info.size - pit->transfered) / (pit->tfRate * 1024.0);
// Estimate the completion. We need something more accurate, meaning that we need to // Estimate the completion. We need something more accurate, meaning that we need to

View File

@ -678,7 +678,7 @@ void RshareSettings::setExpandNewMessages (bool bValue)
uint RshareSettings::getMaxTimeBeforeIdle() uint RshareSettings::getMaxTimeBeforeIdle()
{ {
if (m_maxTimeBeforeIdle == -1) { if (m_maxTimeBeforeIdle == -1) {
m_maxTimeBeforeIdle = valueFromGroup("General", "maxTimeBeforeIdle", 30).toUInt(); m_maxTimeBeforeIdle = value("maxTimeBeforeIdle", 30).toUInt();
} }
return m_maxTimeBeforeIdle; return m_maxTimeBeforeIdle;
@ -687,5 +687,5 @@ uint RshareSettings::getMaxTimeBeforeIdle()
void RshareSettings::setMaxTimeBeforeIdle(uint nValue) void RshareSettings::setMaxTimeBeforeIdle(uint nValue)
{ {
m_maxTimeBeforeIdle = nValue; m_maxTimeBeforeIdle = nValue;
setValueToGroup("General", "maxTimeBeforeIdle", nValue); setValue("maxTimeBeforeIdle", nValue);
} }