summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircchanneltab.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircchanneltab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircchanneltab.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp
index 667e977..b6e3954 100644
--- a/noncore/net/opieirc/ircchanneltab.cpp
+++ b/noncore/net/opieirc/ircchanneltab.cpp
@@ -25,2 +25,7 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW
m_field = new IRCHistoryLineEdit(this);
+ connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab()));
+ connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab()));
+ connect(m_field, SIGNAL(closeTab()), this, SIGNAL(closeTab()));
+ connect(this, SIGNAL(editFocus()), m_field, SLOT(setEditFocus()));
+
QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion"));
@@ -43,2 +48,4 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW
m_field->setFocus();
+ m_field->setActiveWindow();
+
connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand()));
@@ -65,2 +72,11 @@ void IRCChannelTab::appendText(QString text) {
m_textview->ensureVisible(0, m_textview->contentsHeight());
+
+ int p1, p2;
+ 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);
+ if ( col < p2 )
+ emit ping( title() );
+
+ }
+
emit changed(this);
@@ -124,3 +140,3 @@ void IRCChannelTab::popupQuery() {
if (!tab) {
- tab = new IRCQueryTab(person, m_parentTab, m_mainWindow, (QWidget *)parent());
+ tab = new IRCQueryTab(person, m_parentTab, m_mainWindow, (QWidget *)parent());
m_parentTab->addQueryTab(tab);