-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index 4380393..51d024b 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp | |||
@@ -195,45 +195,45 @@ QPopupMenu* PackageListItem::getPopupMenu() | |||
195 | 195 | ||
196 | QAction *popupAction; | 196 | QAction *popupAction; |
197 | qDebug("PackageListItem::showPopup "); | 197 | qDebug("PackageListItem::showPopup "); |
198 | 198 | ||
199 | if (!package->installed()){ | 199 | if (!package->installed()){ |
200 | popupMenu->insertItem( QObject::tr("Install to"), destsMenu ); | 200 | popupMenu->insertItem( QObject::tr("Install to"), destsMenu ); |
201 | QStringList dests = settings->getDestinationNames(); | 201 | QStringList dests = settings->getDestinationNames(); |
202 | QString ad = settings->getDestinationName(); | 202 | QString ad = settings->getDestinationName(); |
203 | for (uint i = 0; i < dests.count(); i++ ) | 203 | for (uint i = 0; i < dests.count(); i++ ) |
204 | { | 204 | { |
205 | popupAction = new QAction( dests[i], QString::null, 0, popupMenu, 0 ); | 205 | popupAction = new QAction( dests[i], QString::null, 0, popupMenu, 0 ); |
206 | popupAction->addTo( destsMenu ); | 206 | popupAction->addTo( destsMenu ); |
207 | if ( dests[i] == ad && getPackage()->toInstall() ) | 207 | if ( dests[i] == ad && getPackage()->toInstall() ) |
208 | { | 208 | { |
209 | popupAction->setToggleAction( true ); | 209 | popupAction->setToggleAction( true ); |
210 | popupAction->setOn(true); | 210 | popupAction->setOn(true); |
211 | } | 211 | } |
212 | } | 212 | } |
213 | connect( destsMenu, SIGNAL( activated( int ) ), | 213 | connect( destsMenu, SIGNAL( activated( int ) ), |
214 | this, SLOT( menuAction( int ) ) ); | 214 | this, SLOT( menuAction( int ) ) ); |
215 | popupMenu->popup( QCursor::pos() ); | 215 | popupMenu->popup( QCursor::pos() ); |
216 | }else{ | 216 | }else{ |
217 | popupMenu->insertItem( QObject::tr("Remove")); | 217 | popupMenu->insertItem( QObject::tr("Remove")); |
218 | connect( popupMenu, SIGNAL( activated( int ) ), | 218 | connect( popupMenu, SIGNAL( activated( int ) ), |
219 | this, SLOT( menuAction( int ) ) ); | 219 | this, SLOT( menuAction( int ) ) ); |
220 | popupMenu->popup( QCursor::pos() ); | 220 | popupMenu->popup( QCursor::pos() ); |
221 | } | 221 | } |
222 | return popupMenu; | 222 | return popupMenu; |
223 | } | 223 | } |
224 | 224 | ||
225 | void PackageListItem::menuAction( int i ) | 225 | void PackageListItem::menuAction( int i ) |
226 | { | 226 | { |
227 | if (package->installed()){ | 227 | if (!package->installed()){ |
228 | package->setDest( destsMenu->text(i) ); | 228 | package->setDest( destsMenu->text(i) ); |
229 | package->setLink( settings->createLinks() ); | 229 | package->setLink( settings->createLinks() ); |
230 | } | 230 | } |
231 | package->setOn(); | 231 | package->setOn(); |
232 | displayDetails(); | 232 | displayDetails(); |
233 | } | 233 | } |
234 | 234 | ||
235 | //void PackageListItem::toggleProcess() | 235 | //void PackageListItem::toggleProcess() |
236 | //{ | 236 | //{ |
237 | // package->toggleProcess() ; | 237 | // package->toggleProcess() ; |
238 | // displayDetails(); | 238 | // displayDetails(); |
239 | //} \ No newline at end of file | 239 | //} |