Show
Ignore:
Timestamp:
11/30/06 03:02:49 (2 years ago)
Author:
erijo
Message:

Patch from Anders Olofsson to make the history layout configurable. Also adds a new style format that can be used in the history. Fixes part of #1449.

With this commit, <font> tags are removed before the message is displayed. This means that the sender can no longer choose the font or color to show the message in. IMHO, this is a good thing. But if you have an other opinion, speak up and maybe I'll make it configurable.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/ewidgets.h

    r4736 r4791  
    3333#include <qsize.h> 
    3434#include <qlistview.h> 
     35#include <qstringlist.h> 
    3536 
    3637#include "mlview.h" 
     
    199200  CMainWindow *mainwin; 
    200201public: 
     202  static QStringList getStyleNames(bool includeHistoryStyles = false); 
     203 
    201204  CMessageViewWidget(const char *szId, unsigned long nPPID, 
    202     CMainWindow *m, QWidget *parent = 0, const char *name = 0); 
     205    CMainWindow *m, QWidget *parent = 0, const char *name = 0, bool historyMode = false); 
    203206  CMessageViewWidget(unsigned long _nUin, CMainWindow *m, 
    204              QWidget* parent=0, const char * name =0); 
     207    QWidget* parent = 0, const char *name = 0, bool historyMode = false); 
    205208  virtual ~CMessageViewWidget(); 
    206209 
    207210  void setOwner(const char *szId); 
     211  void updateContent(); 
     212  void clear(); 
    208213  void addMsg(direction dir, bool fromHistory, QString eventDescription, QDateTime date,  
    209214    bool isDirect, bool isMultiRec, bool isUrgent, bool isEncrypted,  
     
    213218  unsigned short m_nMsgStyle; 
    214219  QString m_nDateFormat; 
    215   bool m_bAppendLineBreak; 
     220  bool m_extraSpacing; 
     221  bool m_appendLineBreak; 
     222  bool m_useBuffer; 
    216223  QColor m_colorRcvHistory; 
    217224  QColor m_colorSntHistory; 
     
    223230  virtual void addMsg(CUserEvent *, const char * = 0, unsigned long = 0); 
    224231  void addMsg(ICQEvent *); 
     232 
     233private: 
     234  void internalAddMsg(QString s); 
     235  QString m_buffer; 
    225236}; 
    226237