summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/installdlgimpl.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index db9a259..485fe3d 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -8,24 +8,25 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef QWS
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
#endif
#include <qmultilineedit.h>
#include <qdialog.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include "datamgr.h"
#include "instoptionsimpl.h"
#include "destination.h"
@@ -119,49 +120,44 @@ bool InstallDlgImpl :: showDlg()
showMaximized();
bool ret = exec();
return ret;
}
void InstallDlgImpl :: optionsSelected()
{
InstallOptionsDlgImpl opt( flags, this, "Option", true );
opt.exec();
// set options selected from dialog
- flags = 0;
- if ( opt.forceDepends->isChecked() )
- flags |= FORCE_DEPENDS;
- if ( opt.forceReinstall->isChecked() )
- flags |= FORCE_REINSTALL;
- if ( opt.forceRemove->isChecked() )
- flags |= FORCE_REMOVE;
- if ( opt.forceOverwrite->isChecked() )
- flags |= FORCE_OVERWRITE;
+ flags = opt.getFlags();
#ifdef QWS
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
cfg.writeEntry( "installFlags", flags );
#endif
}
void InstallDlgImpl :: installSelected()
{
+
if ( btnInstall->text() == "Close" )
{
done( 1 );
return;
}
+ // Disable buttons
+ btnOptions->setEnabled( false );
btnInstall->setEnabled( false );
if ( pIpkg )
{
output->setText( "" );
connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
pIpkg->runIpkg();
}
else
{
output->setText( "" );
@@ -221,22 +217,23 @@ void InstallDlgImpl :: installSelected()
pIpkg->setPackage( it->packageName );
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->setText( tr( "Close" ) );
}
void InstallDlgImpl :: displayText(const QString &text )
{
QString t = output->text() + "\n" + text;
output->setText( t );
output->setCursorPosition( output->numLines(), 0 );
}