diff options
| author | Peter Penz <[email protected]> | 2010-12-31 10:59:46 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-12-31 10:59:46 +0000 |
| commit | 94815093253e5db99aa100f0834cd6c74c96a91a (patch) | |
| tree | 725cbfd9d8b412198a143153cbadf06f0ee724c9 /src/panels/information | |
| parent | f7bbe21b5b2d3bc85dcba1d03494879aac9e37c7 (diff) | |
Lock panels per default and allow to unlock them like in Amarok.
BUG: 229811
FIXED-IN: 4.7.0
svn path=/trunk/KDE/kdebase/apps/; revision=1210424
Diffstat (limited to 'src/panels/information')
| -rw-r--r-- | src/panels/information/informationpanel.cpp | 3 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 7 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.h | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 0fd67b2b6..6681dc30d 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -167,7 +167,8 @@ void InformationPanel::resizeEvent(QResizeEvent* event) void InformationPanel::contextMenuEvent(QContextMenuEvent* event) { - m_content->configureSettings(); + // TODO: Move code from InformationPanelContent::configureSettings() here + m_content->configureSettings(customContextMenuActions()); Panel::contextMenuEvent(event); } diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 371bdaf96..f8a72fb70 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -265,7 +265,7 @@ bool InformationPanelContent::eventFilter(QObject* obj, QEvent* event) return QWidget::eventFilter(obj, event); } -void InformationPanelContent::configureSettings() +void InformationPanelContent::configureSettings(const QList<QAction*>& customContextMenuActions) { KMenu popup(this); @@ -277,6 +277,11 @@ void InformationPanelContent::configureSettings() QAction* configureAction = popup.addAction(i18nc("@action:inmenu", "Configure...")); configureAction->setIcon(KIcon("configure")); + popup.addSeparator(); + foreach (QAction* action, customContextMenuActions) { + popup.addAction(action); + } + // Open the popup and adjust the settings for the // selected action. QAction* action = popup.exec(QCursor::pos()); diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h index f918b8582..c41f4043f 100644 --- a/src/panels/information/informationpanelcontent.h +++ b/src/panels/information/informationpanelcontent.h @@ -61,8 +61,10 @@ public: /** * Opens a menu which allows to configure which meta information * should be shown. + * + * TODO: Move this code to the class InformationPanel */ - void configureSettings(); + void configureSettings(const QList<QAction*>& customContextMenuActions); signals: void urlActivated( const KUrl& url ); |
