summaryrefslogtreecommitdiff
path: root/noncore/settings
Side-by-side diff
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp8
-rw-r--r--noncore/settings/aqpkg/package.cpp17
-rw-r--r--noncore/settings/aqpkg/package.h3
-rw-r--r--noncore/settings/aqpkg/server.cpp12
4 files changed, 31 insertions, 9 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 3aee7bd..d84fb4b 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -479,21 +479,27 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
item.option = "I";
item.packageName = name;
return item;
}
else
{
InstallData item;
item.option = "D";
- item.packageName = name;
+ item.packageName = p->getInstalledPackageName();
if ( p->getInstalledTo() )
+ {
item.destination = p->getInstalledTo();
+ cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl;
+ cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl;
+ }
else
+ {
item.destination = p->getLocalPackage()->getInstalledTo();
+ }
// Sticky option not implemented yet, but will eventually allow
// the user to say something like 'remove all'
if ( stickyOption == "" )
{
QString msgtext;
msgtext.sprintf( "Do you wish to remove or reinstall\n%s?", (const char *)name );
switch( QMessageBox::information( this, "Remove or ReInstall",
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index 48b6934..fd75450 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -18,24 +18,31 @@
#include "package.h"
#include "global.h"
Package::Package( QString &name )
{
packageName = name;
localPackage = 0;
installed = false;
- packageStoredLocally = false;
+ packageStoredLocally = false;
installedToRoot = false;
+ installed = false;
+ installedTo = 0;
}
Package::Package( char *name )
{
packageName = name;
localPackage = 0;
+ installed = false;
+ packageStoredLocally = false;
+ installedToRoot = false;
+ installed = false;
+ installedTo = 0;
}
Package::~Package()
{
}
QString Package :: toString()
{
@@ -98,12 +105,20 @@ void Package :: setFilename( QString &f )
QString Package :: getInstalledVersion()
{
if ( localPackage )
return localPackage->getVersion();
else
return getVersion();
}
+QString Package :: getInstalledPackageName()
+{
+ if ( localPackage )
+ return localPackage->getPackageName();
+ else
+ return getPackageName();
+}
+
bool Package :: isInstalled()
{
return installed || ( localPackage && localPackage->isInstalled() );
}
diff --git a/noncore/settings/aqpkg/package.h b/noncore/settings/aqpkg/package.h
index 8ba5a6a..2f2a165 100644
--- a/noncore/settings/aqpkg/package.h
+++ b/noncore/settings/aqpkg/package.h
@@ -50,30 +50,31 @@ public:
QString getStatus() { return status; }
QString getDescription() { return description; }
QString getFilename() { return filename; }
bool isInstalled();
bool isPackageStoredLocally() { return packageStoredLocally; }
bool isInstalledToRoot() { return installedToRoot; }
QString getInstalledVersion();
+ QString getInstalledPackageName();
Destination *getInstalledTo() { return installedTo; }
QString toString();
private:
Package *localPackage;
QString packageName;
QString version;
QString status;
QString description;
QString filename;
- bool packageStoredLocally;
+ bool packageStoredLocally;
bool installedToRoot;
bool installed;
bool differentVersionAvailable;
Destination *installedTo;
};
#endif
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 7d103a2..8bca892 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -101,26 +101,26 @@ void Server :: readLocalIpks( Server *local )
DocLnkSet files;
Global::findDocuments( &files, "application/ipkg" );
// Now add the items to the list
QListIterator<DocLnk> it( files.children() );
for ( ; it.current() ; ++it )
{
- // OK, we have a local IPK file, I think the standard naming conventions
- // for these are packagename_version_arm.ipk
- QString file = (*it)->file();
+ // OK, we have a local IPK file, I think the standard naming conventions
+ // for these are packagename_version_arm.ipk
+ QString file = (*it)->file();
QString packageName = Utils::getPackageNameFromIpkFilename( file );
QString ver = Utils::getPackageVersionFromIpkFilename( file );
packageList.push_back( Package( packageName ) );
- packageList.back().setVersion( ver );
- packageList.back().setFilename( file );
- packageList.back().setPackageStoredLocally( true );
+ packageList.back().setVersion( ver );
+ packageList.back().setFilename( file );
+ packageList.back().setPackageStoredLocally( true );
}
#else
QString names[] = { "advancedfm_0.9.1-20020811_arm.ipk", "libopie_0.9.1-20020811_arm.ipk", "libopieobex_0.9.1-20020811.1_arm.ipk", "opie-addressbook_0.9.1-20020811_arm.ipk" };
for ( int i = 0 ; i < 4 ; ++i )
{
// OK, we have a local IPK file, I think the standard naming conventions
// for these are packagename_version_arm.ipk