Final set of fixes; application now has proper functionality and is reasonably intuitive as well

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdpkg@1110669 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 01a3b7ad44
commit 267f75a9de

@ -200,6 +200,36 @@ void install::page4()
} }
//----------------------------------------------------------------------------//
//--- get --------------------------------------------------------------------//
//----------------------------------------------------------------------------//
QStringList install::getVersions(QString package)
{
this->shell->setCommand("apt-cache policy "+package);
this->shell->start(true);
QStringList input = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() );
QString sysVersion = input[1];
sysVersion = QStringList::split( ":", sysVersion)[1].replace(" ","");
if( sysVersion.contains("(") || sysVersion == "" )
sysVersion = i18n("not installed");
QString repVersion = input[2];
repVersion = QStringList::split( ":", repVersion)[1].replace(" ","");
if( repVersion.contains("(") || repVersion == "" )
repVersion = i18n("not available");
QStringList versions;
versions.append(sysVersion);
versions.append(repVersion);
return versions;
}
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
//--- showDependencies -------------------------------------------------------// //--- showDependencies -------------------------------------------------------//
@ -212,6 +242,17 @@ void install::showDependencies()
// show packages which will be installed // show packages which will be installed
QString debianPkgName = fields.grep("Package:")[0].mid(9);
QString debianPkgVersion = fields.grep("Version:")[0].mid(9);
QStringList debianVersions = getVersions(fields.grep("Package:")[0].mid(9));
QString debianSysVersion = debianVersions[0];
QListViewItem * ditem = new QListViewItem( dependenciesListView, 0 );
ditem->setPixmap( 0, QPixmap( m_kdePrefix + "/share/kdpkg/icons/install.png") );
ditem->setText( 1, debianPkgName );
ditem->setText( 2, debianPkgVersion );
ditem->setText( 3, debianSysVersion );
QString tmpString = fields.grep( QRegExp("^Depends:") )[0].mid(9); QString tmpString = fields.grep( QRegExp("^Depends:") )[0].mid(9);
tmpString += ", "+fields.grep( "Pre-Depends:" )[0].mid(13); tmpString += ", "+fields.grep( "Pre-Depends:" )[0].mid(13);

@ -41,6 +41,7 @@ class install : public InstallDialog
bool isInstalled(QString); bool isInstalled(QString);
bool checkArchitecture(); bool checkArchitecture();
bool isLocked(); bool isLocked();
QStringList getVersions(QString);

@ -45,7 +45,7 @@ int main(int argc, char **argv)
about->setLicense(KAboutData::License_GPL_V2); about->setLicense(KAboutData::License_GPL_V2);
about->setHomepage("http://trinity.pearsoncomputing.net"); about->setHomepage("http://trinity.pearsoncomputing.net");
about->setBugAddress("http://bugs.pearsoncomputing.net"); about->setBugAddress("http://bugs.pearsoncomputing.net");
about->setCopyrightStatement("(c) 2010 Timothy Pearson\r(c) 2007 Fabian Würtz"); about->setCopyrightStatement("(c) 2010 Timothy Pearson\n(c) 2007 Fabian Würtz");
about->addAuthor("Timothy Pearson (Trinity Project)", I18N_NOOP("Developer"), "kb9vqf@pearsoncomputing.net", "http://trinity.pearsoncomputing.net"); about->addAuthor("Timothy Pearson (Trinity Project)", I18N_NOOP("Developer"), "kb9vqf@pearsoncomputing.net", "http://trinity.pearsoncomputing.net");
about->addAuthor("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "xadras@sidux.com", "http://linux.wuertz.org/"); about->addAuthor("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "xadras@sidux.com", "http://linux.wuertz.org/");

@ -40,7 +40,7 @@ if [ "$1" == "install" ]; then
else else
echo "" echo ""
echo "Errors were encountered while installing your package" echo "Errors were encountered while installing your package"
echo "Please press enter to continue" echo "Please press enter to exit"
read read
fi fi
fi fi

@ -45,7 +45,7 @@ int main(int argc, char **argv)
about->setLicense(KAboutData::License_GPL_V2); about->setLicense(KAboutData::License_GPL_V2);
about->setHomepage("http://trinity.pearsoncomputing.net"); about->setHomepage("http://trinity.pearsoncomputing.net");
about->setBugAddress("http://bugs.pearsoncomputing.net"); about->setBugAddress("http://bugs.pearsoncomputing.net");
about->setCopyrightStatement("(c) 2010 Timothy Pearson\r(c) 2007 Fabian Würtz"); about->setCopyrightStatement("(c) 2010 Timothy Pearson\n(c) 2007 Fabian Würtz");
about->addAuthor("Timothy Pearson (Trinity Project)", I18N_NOOP("Developer"), "kb9vqf@pearsoncomputing.net", "http://trinity.pearsoncomputing.net"); about->addAuthor("Timothy Pearson (Trinity Project)", I18N_NOOP("Developer"), "kb9vqf@pearsoncomputing.net", "http://trinity.pearsoncomputing.net");
about->addAuthor("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "xadras@sidux.com", "http://xadras.wordpress.com/"); about->addAuthor("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "xadras@sidux.com", "http://xadras.wordpress.com/");

Loading…
Cancel
Save