Ticket #1442: licq-4791-optional_notices.patch

File licq-4791-optional_notices.patch, 5.8 kB (added by flynd, 23 months ago)

Adds an option to hide the join/left notices.

  • licq/plugins/qt-gui/src/mainwin.h

     
    159159       m_bShowAllEncodings, 
    160160       m_bTabbedChatting, 
    161161       m_bShowHistory, 
     162       m_showNotices, 
    162163       m_bDisableDockIcon, 
    163164       m_bSortColumnAscending, 
    164165       m_chatVertSpacing, 
  • licq/plugins/qt-gui/src/usereventdlg.cpp

     
    17931793{ 
    17941794  if (szId == 0) return; 
    17951795   
    1796   if (mainwin->m_bMsgChatView) 
     1796  if (mainwin->m_bMsgChatView && mainwin->m_showNotices) 
    17971797  { 
    17981798    ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_R); 
    17991799    QString userName; 
     
    18281828{ 
    18291829  if (szId == 0) return; 
    18301830   
    1831   if (mainwin->m_bMsgChatView) 
     1831  if (mainwin->m_bMsgChatView && mainwin->m_showNotices) 
    18321832  { 
    18331833    ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_R); 
    18341834    QString userName; 
  • licq/plugins/qt-gui/src/optionsdlg.cpp

     
    227227  /*btnColorTabLabel->setPaletteBackgroundColor(mainwin->m_colorTab);*/ 
    228228  btnColorTypingLabel->setPaletteBackgroundColor(mainwin->m_colorTabTyping); 
    229229  btnColorChatBkg->setPaletteBackgroundColor(mainwin->m_colorChatBkg); 
    230   slot_refresh_msgViewer(); 
    231    
     230 
    232231  if (mainwin->m_bMsgChatView) 
    233232  { 
    234233    chkTabbedChatting->setChecked(mainwin->m_bTabbedChatting); 
    235234    chkShowHistory->setChecked(mainwin->m_bShowHistory); 
     235    chkShowNotices->setChecked(mainwin->m_showNotices); 
    236236  } 
    237237  else 
    238238  { 
    239239    chkTabbedChatting->setEnabled(false); 
    240240    chkShowHistory->setEnabled(false); 
     241    chkShowNotices->setEnabled(false); 
    241242  } 
     243  slot_refresh_msgViewer(); 
     244 
    242245  chkSendTN->setChecked(mainwin->licqDaemon->SendTypingNotification()); 
    243246  chkAutoPosReplyWin->setChecked(mainwin->m_bAutoPosReplyWin); 
    244247  chkFlashTaskbar->setChecked(mainwin->m_bFlashTaskbar); 
     
    532535 
    533536  mainwin->m_bTabbedChatting = chkTabbedChatting->isChecked(); 
    534537  mainwin->m_bShowHistory = chkShowHistory->isChecked(); 
     538  mainwin->m_showNotices = chkShowNotices->isChecked(); 
    535539  mainwin->m_bAutoPosReplyWin = chkAutoPosReplyWin->isChecked(); 
    536540  mainwin->m_bFlashTaskbar = chkFlashTaskbar->isChecked(); 
    537541  mainwin->m_bAutoSendThroughServer = chkAutoSendThroughServer->isChecked(); 
     
    837841  QWhatsThis::add(chkShowHistory, tr("Show the last 5 messages when a Send Window is opened")); 
    838842  connect(chkMsgChatView, SIGNAL(toggled(bool)), this, SLOT(slot_useMsgChatView(bool))); 
    839843 
     844  chkShowNotices = new QCheckBox(tr("Show Join/Left Notices"), boxMainWin); 
     845  QWhatsThis::add(chkShowNotices, tr("Show a notice in the chat window when a user joins or leavs the conversation.")); 
     846  connect(chkShowNotices, SIGNAL(toggled(bool)), this, SLOT(slot_refresh_msgViewer())); 
     847 
    840848  chkSendTN = new QCheckBox(tr("Send typing notifications"), boxMainWin); 
    841849  QWhatsThis::add(chkSendTN, tr("Send a notification to the user so they can see when you are typing a message to them")); 
    842850 
     
    11511159 
    11521160void OptionsDlg::slot_useMsgChatView(bool b) 
    11531161{ 
    1154   if (!b) 
    1155   { 
    1156     chkTabbedChatting->setChecked(false); 
    1157     chkShowHistory->setChecked(false); 
    1158   } 
    1159  
    11601162  chkTabbedChatting->setEnabled(b); 
    11611163  chkShowHistory->setEnabled(b); 
     1164  chkShowNotices->setEnabled(b); 
    11621165} 
    11631166 
    11641167void OptionsDlg::slot_useProxy(bool b) 
     
    17441747          names[i % 2], 
    17451748          MLView::toRichText(tr(msgs[i]), true, true)); 
    17461749  } 
    1747   msgChatViewer->addNotice(date, MLView::toRichText(tr(msgs[7]), true, true)); 
    17481750 
     1751  if (chkShowNotices->isChecked()) 
     1752    msgChatViewer->addNotice(date, MLView::toRichText(tr(msgs[7]), true, true)); 
     1753 
    17491754  msgHistViewer->updateContent(); 
    17501755} 
    17511756 
  • licq/plugins/qt-gui/src/mainwin.cpp

     
    429429  licqConf.ReadBool("MsgChatView", m_bMsgChatView, true ); 
    430430  licqConf.ReadBool("TabbedChatting", m_bTabbedChatting, true); 
    431431  licqConf.ReadBool("ShowHistory", m_bShowHistory, true); 
     432  licqConf.ReadBool("ShowNotices", m_showNotices, true); 
    432433  licqConf.ReadBool("AutoPosReplyWin", m_bAutoPosReplyWin, true); 
    433434  licqConf.ReadBool("AutoSendThroughServer", m_bAutoSendThroughServer, false); 
    434435  licqConf.ReadBool("EnableMainwinMouseMovement", m_bEnableMainwinMouseMovement, true); 
     
    35713572  licqConf.WriteBool("MsgChatView", m_bMsgChatView); 
    35723573  licqConf.WriteBool("TabbedChatting", m_bTabbedChatting); 
    35733574  licqConf.WriteBool("ShowHistory", m_bShowHistory); 
     3575  licqConf.WriteBool("ShowNotices", m_showNotices); 
    35743576  licqConf.WriteBool("AutoPosReplyWin", m_bAutoPosReplyWin); 
    35753577  licqConf.WriteBool("AutoSendThroughServer", m_bAutoSendThroughServer); 
    35763578  licqConf.WriteBool("EnableMainwinMouseMovement", m_bEnableMainwinMouseMovement); 
  • licq/plugins/qt-gui/src/optionsdlg.h

     
    114114             *chkSysBack, *chkSendFromClipboard, *chkMsgChatView, *chkAutoPosReplyWin, 
    115115             *chkFlashTaskbar, *chkAutoSendThroughServer, *chkTabbedChatting, 
    116116             *chkMainWinSticky, *chkMsgWinSticky, *chkSingleLineChatMode, 
    117              *chkEnableMainwinMouseMovement, *chkShowHistory, *chkSendTN; 
     117             *chkEnableMainwinMouseMovement, *chkShowHistory, *chkSendTN, *chkShowNotices; 
    118118   QRadioButton *rdbDockDefault, *rdbDockThemed, *rdbDockSmall; 
    119119   QComboBox *cmbDockTheme, *cmbSortBy; 
    120120