Ticket #1442: licq-4735-notice_color_option.patch
| File licq-4735-notice_color_option.patch, 6.8 kB (added by flynd, 2 years ago) |
|---|
-
licq/plugins/qt-gui/src/mainwin.h
186 186 m_colorSntHistory, 187 187 m_colorRcv, 188 188 m_colorSnt, 189 m_colorNotice, 189 190 m_colorTab, 190 191 m_colorTabTyping, 191 192 m_colorChatBkg; -
licq/plugins/qt-gui/src/ewidgets.h
217 217 QColor m_colorSntHistory; 218 218 QColor m_colorRcv; 219 219 QColor m_colorSnt; 220 QColor m_colorNotice; 220 221 221 222 public slots: 222 223 virtual void addMsg(CUserEvent *, const char * = 0, unsigned long = 0); -
licq/plugins/qt-gui/src/optionsdlg.cpp
236 236 btnColorSnt->setPaletteBackgroundColor(mainwin->m_colorSnt); 237 237 btnColorRcvHistory->setPaletteBackgroundColor(mainwin->m_colorRcvHistory); 238 238 btnColorSntHistory->setPaletteBackgroundColor(mainwin->m_colorSntHistory); 239 btnColorNotice->setPaletteBackgroundColor(mainwin->m_colorNotice); 239 240 /*btnColorTabLabel->setPaletteBackgroundColor(mainwin->m_colorTab);*/ 240 241 btnColorTypingLabel->setPaletteBackgroundColor(mainwin->m_colorTabTyping); 241 242 btnColorChatBkg->setPaletteBackgroundColor(mainwin->m_colorChatBkg); … … 533 534 mainwin->m_colorSnt = btnColorSnt->paletteBackgroundColor(); 534 535 mainwin->m_colorRcvHistory = btnColorRcvHistory->paletteBackgroundColor(); 535 536 mainwin->m_colorSntHistory = btnColorSntHistory->paletteBackgroundColor(); 537 mainwin->m_colorNotice = btnColorNotice->paletteBackgroundColor(); 536 538 /*mainwin->m_colorTab = btnColorTabLabel->paletteBackgroundColor();*/ 537 539 mainwin->m_colorTabTyping = btnColorTypingLabel->paletteBackgroundColor(); 538 540 mainwin->m_colorChatBkg = btnColorChatBkg->paletteBackgroundColor(); … … 1637 1639 new QLabel(tr("History Sent:"), boxColors); 1638 1640 btnColorSntHistory = new CColorOption(boxColors); 1639 1641 1642 new QLabel(tr("Notice:"), boxColors); 1643 btnColorNotice = new CColorOption(boxColors); 1644 1640 1645 /*new QLabel(tr("Tab Label Color:"), boxColors); 1641 1646 btnColorTabLabel = new CColorOption(boxColors);*/ 1642 1647 … … 1650 1655 connect(btnColorRcv, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); 1651 1656 connect(btnColorSntHistory, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); 1652 1657 connect(btnColorRcvHistory, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); 1658 connect(btnColorNotice, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); 1653 1659 /*connect(btnColorTabLabel, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer()));*/ 1654 1660 connect(btnColorTypingLabel, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); 1655 1661 connect(btnColorChatBkg, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); … … 1679 1685 static QDateTime date = QDateTime::currentDateTime(); 1680 1686 1681 1687 const char *names[2] = {"Marge", "Homer"}; 1682 const char *msgs[ 7] = {1688 const char *msgs[8] = { 1683 1689 "This is received message", 1684 1690 "This is a sent message", 1685 1691 "Have you gone to the Licq IRC Channel?", 1686 1692 "No, where is it?", 1687 1693 "#Licq on irc.freenode.net", 1688 1694 "Cool, I'll see you there :)", 1689 "We'll be waiting!"}; 1695 "We'll be waiting!", 1696 "Marge has left the conversation."}; 1690 1697 1691 1698 msgViewer->m_nMsgStyle = cmbStyle->currentItem(); 1692 1699 msgViewer->m_bAppendLineBreak = chkLineBreak->isChecked(); … … 1694 1701 msgViewer->m_colorRcv = btnColorRcv->paletteBackgroundColor(); 1695 1702 msgViewer->m_colorSntHistory = btnColorSntHistory->paletteBackgroundColor(); 1696 1703 msgViewer->m_colorRcvHistory = btnColorRcvHistory->paletteBackgroundColor(); 1704 msgViewer->m_colorNotice = btnColorNotice->paletteBackgroundColor(); 1697 1705 tabViewer->setPaletteForegroundColor(btnColorTypingLabel->paletteBackgroundColor()); 1698 1706 msgViewer->setPaletteBackgroundColor(btnColorChatBkg->paletteBackgroundColor()); 1699 1707 … … 1709 1717 names[i % 2], 1710 1718 MLView::toRichText(msgs[i], true, true)); 1711 1719 } 1720 msgViewer->addNotice(date, MLView::toRichText(msgs[7], true, true)); 1712 1721 } 1713 1722 1714 1723 CColorOption::CColorOption (QWidget* parent) -
licq/plugins/qt-gui/src/mainwin.cpp
451 451 m_colorSnt = QColor(szTemp); 452 452 licqConf.ReadStr("SentHistoryColor", szTemp, "light blue"); 453 453 m_colorSntHistory = QColor(szTemp); 454 licqConf.ReadStr("NoticeColor", szTemp, "green"); 455 m_colorNotice = QColor(szTemp); 454 456 licqConf.ReadStr("TabFontColor", szTemp, 455 457 QApplication::palette(this).active().text().name()); 456 458 m_colorTab = QColor(szTemp); … … 3580 3582 licqConf.WriteStr("ReceiveHistoryColor", m_colorRcvHistory.name()); 3581 3583 licqConf.WriteStr("SentMessageColor", m_colorSnt.name()); 3582 3584 licqConf.WriteStr("SentHistoryColor", m_colorSntHistory.name()); 3585 licqConf.WriteStr("NoticeColor", m_colorNotice.name()); 3583 3586 licqConf.WriteStr("TabFontColor", m_colorTab.name()); 3584 3587 licqConf.WriteStr("TabOnTypingColor", m_colorTabTyping.name()); 3585 3588 licqConf.WriteStr("ChatBackground", m_colorChatBkg.name()); -
licq/plugins/qt-gui/src/ewidgets.cpp
674 674 m_colorSnt = m->m_colorSnt; 675 675 m_colorRcvHistory = m->m_colorRcvHistory; 676 676 m_colorSntHistory = m->m_colorSntHistory; 677 m_colorNotice = m->m_colorNotice; 677 678 setPaletteBackgroundColor(m->m_colorChatBkg); 678 679 mainwin = m; 679 680 … … 708 709 m_colorSnt = m->m_colorSnt; 709 710 m_colorRcvHistory = m->m_colorRcvHistory; 710 711 m_colorSntHistory = m->m_colorSntHistory; 712 m_colorNotice = m->m_colorNotice; 711 713 setPaletteBackgroundColor(m->m_colorChatBkg); 712 714 mainwin = m; 713 715 /* … … 950 952 951 953 void CMessageViewWidget::addNotice(QDateTime dt, QString messageText) 952 954 { 953 QString color = "green";955 QString color = m_colorNotice.name(); 954 956 QString s = ""; 955 957 const QString dateTime = dt.toString( m_nDateFormat ); 956 958 -
licq/plugins/qt-gui/src/optionsdlg.h
170 170 CColorOption *btnColorSnt; 171 171 CColorOption *btnColorRcvHistory; 172 172 CColorOption *btnColorSntHistory; 173 CColorOption *btnColorNotice; 173 174 CColorOption *btnColorTabLabel; 174 175 CColorOption *btnColorTypingLabel; 175 176 CColorOption *btnColorChatBkg;
