summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-03 23:10:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-03 23:10:21 +0000
commit267f75a9de785e93d0d77123dfa6f745eed05def (patch)
tree7b3932c3ccde28f1db2248363a701d6f785063e3
parent01a3b7ad4464682c1d4319151ab7791f6f0a9dd8 (diff)
downloadkdpkg-267f75a9de785e93d0d77123dfa6f745eed05def.tar.gz
kdpkg-267f75a9de785e93d0d77123dfa6f745eed05def.zip
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
-rw-r--r--kdpkg-install/install.cpp41
-rw-r--r--kdpkg-install/install.h1
-rw-r--r--kdpkg-install/main.cpp2
-rwxr-xr-xkdpkg-install/sh/kdpkg-sh2
-rw-r--r--kdpkg/main.cpp2
5 files changed, 45 insertions, 3 deletions
diff --git a/kdpkg-install/install.cpp b/kdpkg-install/install.cpp
index 9904018..7b26e58 100644
--- a/kdpkg-install/install.cpp
+++ b/kdpkg-install/install.cpp
@@ -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 -------------------------------------------------------//
@@ -212,6 +242,17 @@ void install::showDependencies()
// 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);
tmpString += ", "+fields.grep( "Pre-Depends:" )[0].mid(13);
diff --git a/kdpkg-install/install.h b/kdpkg-install/install.h
index dafb90d..3b896b1 100644
--- a/kdpkg-install/install.h
+++ b/kdpkg-install/install.h
@@ -41,6 +41,7 @@ class install : public InstallDialog
bool isInstalled(QString);
bool checkArchitecture();
bool isLocked();
+ QStringList getVersions(QString);
diff --git a/kdpkg-install/main.cpp b/kdpkg-install/main.cpp
index e0eec81..8b69e81 100644
--- a/kdpkg-install/main.cpp
+++ b/kdpkg-install/main.cpp
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
about->setLicense(KAboutData::License_GPL_V2);
about->setHomepage("http://trinity.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("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "xadras@sidux.com", "http://linux.wuertz.org/");
diff --git a/kdpkg-install/sh/kdpkg-sh b/kdpkg-install/sh/kdpkg-sh
index 59b3ad1..0e2df8a 100755
--- a/kdpkg-install/sh/kdpkg-sh
+++ b/kdpkg-install/sh/kdpkg-sh
@@ -40,7 +40,7 @@ if [ "$1" == "install" ]; then
else
echo ""
echo "Errors were encountered while installing your package"
- echo "Please press enter to continue"
+ echo "Please press enter to exit"
read
fi
fi
diff --git a/kdpkg/main.cpp b/kdpkg/main.cpp
index 5ac5b2e..dc399ed 100644
--- a/kdpkg/main.cpp
+++ b/kdpkg/main.cpp
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
about->setLicense(KAboutData::License_GPL_V2);
about->setHomepage("http://trinity.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("Fabian Würtz (xadras)", I18N_NOOP("Developer"), "xadras@sidux.com", "http://xadras.wordpress.com/");