summaryrefslogtreecommitdiff
authortille <tille>2002-05-01 22:19:05 (UTC)
committer tille <tille>2002-05-01 22:19:05 (UTC)
commit89b16f3378b783be9058852528e066dcadea953d (patch) (unidiff)
treea66ab1808d96f326831bbf46e36a4fd7a214e215
parent82ff405e40d4aa6cad8b5583f9d7e5b89a78f261 (diff)
downloadopie-89b16f3378b783be9058852528e066dcadea953d.zip
opie-89b16f3378b783be9058852528e066dcadea953d.tar.gz
opie-89b16f3378b783be9058852528e066dcadea953d.tar.bz2
added popupmenu for installed packages
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp
index 36d081b..26b1ce7 100644
--- a/noncore/unsupported/oipkg/packagelistview.cpp
+++ b/noncore/unsupported/oipkg/packagelistview.cpp
@@ -51,32 +51,39 @@ void PackageListView::showPopup()
51 popupMenu->insertItem( QObject::tr("Install to"), destsMenu ); 51 popupMenu->insertItem( QObject::tr("Install to"), destsMenu );
52 QStringList dests = settings->getDestinationNames(); 52 QStringList dests = settings->getDestinationNames();
53 QString ad = settings->getDestinationName(); 53 QString ad = settings->getDestinationName();
54 for (uint i = 0; i < dests.count(); i++ ) 54 for (uint i = 0; i < dests.count(); i++ )
55 { 55 {
56 popupAction = new QAction( dests[i], QString::null, 0, this, 0 ); 56 popupAction = new QAction( dests[i], QString::null, 0, this, 0 );
57 popupAction->addTo( destsMenu ); 57 popupAction->addTo( destsMenu );
58 if ( dests[i] == ad && activePackage->toInstall() ) 58 if ( dests[i] == ad && activePackage->toInstall() )
59 { 59 {
60 popupAction->setToggleAction( true ); 60 popupAction->setToggleAction( true );
61 popupAction->setOn(true); 61 popupAction->setOn(true);
62 }; 62 };
63 } 63 }
64 connect( destsMenu, SIGNAL( activated( int ) ), 64 connect( destsMenu, SIGNAL( activated( int ) ),
65 this, SLOT( changePackageDest( int ) ) ); 65 this, SLOT( changePackageDest( int ) ) );
66 }else{ 66 }else{
67 popupAction = new QAction( QObject::tr("Remove"),QString::null, 0, this, 0 );
68 popupAction->addTo( popupMenu );
69 connect( popupAction, SIGNAL( activated() ),
70 this , SLOT( toggleProcess() ) );
71 popupAction = new QAction( QObject::tr("Reinstall"),QString::null, 0, this, 0 );
72 popupAction->addTo( popupMenu );
73 popupAction->setEnabled( false );
67 } 74 }
68 popupMenu->popup( QCursor::pos() ); 75 popupMenu->popup( QCursor::pos() );
69} 76}
70 77
71void PackageListView::stopTimer( QListViewItem* ) 78void PackageListView::stopTimer( QListViewItem* )
72{ 79{
73 popupTimer->stop(); 80 popupTimer->stop();
74} 81}
75 82
76 83
77void PackageListView::changePackageDest( int i ) 84void PackageListView::changePackageDest( int i )
78{ 85{
79 activePackage->setDest( destsMenu->text(i) ); 86 activePackage->setDest( destsMenu->text(i) );
80 activePackage->setOn(); 87 activePackage->setOn();
81 activePackage->setLink( settings->createLinks() ); 88 activePackage->setLink( settings->createLinks() );
82 activePackageListItem->displayDetails(); 89 activePackageListItem->displayDetails();