mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 22:52:54 -04:00
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:
parent
e3e4c97369
commit
423f6811ce
4 changed files with 29 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue