| Summary: | 'del' doesn't work in the main playlist after right-clicking in files browser | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | richlv |
| Component: | general | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Slackware | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
richlv
2007-01-17 17:18:16 UTC
SVN commit 626089 by ianmonroe:
Fixed regression: the DEL key no longer worked in the
playlist after opening the File Browser context menu.
BUG: 140197
M +2 -0 ChangeLog
M +15 -10 src/mydiroperator.cpp
M +2 -0 src/mydiroperator.h
--- trunk/extragear/multimedia/amarok/ChangeLog #626088:626089
@@ -98,6 +98,8 @@
* Amarok now saves playlists with relative paths by default.
BUGFIXES:
+ * Fixed regression: the DEL key no longer worked in the
+ playlist after opening the File Browser context menu. (BR 140197)
* Smart playlists now work correctly with "is not" filters containing
numbers. Patch by Felix Rotthowe <felix.rotthowe@cs.uni-dortmund.de>.
* Context browser would not display updated covers correctly. (BR 130518)
--- trunk/extragear/multimedia/amarok/src/mydiroperator.cpp #626088:626089
@@ -9,16 +9,7 @@
{
m_medium = medium;
setDirLister( new MyDirLister( true ) );
- //the delete key event was being eaten with the file browser open
- //so folks couldn't use the del key to remove items from the playlist
- //refer to KDirOperator::setupActions() to understand this code
- KActionCollection* dirActionCollection = static_cast<KActionCollection*>(KDirOperator::child("KDirOperator::myActionCollection"));
- if(dirActionCollection)
- {
- KAction* trash = dirActionCollection->action("trash");
- if(trash)
- trash->setEnabled(false);
- }
+ reenableDeleteKey();
}
void
@@ -39,4 +30,18 @@
setURL(tmp, true);
}
+
+//BEGIN private methods
+void
+MyDirOperator::reenableDeleteKey()
+{
+ KActionCollection* dirActionCollection = static_cast<KActionCollection*>(KDirOperator::child("KDirOperator::myActionCollection"));
+ if( dirActionCollection )
+ {
+ KAction* trash = dirActionCollection->action("trash");
+ if(trash)
+ trash->setEnabled(false);
+ }
+}
+//END private methods
#include "mydiroperator.moc"
--- trunk/extragear/multimedia/amarok/src/mydiroperator.h #626088:626089
@@ -20,12 +20,14 @@
//reimplemented due to a bug in KDirOperator::activatedMenu ( KDE 3.4.2 ) - See Bug #103305
virtual void activatedMenu (const KFileItem *, const QPoint &pos) {
updateSelectionDependentActions();
+ reenableDeleteKey();
static_cast<KActionMenu*>(actionCollection()->action("popupMenu"))->popupMenu()->popup( pos );
}
void myHome();
void myCdUp();
private:
+ void reenableDeleteKey();
Medium *m_medium;
};
|