mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 10:19:24 -04:00
- added history parameters for chat lobbies
- added max storage time for items in chat history. Avoids filling up the history with chat from volatile peers. - worked out the layout in config->ChatPage in a more compact design and added help - set the max size of chat messages to 6000 bytes instead of 2000 which was a bit too low - default max number of lobby messages saved in each lobby is 20. Avoids flooding for peers who havn't configured it yet. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6770 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f25f46dffb
commit
e21d869006
11 changed files with 544 additions and 218 deletions
|
@ -266,12 +266,15 @@ ChatPage::save(QString &/*errmsg*/)
|
|||
|
||||
Settings->setPublicChatHistoryCount(ui.publicChatLoadCount->value());
|
||||
Settings->setPrivateChatHistoryCount(ui.privateChatLoadCount->value());
|
||||
Settings->setLobbyChatHistoryCount(ui.lobbyChatLoadCount->value());
|
||||
|
||||
rsHistory->setEnable(true, ui.publicChatEnable->isChecked());
|
||||
rsHistory->setEnable(false, ui.privateChatEnable->isChecked());
|
||||
rsHistory->setEnable(RS_HISTORY_TYPE_PUBLIC , ui.publicChatEnable->isChecked());
|
||||
rsHistory->setEnable(RS_HISTORY_TYPE_PRIVATE, ui.privateChatEnable->isChecked());
|
||||
rsHistory->setEnable(RS_HISTORY_TYPE_LOBBY , ui.lobbyChatEnable->isChecked());
|
||||
|
||||
rsHistory->setSaveCount(true, ui.publicChatSaveCount->value());
|
||||
rsHistory->setSaveCount(false, ui.privateChatSaveCount->value());
|
||||
rsHistory->setSaveCount(RS_HISTORY_TYPE_PUBLIC , ui.publicChatSaveCount->value());
|
||||
rsHistory->setSaveCount(RS_HISTORY_TYPE_PRIVATE, ui.privateChatSaveCount->value());
|
||||
rsHistory->setSaveCount(RS_HISTORY_TYPE_LOBBY , ui.lobbyChatSaveCount->value());
|
||||
|
||||
rsMsgs->setDefaultNickNameForChatLobby(ui.chatLobbyNick_LE->text().toUtf8().constData()) ;
|
||||
|
||||
|
@ -303,6 +306,8 @@ ChatPage::save(QString &/*errmsg*/)
|
|||
}
|
||||
}
|
||||
|
||||
rsHistory->setMaxStorageDuration(ui.max_storage_period->value() * 86400) ;
|
||||
|
||||
uint chatflags = 0;
|
||||
|
||||
if (ui.chat_NewWindow->isChecked())
|
||||
|
@ -346,16 +351,21 @@ ChatPage::load()
|
|||
|
||||
ui.publicChatLoadCount->setValue(Settings->getPublicChatHistoryCount());
|
||||
ui.privateChatLoadCount->setValue(Settings->getPrivateChatHistoryCount());
|
||||
ui.lobbyChatLoadCount->setValue(Settings->getLobbyChatHistoryCount());
|
||||
|
||||
ui.publicChatEnable->setChecked(rsHistory->getEnable(true));
|
||||
ui.privateChatEnable->setChecked(rsHistory->getEnable(false));
|
||||
ui.publicChatEnable->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_PUBLIC));
|
||||
ui.privateChatEnable->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_PRIVATE));
|
||||
ui.lobbyChatEnable->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_LOBBY));
|
||||
|
||||
ui.publicChatSaveCount->setValue(rsHistory->getSaveCount(true));
|
||||
ui.privateChatSaveCount->setValue(rsHistory->getSaveCount(false));
|
||||
ui.publicChatSaveCount->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_PUBLIC));
|
||||
ui.privateChatSaveCount->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_PRIVATE));
|
||||
ui.lobbyChatSaveCount->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_LOBBY));
|
||||
|
||||
ui.labelChatFontPreview->setText(fontTempChat.rawName());
|
||||
ui.labelChatFontPreview->setFont(fontTempChat);
|
||||
|
||||
ui.max_storage_period->setValue(rsHistory->getMaxStorageDuration()/86400) ;
|
||||
|
||||
/* Load styles */
|
||||
publicStylePath = loadStyleInfo(ChatStyle::TYPE_PUBLIC, ui.publicList, ui.publicComboBoxVariant, publicStyleVariant);
|
||||
privateStylePath = loadStyleInfo(ChatStyle::TYPE_PRIVATE, ui.privateList, ui.privateComboBoxVariant, privateStyleVariant);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue