mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 16:15:23 -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
|
@ -22,7 +22,7 @@
|
|||
#ifndef _PEERSDIALOG_H
|
||||
#define _PEERSDIALOG_H
|
||||
|
||||
#include "chat/HandleRichText.h"
|
||||
#include "chat/ChatStyle.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
|
||||
#include "mainpage.h"
|
||||
|
@ -60,7 +60,6 @@ public:
|
|||
/** Default Destructor */
|
||||
~PeersDialog ();
|
||||
|
||||
void loadEmoticonsgroupchat();
|
||||
// void setChatDialog(ChatDialog *cd);
|
||||
|
||||
virtual void updateDisplay() ; // overloaded from RsAutoUpdatePage
|
||||
|
@ -96,6 +95,8 @@ public slots:
|
|||
protected:
|
||||
virtual void dragEnterEvent(QDragEnterEvent *event);
|
||||
virtual void dropEvent(QDropEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *ev);
|
||||
void showEvent (QShowEvent *event);
|
||||
|
||||
private slots:
|
||||
void pasteLink() ;
|
||||
|
@ -129,7 +130,6 @@ private slots:
|
|||
|
||||
void setColor();
|
||||
void insertSendList();
|
||||
void checkChat();
|
||||
void sendMsg();
|
||||
|
||||
void statusmessage();
|
||||
|
@ -166,6 +166,7 @@ signals:
|
|||
|
||||
private:
|
||||
void processSettings(bool bLoad);
|
||||
void addChatMsg(bool incoming, bool history, QString &name, QDateTime &sendTime, QString &message);
|
||||
|
||||
class QLabel *iconLabel, *textLabel;
|
||||
class QWidget *widget;
|
||||
|
@ -177,10 +178,6 @@ private:
|
|||
|
||||
QString fileName;
|
||||
|
||||
/** store default information for embedding HTML */
|
||||
RsChat::EmbedInHtmlAhref defEmbedAhref;
|
||||
RsChat::EmbedInHtmlImg defEmbedImg;
|
||||
|
||||
/* Worker Functions */
|
||||
/* (1) Update Display */
|
||||
|
||||
|
@ -190,17 +187,13 @@ private:
|
|||
/** Defines the actions for the context menu */
|
||||
QAction* pasteLinkAct;
|
||||
|
||||
//QTreeWidget *peertreeWidget;
|
||||
|
||||
IMHistoryKeeper historyKeeper;
|
||||
ChatStyle style;
|
||||
|
||||
QColor _currentColor;
|
||||
bool _underline;
|
||||
time_t last_status_send_time ;
|
||||
|
||||
QHash<QString, QString> smileys;
|
||||
QWidget *smWidget;
|
||||
|
||||
QFont mCurrentFont; /* how the text will come out */
|
||||
|
||||
/** Qt Designer generated object */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue