]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/filter/filterpanel.cpp
Lock panels per default and allow to unlock them like in Amarok.
[dolphin.git] / src / panels / filter / filterpanel.cpp
index 021a2d3b8ec19b5360c702fb104789e63be5dac2..d13d6e5207e7ecac87f48131770d231b9bcd0b2c 100644 (file)
@@ -39,6 +39,7 @@
 #include <kfileitem.h>
 #include <kio/jobclasses.h>
 #include <kio/job.h>
+#include <kmenu.h>
 
 #include <QPushButton>
 #include <QShowEvent>
@@ -140,6 +141,18 @@ void FilterPanel::showEvent(QShowEvent* event)
     Panel::showEvent(event);
 }
 
+void FilterPanel::contextMenuEvent(QContextMenuEvent* event)
+{
+    Panel::contextMenuEvent(event);
+
+    QWeakPointer<KMenu> popup = new KMenu(this);
+    foreach (QAction* action, customContextMenuActions()) {
+        popup.data()->addAction(action);
+    }
+    popup.data()->exec(QCursor::pos());
+    delete popup.data();
+}
+
 void FilterPanel::slotSetUrlStatFinished(KJob* job)
 {
     m_lastSetUrlStatJob = 0;