summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelistview.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/oipkg/packagelistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp20
1 files changed, 18 insertions, 2 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,4 +65,7 @@ void PackageListView::showPopup()
QAction *popupAction;
+ 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++ )
@@ -71,2 +74,7 @@ void PackageListView::showPopup()
popupAction->addTo( destsMenu );
+ if ( dests[i] == ad && activePackage->toInstall() )
+ {
+ popupAction->setToggleAction( true );
+ popupAction->setOn(true);
+ };
}
@@ -74,2 +82,5 @@ void PackageListView::showPopup()
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();
+}