Changeset 4792
- Timestamp:
- 11/30/06 05:39:56 (21 months ago)
- Location:
- trunk/qt-gui/src
- Files:
-
- 6 modified
-
ewidgets.cpp (modified) (3 diffs)
-
ewidgets.h (modified) (1 diff)
-
mainwin.cpp (modified) (2 diffs)
-
mainwin.h (modified) (1 diff)
-
optionsdlg.cpp (modified) (9 diffs)
-
optionsdlg.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt-gui/src/ewidgets.cpp
r4791 r4792 712 712 m_appendLineBreak = m->m_chatAppendLineBreak; 713 713 } 714 m_showNotices = m->m_showNotices; 714 715 m_colorRcv = m->m_colorRcv; 715 716 m_colorSnt = m->m_colorSnt; … … 762 763 m_appendLineBreak = m->m_chatAppendLineBreak; 763 764 } 765 m_showNotices = m->m_showNotices; 764 766 m_colorRcv = m->m_colorRcv; 765 767 m_colorSnt = m->m_colorSnt; … … 1084 1086 void CMessageViewWidget::addNotice(QDateTime dt, QString messageText) 1085 1087 { 1088 if (!m_showNotices) 1089 return; 1090 1086 1091 QString color = m_colorNotice.name(); 1087 1092 QString s = ""; 1088 1093 const QString dateTime = dt.toString( m_nDateFormat ); 1089 1094 1090 /* Remove trailing line breaks. */ 1091 for (unsigned int i = messageText.length() - 1; i >= 0; i--) 1092 { 1093 if (messageText.at(i) == '\n' || messageText.at(i) == '\r') 1095 // Remove trailing line breaks. 1096 for (int i = messageText.length(); i >= 0; i--) 1097 { 1098 if (messageText.at(i - 1) != '\n' && messageText.at(i - 1) != '\r') 1099 { 1094 1100 messageText.truncate(i); 1095 else 1096 break; 1097 } 1098 1101 break; 1102 } 1103 } 1099 1104 1100 1105 switch (m_nMsgStyle) -
trunk/qt-gui/src/ewidgets.h
r4791 r4792 221 221 bool m_appendLineBreak; 222 222 bool m_useBuffer; 223 bool m_showNotices; 223 224 QColor m_colorRcvHistory; 224 225 QColor m_colorSntHistory; -
trunk/qt-gui/src/mainwin.cpp
r4791 r4792 430 430 licqConf.ReadBool("TabbedChatting", m_bTabbedChatting, true); 431 431 licqConf.ReadBool("ShowHistory", m_bShowHistory, true); 432 licqConf.ReadBool("ShowNotices", m_showNotices, true); 432 433 licqConf.ReadBool("AutoPosReplyWin", m_bAutoPosReplyWin, true); 433 434 licqConf.ReadBool("AutoSendThroughServer", m_bAutoSendThroughServer, false); … … 3572 3573 licqConf.WriteBool("TabbedChatting", m_bTabbedChatting); 3573 3574 licqConf.WriteBool("ShowHistory", m_bShowHistory); 3575 licqConf.WriteBool("ShowNotices", m_showNotices); 3574 3576 licqConf.WriteBool("AutoPosReplyWin", m_bAutoPosReplyWin); 3575 3577 licqConf.WriteBool("AutoSendThroughServer", m_bAutoSendThroughServer); -
trunk/qt-gui/src/mainwin.h
r4791 r4792 160 160 m_bTabbedChatting, 161 161 m_bShowHistory, 162 m_showNotices, 162 163 m_bDisableDockIcon, 163 164 m_bSortColumnAscending, -
trunk/qt-gui/src/optionsdlg.cpp
r4791 r4792 229 229 btnColorChatBkg->setPaletteBackgroundColor(mainwin->m_colorChatBkg); 230 230 slot_refresh_msgViewer(); 231 231 232 232 if (mainwin->m_bMsgChatView) 233 233 { 234 234 chkTabbedChatting->setChecked(mainwin->m_bTabbedChatting); 235 235 chkShowHistory->setChecked(mainwin->m_bShowHistory); 236 chkShowNotices->setChecked(mainwin->m_showNotices); 236 237 } 237 238 else … … 239 240 chkTabbedChatting->setEnabled(false); 240 241 chkShowHistory->setEnabled(false); 242 chkShowNotices->setChecked(false); 241 243 } 242 244 chkSendTN->setChecked(mainwin->licqDaemon->SendTypingNotification()); … … 533 535 mainwin->m_bTabbedChatting = chkTabbedChatting->isChecked(); 534 536 mainwin->m_bShowHistory = chkShowHistory->isChecked(); 537 mainwin->m_showNotices = chkShowNotices->isChecked(); 535 538 mainwin->m_bAutoPosReplyWin = chkAutoPosReplyWin->isChecked(); 536 539 mainwin->m_bFlashTaskbar = chkFlashTaskbar->isChecked(); … … 838 841 connect(chkMsgChatView, SIGNAL(toggled(bool)), this, SLOT(slot_useMsgChatView(bool))); 839 842 843 chkShowNotices = new QCheckBox(tr("Show Join/Left Notices"), boxMainWin); 844 QWhatsThis::add(chkShowNotices, tr("Show a notice in the chat window when a user joins or leaves the conversation.")); 845 connect(chkShowNotices, SIGNAL(toggled(bool)), this, SLOT(slot_refresh_msgViewer())); 846 840 847 chkSendTN = new QCheckBox(tr("Send typing notifications"), boxMainWin); 841 848 QWhatsThis::add(chkSendTN, tr("Send a notification to the user so they can see when you are typing a message to them")); … … 1156 1163 chkTabbedChatting->setChecked(false); 1157 1164 chkShowHistory->setChecked(false); 1165 chkShowNotices->setEnabled(false); 1158 1166 } 1159 1167 1160 1168 chkTabbedChatting->setEnabled(b); 1161 1169 chkShowHistory->setEnabled(b); 1170 chkShowNotices->setEnabled(b); 1162 1171 } 1163 1172 … … 1695 1704 static QDateTime date = QDateTime::currentDateTime(); 1696 1705 1697 const char *names[2] = {"Marge", "Homer"};1698 const char *msgs[8] = {1706 const char* const names[2] = {"Marge", "Homer"}; 1707 const char* const msgs[8] = { 1699 1708 QT_TR_NOOP("This is a received message"), 1700 1709 QT_TR_NOOP("This is a sent message"), … … 1710 1719 msgChatViewer->m_extraSpacing = chkChatVertSpacing->isChecked(); 1711 1720 msgChatViewer->m_appendLineBreak = chkChatLineBreak->isChecked(); 1721 msgChatViewer->m_showNotices = chkShowNotices->isChecked(); 1712 1722 msgChatViewer->m_colorSnt = btnColorSnt->paletteBackgroundColor(); 1713 1723 msgChatViewer->m_colorRcv = btnColorRcv->paletteBackgroundColor(); … … 1729 1739 msgChatViewer->clear(); 1730 1740 msgHistViewer->clear(); 1741 1742 QDateTime msgDate = date; 1731 1743 for (unsigned int i = 0; i<7; i++) 1732 1744 { 1733 1745 msgChatViewer->addMsg(i%2 == 0 ? D_RECEIVER : D_SENDER, (i<2), 1734 1746 QString(""), 1735 date,1747 msgDate, 1736 1748 true, false, false, false, 1737 1749 names[i % 2], … … 1740 1752 msgHistViewer->addMsg(i%2 == 0 ? D_RECEIVER : D_SENDER, false, 1741 1753 QString(""), 1742 date,1754 msgDate, 1743 1755 true, false, false, false, 1744 1756 names[i % 2], 1745 1757 MLView::toRichText(tr(msgs[i]), true, true)); 1746 } 1747 msgChatViewer->addNotice(date, MLView::toRichText(tr(msgs[7]), true, true)); 1758 1759 msgDate = msgDate.addSecs(i + 12); 1760 } 1761 msgDate = msgDate.addSecs(12); 1762 msgChatViewer->addNotice(msgDate, MLView::toRichText(tr(msgs[7]), true, true)); 1748 1763 1749 1764 msgHistViewer->updateContent(); -
trunk/qt-gui/src/optionsdlg.h
r4791 r4792 115 115 *chkFlashTaskbar, *chkAutoSendThroughServer, *chkTabbedChatting, 116 116 *chkMainWinSticky, *chkMsgWinSticky, *chkSingleLineChatMode, 117 *chkEnableMainwinMouseMovement, *chkShowHistory, *chkSendTN ;117 *chkEnableMainwinMouseMovement, *chkShowHistory, *chkSendTN, *chkShowNotices; 118 118 QRadioButton *rdbDockDefault, *rdbDockThemed, *rdbDockSmall; 119 119 QComboBox *cmbDockTheme, *cmbSortBy;
