Diffstat (limited to 'noncore/net/opieirc/ircchanneltab.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 16 |
1 files changed, 16 insertions, 0 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 | |||
@@ -23,6 +23,11 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW | |||
23 | m_list->update(); | 23 | m_list->update(); |
24 | m_list->setMaximumWidth(LISTWIDTH); | 24 | m_list->setMaximumWidth(LISTWIDTH); |
25 | m_field = new IRCHistoryLineEdit(this); | 25 | m_field = new IRCHistoryLineEdit(this); |
26 | connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab())); | ||
27 | connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab())); | ||
28 | connect(m_field, SIGNAL(closeTab()), this, SIGNAL(closeTab())); | ||
29 | connect(this, SIGNAL(editFocus()), m_field, SLOT(setEditFocus())); | ||
30 | |||
26 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); | 31 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); |
27 | m_popup = new QPopupMenu(m_list); | 32 | m_popup = new QPopupMenu(m_list); |
28 | m_lines = 0; | 33 | m_lines = 0; |
@@ -41,6 +46,8 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW | |||
41 | hbox->show(); | 46 | hbox->show(); |
42 | m_layout->add(m_field); | 47 | m_layout->add(m_field); |
43 | m_field->setFocus(); | 48 | m_field->setFocus(); |
49 | m_field->setActiveWindow(); | ||
50 | |||
44 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 51 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
45 | settingsChanged(); | 52 | settingsChanged(); |
46 | } | 53 | } |
@@ -63,6 +70,15 @@ void IRCChannelTab::appendText(QString text) { | |||
63 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 70 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
64 | m_textview->setText(txt); | 71 | m_textview->setText(txt); |
65 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 72 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
73 | |||
74 | int p1, p2; | ||
75 | if ( (p1 = text.find("ping", 0, false) )!= -1 && (p2 = text.find( m_parentTab->server()->nick(), 0,false )) != -1 ) { | ||
76 | int col = text.findRev("color", -1, false); | ||
77 | if ( col < p2 ) | ||
78 | emit ping( title() ); | ||
79 | |||
80 | } | ||
81 | |||
66 | emit changed(this); | 82 | emit changed(this); |
67 | } | 83 | } |
68 | 84 | ||