mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
Chat service:
- Added send time to ChatInfo. Chat: - Reworked IMHistoryKeeper to save only needed data as raw data (not formatted from PeersDialog). - Renamed the public chat history file from "his1.xml" to "chatPublic.xml" and moved it from data dir to config dir. The current history is lost. Please delete the file "his1.xml" manually. - Optimized save of the history. Save only when changed, also during the runtime. - Clear the history in PeersDialog clears the IMHistoryKeeper too. - New setting to send chat message with Ctrl+Return. Changed the check for Enter in PeersDialog and PopupChatDialog from textChanged to eventFilter. - Smileys are inserted at the current cursor position, not added at the end. - Don't send emty messages. New class ChatStyle: - Created a new class for the work with chat styles and smileys. - Currently only two internal styles are available - private and public. Later more external styles planned. - Moved functions for loading and showing the emoticons from PeersDialog and PopupChatDialog to the new class. Private chat: - Split private chat style into incoming.htm and outgoing.htm. - Removed style change. Public chat: - New chat style incoming.htm, outgoing.htm, hincoming.htm and houtgoing.htm. Chat feed: - Show links and emoticons if they are enabled for public chat. PeersDialog: - Show the own name and location only once at start and not with QTimer every 1.5 second. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3441 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
73f3fa3223
commit
8213a2aa77
33 changed files with 1167 additions and 1061 deletions
|
@ -48,34 +48,38 @@ ChatPage::closeEvent (QCloseEvent * event)
|
|||
bool
|
||||
ChatPage::save(QString &errmsg)
|
||||
{
|
||||
Settings->beginGroup(QString("Chat"));
|
||||
Settings->beginGroup(QString("Chat"));
|
||||
|
||||
Settings->setValue(QString::fromUtf8("Emoteicons_PrivatChat"), emotePrivatChat());
|
||||
Settings->setValue(QString::fromUtf8("Emoteicons_GroupChat"), emoteGroupChat());
|
||||
Settings->setValue(QString::fromUtf8("GroupChat_History"), groupchatHistory());
|
||||
Settings->setValue(QString::fromUtf8("ChatScreenFont"), fontTempChat.toString());
|
||||
Settings->setValue(QString::fromUtf8("Emoteicons_PrivatChat"), emotePrivatChat());
|
||||
Settings->setValue(QString::fromUtf8("Emoteicons_GroupChat"), emoteGroupChat());
|
||||
Settings->setValue(QString::fromUtf8("GroupChat_History"), groupchatHistory());
|
||||
Settings->setValue(QString::fromUtf8("ChatScreenFont"), fontTempChat.toString());
|
||||
|
||||
Settings->endGroup();
|
||||
Settings->endGroup();
|
||||
|
||||
return true;
|
||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Loads the settings for this page */
|
||||
void
|
||||
ChatPage::load()
|
||||
{
|
||||
Settings->beginGroup(QString("Chat"));
|
||||
Settings->beginGroup(QString("Chat"));
|
||||
|
||||
ui.checkBox_emoteprivchat->setChecked(Settings->value(QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool());
|
||||
ui.checkBox_emotegroupchat->setChecked(Settings->value(QString::fromUtf8("Emoteicons_GroupChat"), true).toBool());
|
||||
ui.checkBox_groupchathistory->setChecked(Settings->value(QString::fromUtf8("GroupChat_History"), true).toBool());
|
||||
ui.checkBox_emoteprivchat->setChecked(Settings->value(QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool());
|
||||
ui.checkBox_emotegroupchat->setChecked(Settings->value(QString::fromUtf8("Emoteicons_GroupChat"), true).toBool());
|
||||
ui.checkBox_groupchathistory->setChecked(Settings->value(QString::fromUtf8("GroupChat_History"), true).toBool());
|
||||
|
||||
fontTempChat.fromString(Settings->value(QString::fromUtf8("ChatScreenFont")).toString());
|
||||
fontTempChat.fromString(Settings->value(QString::fromUtf8("ChatScreenFont")).toString());
|
||||
|
||||
Settings->endGroup();
|
||||
Settings->endGroup();
|
||||
|
||||
ui.labelChatFontPreview->setText(fontTempChat.rawName());
|
||||
ui.labelChatFontPreview->setFont(fontTempChat);
|
||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||
|
||||
ui.labelChatFontPreview->setText(fontTempChat.rawName());
|
||||
ui.labelChatFontPreview->setFont(fontTempChat);
|
||||
}
|
||||
|
||||
bool ChatPage::emotePrivatChat() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue