diff options
Diffstat (limited to 'tools/assistant/helpdialogimpl.cpp')
-rw-r--r-- | tools/assistant/helpdialogimpl.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp index 6a1d91b56..91b0fe9b8 100644 --- a/tools/assistant/helpdialogimpl.cpp +++ b/tools/assistant/helpdialogimpl.cpp @@ -82,9 +82,9 @@ static bool verifyDirectory(const TQString &str) return TQDir().mkdir(str); if (!dirInfo.isDir()) { tqWarning("'%s' exists but is not a directory", str.latin1()); - return FALSE; + return false; } - return TRUE; + return true; } struct IndexKeyword { @@ -145,7 +145,7 @@ void HelpNavigationListItem::addLink( const TQString &link ) } TQString preHash = link.left( hash ); - if ( linkList.grep( preHash, FALSE ).count() > 0 ) + if ( linkList.grep( preHash, false ).count() > 0 ) return; linkList << link; } @@ -173,7 +173,7 @@ TQString HelpNavigationContentsItem::link() const HelpDialog::HelpDialog( TQWidget *parent, MainWindow *h ) - : HelpDialogBase( parent, 0, FALSE ), lwClosed( FALSE ), help( h ) + : HelpDialogBase( parent, 0, false ), lwClosed( false ), help( h ) { } @@ -226,9 +226,9 @@ void HelpDialog::initialize() editIndex->installEventFilter( this ); listBookmarks->header()->hide(); - listBookmarks->header()->setStretchEnabled( TRUE ); + listBookmarks->header()->setStretchEnabled( true ); listContents->header()->hide(); - listContents->header()->setStretchEnabled( TRUE ); + listContents->header()->setStretchEnabled( true ); framePrepare->hide(); connect( tqApp, TQ_SIGNAL(lastWindowClosed()), TQ_SLOT(lastWinClosed()) ); @@ -239,15 +239,15 @@ void HelpDialog::initialize() itemPopup->insertItem( tr( "Open Link in New Window" ), 1 ); itemPopup->insertItem( tr( "Open Link in New Tab" ), 2 ); - contentList.setAutoDelete( TRUE ); + contentList.setAutoDelete( true ); contentList.clear(); - initDoneMsgShown = FALSE; + initDoneMsgShown = false; fullTextIndex = 0; - indexDone = FALSE; - titleMapDone = FALSE; - contentsInserted = FALSE; - bookmarksInserted = FALSE; + indexDone = false; + titleMapDone = false; + contentsInserted = false; + bookmarksInserted = false; setupTitleMap(); } @@ -260,7 +260,7 @@ void HelpDialog::processEvents() void HelpDialog::lastWinClosed() { - lwClosed = TRUE; + lwClosed = true; } @@ -302,7 +302,7 @@ void HelpDialog::loadIndexFile() return; setCursor( waitCursor ); - indexDone = TRUE; + indexDone = true; labelPrepare->setText( tr( "Prepare..." ) ); framePrepare->show(); processEvents(); @@ -330,7 +330,7 @@ void HelpDialog::loadIndexFile() } } - editIndex->setEnabled(FALSE); + editIndex->setEnabled(false); TQDataStream ds( &indexFile ); TQ_UINT32 fileAges; @@ -341,7 +341,7 @@ void HelpDialog::loadIndexFile() if ( !indexFile.open( IO_ReadOnly ) ) { TQMessageBox::warning( help, tr( "TQt Assistant" ), tr( "Cannot open the index file %1" ).arg( TQFileInfo( indexFile ).absFilePath() ) ); - editIndex->setEnabled(TRUE); + editIndex->setEnabled(true); return; } ds.setDevice( &indexFile ); @@ -373,7 +373,7 @@ void HelpDialog::loadIndexFile() framePrepare->hide(); showInitDoneMessage(); setCursor( arrowCursor ); - editIndex->setEnabled(TRUE); + editIndex->setEnabled(true); } TQ_UINT32 HelpDialog::getFileAges() @@ -467,13 +467,13 @@ void HelpDialog::setupTitleMap() return; if ( Config::configuration()->docRebuild() ) { removeOldCacheFiles(); - Config::configuration()->setDocRebuild( FALSE ); + Config::configuration()->setDocRebuild( false ); Config::configuration()->saveProfile( Config::configuration()->profile() ); } if ( contentList.isEmpty() ) getAllContents(); - titleMapDone = TRUE; + titleMapDone = true; titleMap.clear(); TQDictIterator<ContentList> lstIt( contentList ); for ( ; lstIt.current(); ++lstIt ) { @@ -583,7 +583,7 @@ void HelpDialog::showInitDoneMessage() { if ( initDoneMsgShown ) return; - initDoneMsgShown = TRUE; + initDoneMsgShown = true; help->statusBar()->message( tr( "Done" ), 3000 ); } @@ -628,9 +628,9 @@ void HelpDialog::showIndexTopic() if ( !i ) return; - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( i->text() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); HelpNavigationListItem *item = (HelpNavigationListItem*)i; @@ -681,7 +681,7 @@ TQString HelpDialog::titleOfLink( const TQString &link ) bool HelpDialog::eventFilter( TQObject * o, TQEvent * e ) { if ( !o || !e ) - return TRUE; + return true; if ( o == editIndex && e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; @@ -689,25 +689,25 @@ bool HelpDialog::eventFilter( TQObject * o, TQEvent * e ) int i = listIndex->currentItem(); if ( --i >= 0 ) { listIndex->setCurrentItem( i ); - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( listIndex->currentText() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); } - return TRUE; + return true; } else if ( ke->key() == Key_Down ) { int i = listIndex->currentItem(); if ( ++i < int(listIndex->count()) ) { listIndex->setCurrentItem( i ); - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( listIndex->currentText() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); } - return TRUE; + return true; } else if ( ke->key() == Key_Next || ke->key() == Key_Prior ) { TQApplication::sendEvent( listIndex, e); - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( listIndex->currentText() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); } } @@ -738,7 +738,7 @@ void HelpDialog::removeBookmark() delete listBookmarks->currentItem(); saveBookmarks(); if ( listBookmarks->firstChild() ) { - listBookmarks->setSelected( listBookmarks->firstChild(), TRUE ); + listBookmarks->setSelected( listBookmarks->firstChild(), true ); } help->updateBookmarkMenu(); } @@ -747,7 +747,7 @@ void HelpDialog::insertBookmarks() { if ( bookmarksInserted ) return; - bookmarksInserted = TRUE; + bookmarksInserted = true; listBookmarks->clear(); TQFile f( cacheFilesPath + "bookmarks." + Config::configuration()->profileName() ); if ( !f.open( IO_ReadOnly ) ) @@ -801,7 +801,7 @@ void HelpDialog::insertContents() if ( contentList.isEmpty() ) getAllContents(); - contentsInserted = TRUE; + contentsInserted = true; listContents->clear(); setCursor( waitCursor ); if ( !titleMapDone ) @@ -817,7 +817,7 @@ void HelpDialog::insertContents() TQPtrStack<HelpNavigationContentsItem> stack; stack.clear(); int depth = 0; - bool root = FALSE; + bool root = false; HelpNavigationContentsItem *lastItem[64]; for( int j = 0; j < 64; ++j ) @@ -835,7 +835,7 @@ void HelpDialog::insertContents() newEntry->setLink( item.reference ); stack.push( newEntry ); depth = 1; - root = TRUE; + root = true; } else{ if( (item.depth > depth) && root ) { @@ -928,9 +928,9 @@ void HelpDialog::setupFullTextIndex() "Assistant will not work!")); return; } - searchButton->setEnabled(FALSE); - helpButton->setEnabled(FALSE); - termsEdit->setEnabled(FALSE); + searchButton->setEnabled(false); + helpButton->setEnabled(false); + termsEdit->setEnabled(false); fullTextIndex->setDictionaryFile( cacheFilesPath + "indexdb.dict." + pname ); fullTextIndex->setDocListFile( cacheFilesPath + "indexdb.doc." + pname ); @@ -982,9 +982,9 @@ void HelpDialog::setupFullTextIndex() help->statusBar()->message( tr( "Done" ), 3000 ); setCursor( arrowCursor ); } - searchButton->setEnabled(TRUE); - termsEdit->setEnabled(TRUE); - helpButton->setEnabled(TRUE); + searchButton->setEnabled(true); + termsEdit->setEnabled(true); + helpButton->setEnabled(true); } void HelpDialog::setIndexingProgress( int prog ) @@ -1047,7 +1047,7 @@ void HelpDialog::startSearch() resultBox->insertItem( fullTextIndex->getDocumentTitle( *it ) ); terms.clear(); - bool isPhrase = FALSE; + bool isPhrase = false; TQString s = ""; for ( int i = 0; i < (int)buf.length(); ++i ) { if ( buf[i] == '\"' ) { @@ -1103,9 +1103,9 @@ void HelpDialog::showItemMenu( TQListBoxItem *item, const TQPoint &pos ) } else if ( id > 0 ) { HelpWindow *hw = help->browsers()->currentBrowser(); if ( stripAmpersand( tabWidget->tabLabel( tabWidget->currentPage() ) ).contains( tr( "Index" ) ) ) { - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( item->text() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); HelpNavigationListItem *hi = (HelpNavigationListItem*)item; |