Diffstat (limited to 'noncore/net/opieirc/ircchanneltab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index b6e3954..7610058 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp @@ -17,2 +17,3 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW m_listButton = new QPushButton(">", m_textview); + m_listButton->setFlat( true ); m_textview->setCornerWidget(m_listButton); @@ -27,3 +28,3 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab())); - connect(m_field, SIGNAL(closeTab()), this, SIGNAL(closeTab())); + connect(m_field, SIGNAL(closeTab()), this, SLOT(remove())); connect(this, SIGNAL(editFocus()), m_field, SLOT(setEditFocus())); @@ -38,3 +39,2 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW QPopupMenu *ctcpMenu = new QPopupMenu(m_list); - m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); @@ -51,2 +51,3 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); + connect(m_list, SIGNAL(doubleClicked ( QListBoxItem * ) ), this, SLOT(popupQuery( QListBoxItem * ) )); settingsChanged(); @@ -60,3 +61,3 @@ void IRCChannelTab::appendText(QString text) { /* not using append because it creates layout problems */ - QString txt = m_textview->text() + text + "\n"; + QString txt = m_textview->text() + IRCTab::appendTimestamp( text ); if (m_maxLines > 0 && m_lines >= m_maxLines) { @@ -74,3 +75,5 @@ void IRCChannelTab::appendText(QString text) { int p1, p2; - if ( (p1 = text.find("ping", 0, false) )!= -1 && (p2 = text.find( m_parentTab->server()->nick(), 0,false )) != -1 ) { + if ( text.contains( IRCMessageParser::tr("Received a CTCP PING from ") ) ) + emit ping( title() ); + else if ( (p1 = text.find("ping", 0, false) )!= -1 && (p2 = text.find( m_parentTab->server()->nick(), 0,false )) != -1 ) { int col = text.findRev("color", -1, false); @@ -134,5 +137,5 @@ void IRCChannelTab::mouseButtonPressed(int mouse, QListBoxItem *, const QPoint & -void IRCChannelTab::popupQuery() { - if (m_list->currentItem() != -1) { - IRCPerson *person = session()->getPerson(m_list->item(m_list->currentItem())->text()); +void IRCChannelTab::popupQuery( QListBoxItem *item) { + if (item) { + IRCPerson *person = session()->getPerson(item->text()); if (person) { @@ -148,2 +151,7 @@ void IRCChannelTab::popupQuery() { +void IRCChannelTab::popupQuery() { + if ( m_list->currentItem() != -1 ) + popupQuery( m_list->item(m_list->currentItem())); +} + void IRCChannelTab::popupPing() { |