summaryrefslogtreecommitdiffstats
path: root/kdat/KDatMainWindow.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2026-01-06 11:32:15 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2026-01-06 16:43:33 +0900
commit1dd8222792710b74ab283d3832284455d5affa7d (patch)
tree19587979c9edd23419cb52da1b4a8a005d6b1e9d /kdat/KDatMainWindow.cpp
parent3e22959a47d82ce8baefea9458102340be013350 (diff)
downloadtdeadmin-1dd8222792710b74ab283d3832284455d5affa7d.tar.gz
tdeadmin-1dd8222792710b74ab283d3832284455d5affa7d.zip
Replace TRUE/FALSE with boolean values true/falseHEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kdat/KDatMainWindow.cpp')
-rw-r--r--kdat/KDatMainWindow.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kdat/KDatMainWindow.cpp b/kdat/KDatMainWindow.cpp
index 48be0dc..280a504 100644
--- a/kdat/KDatMainWindow.cpp
+++ b/kdat/KDatMainWindow.cpp
@@ -85,7 +85,7 @@ KDatMainWindow* KDatMainWindow::getInstance()
#define KDAT_HORIZONTAL_LAYOUT
KDatMainWindow::KDatMainWindow()
- : TDEMainWindow(0), _destroyed( FALSE )
+ : TDEMainWindow(0), _destroyed( false )
{
#ifdef KDAT_HORIZONTAL_LAYOUT /* 2002-01-20 LEW */
resize( 600, 600 ); /* was 600 by 400 */
@@ -157,15 +157,15 @@ KDatMainWindow::KDatMainWindow()
_toolbar = new TDEToolBar( this );
- _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileMountTape() ), true, i18n( "Mount/unmount tape" ) );
_toolbar->insertSeparator();
- _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileBackup() ) , true, i18n( "Backup" ) );
_toolbar->setButtonIconSet( 1, BarIconSet("kdat_backup"));
- _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileRestore() ), TRUE, i18n( "Restore" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileRestore() ), true, i18n( "Restore" ) );
_toolbar->setButtonIconSet( 2, BarIconSet("kdat_restore"));
- _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileVerify() ) , true, i18n( "Verify" ) );
_toolbar->setButtonIconSet( 3, BarIconSet("kdat_verify"));
addToolBar( _toolbar );
@@ -188,7 +188,7 @@ KDatMainWindow::KDatMainWindow()
// Now set up the tree
_tree = new KTreeView( _panner );
- _tree->setExpandButtonDrawing( TRUE );
+ _tree->setExpandButtonDrawing( true );
#ifdef KDAT_HORIZONTAL_LAYOUT /* 2002-01-20 LEW */
_tree->setMinimumWidth( 300 );
@@ -213,7 +213,7 @@ KDatMainWindow::KDatMainWindow()
connect( TapeDrive::instance(), TQ_SIGNAL( sigStatus( const TQString & ) ), this, TQ_SLOT( status( const TQString & ) ) );
- setTapePresent( FALSE );
+ setTapePresent( false );
connect( Options::instance(), TQ_SIGNAL( sigTapeDevice() ), this, TQ_SLOT( slotTapeDevice() ) );
@@ -225,7 +225,7 @@ KDatMainWindow::KDatMainWindow()
KDatMainWindow::~KDatMainWindow()
{
- _destroyed = TRUE;
+ _destroyed = true;
if ( Options::instance()->getLockOnMount() ) {
TapeDrive::instance()->unlock();
@@ -246,10 +246,10 @@ void KDatMainWindow::popupTapeDriveMenu( const TQPoint& p )
// Configure menu before popping up.
if ( TapeManager::instance()->getMountedTape() ) {
_tapeDriveMenu->changeItem( i18n( "Unmount Tape" ), _tapeDriveMenu->idAt( 0 ) );
- _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), TRUE );
+ _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), true );
} else {
_tapeDriveMenu->changeItem( i18n( "Mount Tape" ), _tapeDriveMenu->idAt( 0 ) );
- _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), FALSE );
+ _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), false );
}
_tapeDriveMenu->popup( p );
@@ -454,10 +454,10 @@ void KDatMainWindow::fileBackup()
backupProfile.setArchiveName( name );
backupProfile.setAbsoluteFiles( files );
- backupProfile.setOneFilesystem( TRUE );
- backupProfile.setIncremental( FALSE );
+ backupProfile.setOneFilesystem( true );
+ backupProfile.setIncremental( false );
backupProfile.setSnapshotFile( "snapshot" );
- backupProfile.setRemoveSnapshot( FALSE );
+ backupProfile.setRemoveSnapshot( false );
}
int ret = 0;
@@ -540,12 +540,12 @@ void KDatMainWindow::fileBackup()
void KDatMainWindow::fileRestore()
{
- doVerify( TRUE );
+ doVerify( true );
}
void KDatMainWindow::fileVerify()
{
- doVerify( FALSE );
+ doVerify( false );
}
void KDatMainWindow::doVerify( bool restore )
@@ -603,7 +603,7 @@ void KDatMainWindow::doVerify( bool restore )
// Make sure the mounted archive node has populated its children.
archiveNode = (MountedArchiveNode*)rangeableNode;
if ( archiveNode->childCount() == 0 ) {
- bool dummy = TRUE;
+ bool dummy = true;
archiveNode->expanding( dummy );
}
@@ -613,7 +613,7 @@ void KDatMainWindow::doVerify( bool restore )
} else if ( ((Node*)rangeableNode->childAt( i ))->isType( Node::MountedTapeFileNodeType ) ) {
files.append( ((MountedTapeFileNode*)rangeableNode->childAt( i ))->getFullPath() );
} else {
- assert( FALSE );
+ assert( false );
}
}
} else if ( rangeableNode->isType( Node::MountedTapeDirectoryNodeType ) ) {
@@ -621,7 +621,7 @@ void KDatMainWindow::doVerify( bool restore )
} else if ( rangeableNode->isType( Node::MountedTapeFileNodeType ) ) {
files.append( ((MountedTapeFileNode*)rangeableNode)->getFullPath() );
} else {
- assert( FALSE );
+ assert( false );
}
} else {
// Compile a list of files to verify/restore.
@@ -629,7 +629,7 @@ void KDatMainWindow::doVerify( bool restore )
// Make sure the mounted archive node has populated its children.
if ( archiveNode->childCount() == 0 ) {
- bool dummy = TRUE;
+ bool dummy = true;
archiveNode->expanding( dummy );
}
@@ -650,7 +650,7 @@ void KDatMainWindow::doVerify( bool restore )
} else if ( sel->isType( Node::MountedTapeFileNodeType ) ) {
files.append( ((MountedTapeFileNode*)sel)->getFullPath() );
} else {
- assert( FALSE );
+ assert( false );
}
} else if ( sel->hasSelectedChildren() ) {
for ( int i = sel->childCount() - 1; i >= 0; i-- ) {
@@ -708,12 +708,12 @@ void KDatMainWindow::fileMountTape()
}
if ( TapeDrive::instance()->isTapePresent() ) {
- setTapePresent( TRUE );
+ setTapePresent( true );
} else {
KMessageBox::sorry( this, msg);
}
} else {
- setTapePresent( FALSE );
+ setTapePresent( false );
}
}
@@ -886,8 +886,8 @@ void KDatMainWindow::fileFormatTape()
TapeManager::instance()->addTape( tape );
status( i18n( "Format complete." ) );
- setTapePresent( FALSE, FALSE );
- setTapePresent( TRUE, FALSE );
+ setTapePresent( false, false );
+ setTapePresent( true, false );
}
}
@@ -922,10 +922,10 @@ void KDatMainWindow::fileNewBackupProfile()
backupProfile->setWorkingDirectory( "/" );
}
backupProfile->setAbsoluteFiles( files );
- backupProfile->setOneFilesystem( TRUE );
- backupProfile->setIncremental( FALSE );
+ backupProfile->setOneFilesystem( true );
+ backupProfile->setIncremental( false );
backupProfile->setSnapshotFile( "snapshot" );
- backupProfile->setRemoveSnapshot( FALSE );
+ backupProfile->setRemoveSnapshot( false );
backupProfile->save();
BackupProfileManager::instance()->addBackupProfile( backupProfile );
@@ -1051,7 +1051,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons
TQTextStream t( &snap );
t >> tmp;
} else {
- useSnapshot = FALSE;
+ useSnapshot = false;
}
}
TQDateTime mtime;
@@ -1061,7 +1061,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons
/* 2002-01-24 LEW: start of backup-cancel dialog */
create_backup_dialog();
- stop_flag = FALSE; // initialize the flag that tells us whether use
+ stop_flag = false; // initialize the flag that tells us whether use
// cancelled the backup via the dialog.
/* 2002-01-24 LEW: end of backup-cancel dialog */
@@ -1100,7 +1100,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons
TQDir dir;
const TQFileInfoList* infoList;
while ( !dirStack.isEmpty() ) {
- if( stop_flag == TRUE ) break;
+ if( stop_flag == true ) break;
TQString* path = dirStack.pop();
msg = i18n("Estimating backup size: %1, %2" )
.arg(Util::kbytesToString( size / 2 ))
@@ -1142,7 +1142,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons
// Convert size in tar blocks to size in kbytes.
return_value = size / 2;
- if( stop_flag == TRUE ) return_value = -1;
+ if( stop_flag == true ) return_value = -1;
return return_value;
}
@@ -1174,7 +1174,7 @@ void KDatMainWindow::getBackupFiles( TQStringList& files )
void KDatMainWindow::setBackupFiles( const TQStringList& files )
{
- _rootNode->setSelected( FALSE );
+ _rootNode->setSelected( false );
TQString tmp;
TQStringList filesTmp = files;
@@ -1183,11 +1183,11 @@ void KDatMainWindow::setBackupFiles( const TQStringList& files )
ArchiveableNode* n = _rootNode;
while ( n ) {
if ( n->getFullPath() == *it ) {
- n->setSelected( TRUE );
+ n->setSelected( true );
n = 0;
} else {
if ( n->childCount() == 0 ) {
- bool dummy = TRUE;
+ bool dummy = true;
n->expanding( dummy );
}
int i;
@@ -1208,7 +1208,7 @@ void KDatMainWindow::setBackupFiles( const TQStringList& files )
void KDatMainWindow::slotTapeDevice()
{
- setTapePresent( FALSE );
+ setTapePresent( false );
}
void KDatMainWindow::slotTapeMounted()
@@ -1253,7 +1253,7 @@ void KDatMainWindow::configureUI( Tape* tape )
for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) {
if ( ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ) ||
( ((SelectableNode*)_tapeDriveNode->childAt( i ))->hasSelectedChildren() )) {
- canRestore = TRUE;
+ canRestore = true;
break;
}
}
@@ -1267,7 +1267,7 @@ void KDatMainWindow::configureUI( Tape* tape )
( parent ) && ( parent->getParent() );
parent = (Node*)parent->getParent() ) {
if ( parent->isType( Node::TapeNodeType ) ) {
- canRestore = FALSE;
+ canRestore = false;
}
}
}
@@ -1349,7 +1349,7 @@ void KDatMainWindow::create_backup_dialog()
_cancel = new KPushButton( KStdGuiItem::cancel(), _backupdialog );
_cancel->setFixedSize( 80, _cancel->sizeHint().height() );
- _cancel->setEnabled( TRUE );
+ _cancel->setEnabled( true );
/* 2002-01-24 LEW: looks like we can't increase the button width
to accomodate a wider message :( */
// _cancel->setGeometry( TQRect( 50, 170, 0, 0 ) ); /* 2002-01-28 LEW */
@@ -1358,8 +1358,8 @@ void KDatMainWindow::create_backup_dialog()
_continue = new KPushButton( KStdGuiItem::cont(), _backupdialog );
_continue->setFixedSize( 80, _continue->sizeHint().height() );
- _continue->setEnabled( TRUE );
- _continue->setDefault( TRUE );
+ _continue->setEnabled( true );
+ _continue->setDefault( true );
// _continue->setGeometry( TQRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */
_continue->setGeometry( TQRect( 200, 230, 0, 0 ) );
connect( _continue, TQ_SIGNAL( clicked() ), this, TQ_SLOT( backupContinue() ) );
@@ -1370,7 +1370,7 @@ void KDatMainWindow::create_backup_dialog()
// stop calculating the backup size and hide the dialog screen
void KDatMainWindow::backupCancel()
{
- stop_flag = TRUE;
+ stop_flag = true;
_backupdialog->hide();
}