author | tille <tille> | 2002-04-27 13:06:45 (UTC) |
---|---|---|
committer | tille <tille> | 2002-04-27 13:06:45 (UTC) |
commit | db90999f6298c1107888f062f2c25cb8817b528a (patch) (side-by-side diff) | |
tree | 020ebe65beb9286f3c63e4329fc3a0f298d34460 /noncore/unsupported/oipkg/package.cpp | |
parent | e2f3288d468508f2cf7c0a327044963ca4b1b54a (diff) | |
download | opie-db90999f6298c1107888f062f2c25cb8817b528a.zip opie-db90999f6298c1107888f062f2c25cb8817b528a.tar.gz opie-db90999f6298c1107888f062f2c25cb8817b528a.tar.bz2 |
added popup menu to choose inst dest (and more...)
Diffstat (limited to 'noncore/unsupported/oipkg/package.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 54 |
1 files changed, 44 insertions, 10 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 1705f78..9f602b5 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -11,4 +11,10 @@ Package::~Package() -Package::Package() +Package::Package( PackageManagerSettings *s ) { + init(s); +} + +void Package::init( PackageManagerSettings *s ) +{ + settings = s; _size = ""; @@ -21,7 +27,8 @@ Package::Package() _status = ""; + _dest = ""; } -Package::Package( QStringList pack ) +Package::Package( QStringList pack, PackageManagerSettings *s ) { - Package(); + init(s); parsePackage( pack ); @@ -30,5 +37,5 @@ Package::Package( QStringList pack ) -Package::Package( QString n ) +Package::Package( QString n, PackageManagerSettings *s ) { - Package(); + init(s); _name = QString( n ); @@ -39,3 +46,3 @@ Package::Package( Package *pi ) { - Package(); + init(pi->settings); copyValues( pi ); @@ -174,3 +181,3 @@ void Package::copyValues( Package* pack ) -QString Package::getSection() +QString Package::section() { @@ -192,3 +199,3 @@ void Package::setSection( QString s) -QString Package::getSubSection() +QString Package::subSection() { @@ -255,3 +262,2 @@ QString Package::details() -/** No descriptions */ void Package::processed() @@ -259,3 +265,3 @@ void Package::processed() _toProcess = false; - //hack, but we're mot writing status anyway... + //hack, but we're not writing status anyway... if ( installed() ) _status = "install"; @@ -263 +269,29 @@ void Package::processed() } + +QString Package::dest() +{ + if ( installed()||(!installed() && _toProcess) ) + return _dest!=""?_dest:settings->getDestinationName(); + else return ""; +} + +void Package::setDest( QString d ) +{ + _dest = d; +} + +void Package::setOn() +{ + _toProcess = true; +} + +bool Package::link() +{ + if ( _dest == "root" || (!installed() && !_toProcess) ) return false; + return _link; +} + +void Package::setLink(bool b) +{ + _link = b; +} |