new methods for set and get the max time before idle on RshareSettings

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3308 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-07-21 07:39:14 +00:00
parent e3e4c97369
commit 423f6811ce
4 changed files with 29 additions and 4 deletions

View file

@ -87,6 +87,8 @@ RshareSettings *Settings = NULL;
/** Default Constructor */
RshareSettings::RshareSettings()
{
m_maxTimeBeforeIdle = -1;
initSettings();
}
@ -375,3 +377,19 @@ void RshareSettings::setMsgSetToReadOnActivate (bool bValue)
{
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", bValue);
}
/* time before idle */
uint RshareSettings::getMaxTimeBeforeIdle()
{
if (m_maxTimeBeforeIdle == -1) {
m_maxTimeBeforeIdle = valueFromGroup("General", "maxTimeBeforeIdle", 30).toUInt();
}
return m_maxTimeBeforeIdle;
}
void RshareSettings::setMaxTimeBeforeIdle(uint nValue)
{
m_maxTimeBeforeIdle = nValue;
setValueToGroup("General", "maxTimeBeforeIdle", nValue);
}