summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/installdlgimpl.cpp
authorandyq <andyq>2002-11-22 16:11:49 (UTC)
committer andyq <andyq>2002-11-22 16:11:49 (UTC)
commit34ca473739286557b3d0c73525740f0b8b01fd4b (patch) (side-by-side diff)
tree727fa7f17d0bafa7b2e4ae30eed2c80f80b770d9 /noncore/settings/aqpkg/installdlgimpl.cpp
parent8366956992e07a9fc77b9e126bb429b32fd4ad9a (diff)
downloadopie-34ca473739286557b3d0c73525740f0b8b01fd4b.zip
opie-34ca473739286557b3d0c73525740f0b8b01fd4b.tar.gz
opie-34ca473739286557b3d0c73525740f0b8b01fd4b.tar.bz2
Added verbose_wget flags (doesn't yet work properly though coz ipkg is sending crap)
Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp55
1 files changed, 26 insertions, 29 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
@@ -17,6 +17,7 @@
#ifdef QWS
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
#endif
#include <qmultilineedit.h>
@@ -91,15 +92,15 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d
}
else if ( item.option == "U" || item.option == "R" )
{
- updateList.push_back( item );
+ updateList.push_back( item );
QString type = " (Upgrade)";
if ( item.option == "R" )
type = " (ReInstall)";
- upgrade += " " + item.packageName + type + "\n";
- }
- }
+ upgrade += " " + item.packageName + type + "\n";
+ }
+ }
- output->setText( remove + install + upgrade );
+ output->setText( remove + install + upgrade );
}
InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget *parent, const char *name, bool modal, WFlags fl )
@@ -116,27 +117,19 @@ InstallDlgImpl::~InstallDlgImpl()
bool InstallDlgImpl :: showDlg()
{
- showMaximized();
- bool ret = exec();
+ showMaximized();
+ bool ret = exec();
- return ret;
+ 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;
+ InstallOptionsDlgImpl opt( flags, this, "Option", true );
+ opt.exec();
+
+ // set options selected from dialog
+ flags = opt.getFlags();
#ifdef QWS
Config cfg( "aqpkg" );
@@ -147,13 +140,16 @@ void InstallDlgImpl :: optionsSelected()
void InstallDlgImpl :: installSelected()
{
- if ( btnInstall->text() == "Close" )
- {
- done( 1 );
- return;
- }
+
+ if ( btnInstall->text() == "Close" )
+ {
+ done( 1 );
+ return;
+ }
- btnInstall->setEnabled( false );
+ // Disable buttons
+ btnOptions->setEnabled( false );
+ btnInstall->setEnabled( false );
if ( pIpkg )
{
@@ -183,7 +179,7 @@ void InstallDlgImpl :: installSelected()
connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
// First run through the remove list, then the install list then the upgrade list
- vector<InstallData>::iterator it;
+ vector<InstallData>::iterator it;
pIpkg->setOption( "remove" );
for ( it = removeList.begin() ; it != removeList.end() ; ++it )
{
@@ -230,7 +226,8 @@ void InstallDlgImpl :: installSelected()
delete pIpkg;
}
- btnInstall->setEnabled( true );
+ btnOptions->setEnabled( true );
+ btnInstall->setEnabled( true );
btnInstall->setText( tr( "Close" ) );
}