author | tille <tille> | 2002-04-29 22:45:35 (UTC) |
---|---|---|
committer | tille <tille> | 2002-04-29 22:45:35 (UTC) |
commit | b794af4c50efffe239c94e5a015e90565ff991c3 (patch) (side-by-side diff) | |
tree | dd4e20851eba8052a07396b57388f9216f85ae7f /noncore/unsupported/oipkg/packagelistview.cpp | |
parent | e4d0908ec054b71a9b97e9c35efbd5a697d0b58d (diff) | |
download | opie-b794af4c50efffe239c94e5a015e90565ff991c3.zip opie-b794af4c50efffe239c94e5a015e90565ff991c3.tar.gz opie-b794af4c50efffe239c94e5a015e90565ff991c3.tar.bz2 |
removes links again
Diffstat (limited to 'noncore/unsupported/oipkg/packagelistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelistview.cpp | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp index 693ea6a..2915ac6 100644 --- a/noncore/unsupported/oipkg/packagelistview.cpp +++ b/noncore/unsupported/oipkg/packagelistview.cpp @@ -54,3 +54,3 @@ void PackageListView::setCurrent( QListViewItem* p ) activePackage = activePackageListItem->getPackage(); - pvDebug(5, "start timer"); + if (!activePackage) return; popupTimer->start( 750, true ); @@ -65,11 +65,22 @@ void PackageListView::showPopup() QAction *popupAction; - popupMenu->insertItem( QObject::tr("Install to"), destsMenu ); - QStringList dests = settings->getDestinationNames(); - for (uint i = 0; i < dests.count(); i++ ) - { - popupAction = new QAction( dests[i], QString::null, 0, this, 0 ); - popupAction->addTo( destsMenu ); - } - connect( destsMenu, SIGNAL( activated( int ) ), - this, SLOT( changePackageDest( int ) ) ); + if ( !activePackage->installed() ) + { + popupMenu->insertItem( QObject::tr("Install to"), destsMenu ); + QStringList dests = settings->getDestinationNames(); + QString ad = settings->getDestinationName(); + for (uint i = 0; i < dests.count(); i++ ) + { + popupAction = new QAction( dests[i], QString::null, 0, this, 0 ); + popupAction->addTo( destsMenu ); + if ( dests[i] == ad && activePackage->toInstall() ) + { + popupAction->setToggleAction( true ); + popupAction->setOn(true); + }; + } + connect( destsMenu, SIGNAL( activated( int ) ), + this, SLOT( changePackageDest( int ) ) ); + }else{ +// popupActcat setOn( activePackage->toProcess() ); + } popupMenu->popup( QCursor::pos() ); @@ -79,3 +90,2 @@ void PackageListView::stopTimer( QListViewItem* ) { - pvDebug( 5, "stop timer" ); popupTimer->stop(); @@ -91 +101,7 @@ void PackageListView::changePackageDest( int i ) } + +void PackageListView::toggleProcess() +{ + activePackage->toggleProcess() ; + activePackageListItem->displayDetails(); +} |