diff options
Diffstat (limited to 'ksirc/toplevel.cpp')
-rw-r--r-- | ksirc/toplevel.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/ksirc/toplevel.cpp b/ksirc/toplevel.cpp index 427c9364..e3eb564c 100644 --- a/ksirc/toplevel.cpp +++ b/ksirc/toplevel.cpp @@ -133,7 +133,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf caption = TQString(); } - Buffer = FALSE; + Buffer = false; have_focus = 0; tab_pressed = -1; // Tab (nick completion not pressed yet) @@ -363,7 +363,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf linee->setFocusPolicy(TQWidget::StrongFocus); linee->setFont(ksopts->defaultFont); - if(ksopts->oneLineEntry == true) { + if(ksopts->oneLineEntry) { linee->setWordWrap(TQTextEdit::NoWrap); } else { @@ -394,9 +394,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf * */ - opami = FALSE; - continued_line = FALSE; -// on_root = FALSE; + opami = false; + continued_line = false; +// on_root = false; /* * Load basic pics and images @@ -610,7 +610,7 @@ void KSircTopLevel::setEncoding() void KSircTopLevel::setupCommandMenu() { - if(cmd_menu.empty() == true){ + if(cmd_menu.empty()){ cmd_menu.append(i18n("Help") + "/" + "help"); cmd_menu.append(i18n("Client") + "/" + "alias"); cmd_menu.append(i18n("User") + "/" + "away"); @@ -719,7 +719,7 @@ void KSircTopLevel::TabNickCompletion(int dir) s = linee->text(); tab_saved = s; end = linee->cursorPosition() - 1; - start = s.findRev(" ", end, FALSE); + start = s.findRev(" ", end, false); tab_start = start; tab_end = end; first = true; @@ -756,12 +756,12 @@ void KSircTopLevel::TabNickCompletion(int dir) if (start == -1) { tab_nick = findNick(s.mid(0, end+1), tab_pressed); - if(first && (tab_nick.isNull() == TRUE)){ + if(first && tab_nick.isNull()){ KNotifyClient::beep(); lineeNotTab(); return; } - else if(tab_nick.isNull() == TRUE){ + else if(tab_nick.isNull()){ tab_pressed -= 1; tab_nick = findNick(s.mid(0, end+1), tab_pressed); } @@ -773,12 +773,12 @@ void KSircTopLevel::TabNickCompletion(int dir) } else { tab_nick = findNick(s.mid(start + 1, end - start), tab_pressed); - if(first && (tab_nick.isNull() == TRUE)){ + if(first && tab_nick.isNull()){ KNotifyClient::beep(); lineeNotTab(); return; } - else if(tab_nick.isNull() == TRUE){ + else if(tab_nick.isNull()){ tab_pressed -= 1; tab_nick = findNick(s.mid(start + 1, end - start), tab_pressed); } @@ -853,7 +853,7 @@ void KSircTopLevel::sirc_receive(TQString str, bool broadcast) if ( line.message.find( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 ) addressedLine = true; - if ( addressedLine == true && line.message.startsWith("* " + ksircProcess()->getNick())) + if ( addressedLine && line.message.startsWith("* " + ksircProcess()->getNick())) addressedLine = false; if ( addressedLine ) @@ -1056,7 +1056,7 @@ bool KSircTopLevel::parse_input(const TQString &string, TQString &plainText) } else if (err) { - if(err->err.isEmpty() == FALSE) + if(!err->err.isEmpty()) { kdWarning() << err->err << ": " << string << endl; delete pResult; @@ -1174,8 +1174,8 @@ void KSircTopLevel::UserUpdateMenu() user_controls->insertItem(ucm->title, i); if(ucm->accel) user_controls->setAccel(i, ucm->accel); - if((ucm->op_only == TRUE) && (opami == FALSE)) - user_controls->setItemEnabled(i, FALSE); + if(ucm->op_only && !opami) + user_controls->setItemEnabled(i, false); } } } @@ -1230,7 +1230,7 @@ void KSircTopLevel::focusChange(TQWidget *w) void KSircTopLevel::gotFocus() { - if(isVisible() == TRUE){ + if(isVisible()){ if(have_focus == 0){ if(m_channelInfo.channel()[0] != '!' ){ TQString str = TQString("/join %1").arg(m_channelInfo.channel()); @@ -1245,7 +1245,7 @@ void KSircTopLevel::gotFocus() emit currentWindow(this); } } - if(m_gotMsgWithoutFocus == true){ + if(m_gotMsgWithoutFocus){ m_gotMsgWithoutFocus = false; servercontroller::self()->decreaseNotificationCount(TQString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel())); } @@ -1351,22 +1351,22 @@ void KSircTopLevel::control_message(int command, TQString str) break; } case STOP_UPDATES: - Buffer = TRUE; + Buffer = true; break; case RESUME_UPDATES: - Buffer = FALSE; - if(LineBuffer.isEmpty() == FALSE) + Buffer = false; + if(!LineBuffer.isEmpty()) sirc_receive(TQString()); break; case REREAD_CONFIG: - emit freezeUpdates(TRUE); // Stop the list boxes update + emit freezeUpdates(true); // Stop the list boxes update selector->setFont( ksopts->defaultFont.family() ); mainw->setFont( ksopts->defaultFont ); nicks->setFont( ksopts->defaultFont ); linee->setFont( ksopts->defaultFont ); ksTopic->setFont( ksopts->defaultFont ); UserUpdateMenu(); // Must call to update Popup. - emit freezeUpdates(FALSE); // Stop the list boxes update + emit freezeUpdates(false); // Stop the list boxes update initColors(); ksopts->channelSetup(m_channelInfo.server(), m_channelInfo.channel()); file->setItemChecked(topicitem, ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].topicShow); @@ -1379,7 +1379,7 @@ void KSircTopLevel::control_message(int command, TQString str) setEncoding(); } mainw->enableTimeStamps(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].timeStamp); - if(ksopts->oneLineEntry == true) { + if(ksopts->oneLineEntry) { linee->setWordWrap(TQTextEdit::NoWrap); } else { @@ -1389,12 +1389,12 @@ void KSircTopLevel::control_message(int command, TQString str) update(); break; case SET_LAG: - if(str.isNull() == FALSE){ - bool ok = TRUE; + if(!str.isNull()){ + bool ok = true; str.truncate(6); double lag = str.toDouble(&ok); - if(ok == TRUE){ + if(ok){ lag -= (lag*100.0 - int(lag*100.0))/100.0; TQString s_lag; s_lag.sprintf("Lag: %.2f", lag); @@ -1585,7 +1585,7 @@ void KSircTopLevel::slotTextDropped( const TQString& _text ) tab_pressed = -1; if(lines > 1){ - linee->setUpdatesEnabled(FALSE); + linee->setUpdatesEnabled(false); TQStringList lines = TQStringList::split( '\n', text, true ); TQStringList::ConstIterator it = lines.begin(); @@ -1618,7 +1618,7 @@ void KSircTopLevel::slotTextDropped( const TQString& _text ) } linee->setText(""); - linee->setUpdatesEnabled(TRUE); + linee->setUpdatesEnabled(true); linee->update(); } else{ @@ -1753,7 +1753,7 @@ void KSircTopLevel::doChange(bool pers, TQString text) } } - if(have_focus == 0 && pers == true && m_gotMsgWithoutFocus == false){ + if(have_focus == 0 && pers && !m_gotMsgWithoutFocus){ m_gotMsgWithoutFocus = true; servercontroller::self()->increaseNotificationCount(TQString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text); } @@ -1797,9 +1797,9 @@ void KSircTopLevel::toggleTicker() else { ticker = new KSTicker(0x0, m_channelInfo.channel().utf8() + "_ticker"); ticker->setCaption(m_channelInfo.channel()); - if(tickerpoint.isNull() == false) + if(!tickerpoint.isNull()) ticker->move(tickerpoint); - if(tickersize.isEmpty() == false) + if(!tickersize.isEmpty()) ticker->resize(tickersize); ticker->show(); displayMgr->hide(this); |