summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-06-09 17:37:13 (UTC)
committer skyhusker <skyhusker>2005-06-09 17:37:13 (UTC)
commit5173a392a1422add3e3ae2a38d6bd4eb5df3cf87 (patch) (unidiff)
treece9d8b66e60e6028b7524b8e3ac8f45d6afa2332
parent2ed64fcf5a3c93ce613e63461cb925568c7df887 (diff)
downloadopie-5173a392a1422add3e3ae2a38d6bd4eb5df3cf87.zip
opie-5173a392a1422add3e3ae2a38d6bd4eb5df3cf87.tar.gz
opie-5173a392a1422add3e3ae2a38d6bd4eb5df3cf87.tar.bz2
Fix cosmetic error displaying channels starting with '&'
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircchanneltab.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp
index 707e17f..881ded7 100644
--- a/noncore/net/opieirc/ircchanneltab.cpp
+++ b/noncore/net/opieirc/ircchanneltab.cpp
@@ -143,78 +143,81 @@ void IRCChannelTab::toggleList() {
143 m_listVisible = !m_listVisible; 143 m_listVisible = !m_listVisible;
144} 144}
145 145
146void IRCChannelTab::mouseButtonPressed(int mouse, QListBoxItem *, const QPoint &point) { 146void IRCChannelTab::mouseButtonPressed(int mouse, QListBoxItem *, const QPoint &point) {
147 switch (mouse) { 147 switch (mouse) {
148 case 1: 148 case 1:
149 break; 149 break;
150 case 2: 150 case 2:
151 m_popup->popup(point); 151 m_popup->popup(point);
152 break; 152 break;
153 }; 153 };
154} 154}
155 155
156void IRCChannelTab::popupQuery( QListBoxItem *item) { 156void IRCChannelTab::popupQuery( QListBoxItem *item) {
157 if (item) { 157 if (item) {
158 IRCPerson *person = session()->getPerson(item->text()); 158 IRCPerson *person = session()->getPerson(item->text());
159 if (person) { 159 if (person) {
160 IRCQueryTab *tab = m_parentTab->getTabForQuery(person); 160 IRCQueryTab *tab = m_parentTab->getTabForQuery(person);
161 if (!tab) { 161 if (!tab) {
162 tab = new IRCQueryTab(person, m_parentTab, m_mainWindow, (QWidget *)parent()); 162 tab = new IRCQueryTab(person, m_parentTab, m_mainWindow, (QWidget *)parent());
163 m_parentTab->addQueryTab(tab); 163 m_parentTab->addQueryTab(tab);
164 m_mainWindow->addTab(tab); 164 m_mainWindow->addTab(tab);
165 } 165 }
166 } 166 }
167 } 167 }
168} 168}
169 169
170void IRCChannelTab::popupQuery() { 170void IRCChannelTab::popupQuery() {
171 if ( m_list->currentItem() != -1 ) 171 if ( m_list->currentItem() != -1 )
172 popupQuery( m_list->item(m_list->currentItem())); 172 popupQuery( m_list->item(m_list->currentItem()));
173} 173}
174 174
175void IRCChannelTab::popupPing() { 175void IRCChannelTab::popupPing() {
176 if(m_list->currentItem() != -1) 176 if(m_list->currentItem() != -1)
177 m_parentTab->session()->sendCTCPPing(m_list->text(m_list->currentItem())); 177 m_parentTab->session()->sendCTCPPing(m_list->text(m_list->currentItem()));
178} 178}
179 179
180void IRCChannelTab::popupVersion() { 180void IRCChannelTab::popupVersion() {
181 if(m_list->currentItem() != -1) 181 if(m_list->currentItem() != -1)
182 m_parentTab->session()->sendCTCPRequest(m_list->text(m_list->currentItem()), "VERSION", ""); 182 m_parentTab->session()->sendCTCPRequest(m_list->text(m_list->currentItem()), "VERSION", "");
183} 183}
184 184
185void IRCChannelTab::popupWhois() { 185void IRCChannelTab::popupWhois() {
186 if(m_list->currentItem() != -1) 186 if(m_list->currentItem() != -1)
187 m_parentTab->session()->whois(m_list->text(m_list->currentItem())); 187 m_parentTab->session()->whois(m_list->text(m_list->currentItem()));
188} 188}
189 189
190QString IRCChannelTab::title() { 190QString IRCChannelTab::title() {
191 return m_channel->channelname(); 191 if(!m_channel->channelname().startsWith("&"))
192 return m_channel->channelname();
193
194 return "&" + m_channel->channelname();
192} 195}
193 196
194IRCSession *IRCChannelTab::session() { 197IRCSession *IRCChannelTab::session() {
195 return m_parentTab->session(); 198 return m_parentTab->session();
196} 199}
197 200
198void IRCChannelTab::remove() { 201void IRCChannelTab::remove() {
199 if (session()->isSessionActive()) { 202 if (session()->isSessionActive()) {
200 session()->part(m_channel); 203 session()->part(m_channel);
201 } else { 204 } else {
202 m_mainWindow->killTab(this); 205 m_mainWindow->killTab(this);
203 } 206 }
204} 207}
205 208
206void IRCChannelTab::enqueue(const QString &channel, const QString &message) { 209void IRCChannelTab::enqueue(const QString &channel, const QString &message) {
207 if (m_queuedMessages.count() == (m_queuedMessages.size() - 1) ) 210 if (m_queuedMessages.count() == (m_queuedMessages.size() - 1) )
208 /* 17 messages max */ 211 /* 17 messages max */
209 return; 212 return;
210 m_queuedMessages.insert(channel, new QString(message)); 213 m_queuedMessages.insert(channel, new QString(message));
211} 214}
212 215
213IRCChannel *IRCChannelTab::channel() { 216IRCChannel *IRCChannelTab::channel() {
214 return m_channel; 217 return m_channel;
215} 218}
216 219
217IRCChannelList *IRCChannelTab::list() { 220IRCChannelList *IRCChannelTab::list() {
218 return m_list; 221 return m_list;
219} 222}
220 223