summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index bfb4f62..80c06ba 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -136,34 +136,47 @@ void InstallDlgImpl :: optionsSelected()
// set options selected from dialog
flags = opt.getFlags();
#ifdef QWS
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
cfg.writeEntry( "installFlags", flags );
#endif
}
void InstallDlgImpl :: installSelected()
{
-
- if ( btnInstall->text() == "Close" )
+ if ( btnInstall->text() == "Abort" )
+ {
+ if ( pIpkg )
+ {
+ displayText( "\n**** User Clicked ABORT ***" );
+ pIpkg->abort();
+ displayText( "**** Process Aborted ****" );
+ }
+
+ btnInstall->setText( tr( "Close" ) );
+ return;
+ }
+ else if ( btnInstall->text() == "Close" )
{
done( 1 );
return;
}
// Disable buttons
btnOptions->setEnabled( false );
- btnInstall->setEnabled( false );
+// btnInstall->setEnabled( false );
+
+ btnInstall->setText( "Abort" );
if ( pIpkg )
{
output->setText( "" );
connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
pIpkg->runIpkg();
}
else
{
output->setText( "" );
vector<Destination>::iterator d = dataMgr->getDestination( destination->currentText() );
@@ -223,28 +236,29 @@ void InstallDlgImpl :: installSelected()
int tmpFlags = flags;
if ( it->destination->linkToRoot() && it->recreateLinks )
tmpFlags |= MAKE_LINKS;
pIpkg->setFlags( tmpFlags );
pIpkg->runIpkg();
}
delete pIpkg;
}
btnOptions->setEnabled( true );
- btnInstall->setEnabled( true );
+// btnInstall->setEnabled( true );
btnInstall->setText( tr( "Close" ) );
}
+
void InstallDlgImpl :: displayText(const QString &text )
{
QString t = output->text() + "\n" + text;
output->setText( t );
output->setCursorPosition( output->numLines(), 0 );
}
void InstallDlgImpl :: displayAvailableSpace( const QString &text )
{
vector<Destination>::iterator d = dataMgr->getDestination( text );
QString destDir = d->getDestinationPath();