Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 9f6429a..fe200f5 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -212,30 +212,27 @@ void PmIpkg::processLinkDir( QString file, QString dest ) -void PmIpkg::commit( PackageList pl ) +void PmIpkg::loadList( PackageList pl ) { - int sizecount = 0; - to_install.clear(); - to_remove.clear(); - QString rem="<b>"+tr("To remove:")+"</b><br>\n"; - QString inst="<b>"+tr("To install:")+"</b><br>\n"; for( Package *pack = pl.first();pack ; (pack = pl.next()) ) - { - if ( pack && (pack->name() != "") && pack) - { - if ( pack->toInstall() ) - { + { + if ( pack && (pack->name() != "") && pack) + { + if ( pack->toInstall() ) to_install.append( pack ); - sizecount += pack->size().toInt(); - inst += pack->name()+"\t("+tr("on ")+pack->dest()+")<br>"; - } - if ( pack->toRemove() ) - { + if ( pack->toRemove() ) to_remove.append( pack ); - sizecount += 1; - rem += pack->name()+"<br>"; - } - } - } + } + } +} +void PmIpkg::commit( PackageList pl ) +{ + sizecount = 0; + QString rem="<b>"+tr("To remove:")+"</b><br>\n"; + QString inst="<b>"+tr("To install:")+"</b><br>\n"; + loadList(pl); + for (uint i=0; i < to_remove.count(); i++) + sizecount += 1; + for (uint i=0; i < to_install.count(); i++) + sizecount += to_install.at(i)->size().toInt(); startDialog(); - } @@ -268,3 +265,3 @@ void PmIpkg::startDialog() QGroupBox *GroupBox1 = new QGroupBox( installDialog, "Ipkg" ); - GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().hasHeightForWidth() ) ); + GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().mayShrinkVertically() ) ); GroupBox1->setTitle( tr( "Ipkg options" ) ); @@ -277,3 +274,2 @@ void PmIpkg::startDialog() GroupBox1Layout->setMargin( 3 ); - _force_depends = new QCheckBox( GroupBox1, "_force_depends" ); @@ -281,2 +277,3 @@ void PmIpkg::startDialog() _force_depends->setAutoResize( TRUE ); + _force_depends->setChecked(true); GroupBox1Layout->addWidget( _force_depends, 0, 0 ); @@ -321,4 +318,4 @@ void PmIpkg::remove() QStringList *fileList; - for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) - { + for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) + { if ( it->link() )fileList = getList( it->name(), it->dest() ); @@ -335,2 +332,3 @@ void PmIpkg::remove() it->processed(); + out("<br><hr>"); @@ -353,3 +351,3 @@ void PmIpkg::install() - if ( runIpkg("install " + it->getPackageName(), it->dest() ) == 0 ) + if ( runIpkg("install " + it->installName(), it->dest() ) == 0 ) { |