Added setting for the count of messages to load from the history for group and private chat

Restore the last active page in MainWindow on startup
Removed not needed methods RshareSettings::getChatAvatar and RshareSettings::setChatAvatar


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3747 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-04 11:14:47 +00:00
parent 5a6456ebf1
commit ad6b10272b
11 changed files with 161 additions and 43 deletions

View file

@ -140,16 +140,6 @@ void RshareSettings::initSettings()
setDefault("AddFeedsAtEnd", false);
}
/** Gets/sets the currently saved chat avatar. */
QImage RshareSettings::getChatAvatar() const
{
return value(SETTING_CHAT_AVATAR).value<QImage>();
}
void RshareSettings::setChatAvatar(const QImage& I)
{
setValue(SETTING_CHAT_AVATAR,I) ;
}
/** Gets the currently preferred language code for Rshare. */
QString RshareSettings::getLanguageCode()
{
@ -356,6 +346,26 @@ void RshareSettings::setHistoryChatStyle(const QString &stylePath, const QString
setValueToGroup("Chat", "StylePrivateVariant", styleVariant);
}
int RshareSettings::getPublicChatHistoryCount()
{
return valueFromGroup("Chat", "PublicChatHistoryCount", 0).toInt();
}
void RshareSettings::setPublicChatHistoryCount(int value)
{
setValueToGroup("Chat", "PublicChatHistoryCount", value);
}
int RshareSettings::getPrivateChatHistoryCount()
{
return valueFromGroup("Chat", "PrivateChatHistoryCount", 20).toInt();
}
void RshareSettings::setPrivateChatHistoryCount(int value)
{
setValueToGroup("Chat", "PrivateChatHistoryCount", value);
}
/** Returns true if RetroShare is set to run on system boot. */
bool
RshareSettings::runRetroshareOnBoot()
@ -445,6 +455,17 @@ void RshareSettings::loadWidgetInformation(QMainWindow *widget, QToolBar *toolBa
loadWidgetInformation(widget);
}
/* MainWindow */
int RshareSettings::getLastPageInMainWindow ()
{
return valueFromGroup("MainWindow", "LastPage", true).toInt();
}
void RshareSettings::setLastPageInMainWindow (int value)
{
setValueToGroup("MainWindow", "LastPage", value);
}
/* Messages */
bool RshareSettings::getMsgSetToReadOnActivate ()
{