diff options
Diffstat (limited to 'src/panels/folders/treeviewcontextmenu.cpp')
| -rw-r--r-- | src/panels/folders/treeviewcontextmenu.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index 32e92e05c..aa111c6ba 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -1,6 +1,6 @@ /*************************************************************************** - * Copyright (C) 2006 by Peter Penz ([email protected]) and * - * Cvetoslav Ludmiloff * + * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * + * Copyright (C) 2006 by Cvetoslav Ludmiloff * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -20,8 +20,6 @@ #include "treeviewcontextmenu.h" -#include "dolphin_folderspanelsettings.h" - #include <kfileitem.h> #include <kiconloader.h> #include <kio/deletejob.h> @@ -87,7 +85,7 @@ void TreeViewContextMenu::open() KConfigGroup configGroup(globalConfig, "KDE"); bool showDeleteCommand = configGroup.readEntry("ShowDeleteCommand", false); - const KUrl& url = m_fileInfo.url(); + const KUrl url = m_fileInfo.url(); if (url.isLocalFile()) { QAction* moveToTrashAction = new QAction(KIcon("user-trash"), i18nc("@action:inmenu", "Move to Trash"), this); @@ -118,11 +116,17 @@ void TreeViewContextMenu::open() QAction* showHiddenFilesAction = new QAction(i18nc("@action:inmenu", "Show Hidden Files"), this); showHiddenFilesAction->setCheckable(true); - showHiddenFilesAction->setChecked(FoldersPanelSettings::showHiddenFiles()); + showHiddenFilesAction->setChecked(m_parent->showHiddenFiles()); popup->addAction(showHiddenFilesAction); - connect(showHiddenFilesAction, SIGNAL(toggled(bool)), this, SLOT(setShowHiddenFiles(bool))); + QAction* autoScrollingAction = new QAction(i18nc("@action:inmenu", "Automatic Scrolling"), this); + autoScrollingAction->setCheckable(true); + autoScrollingAction->setChecked(m_parent->autoScrolling()); + popup->addAction(autoScrollingAction); + connect(autoScrollingAction, SIGNAL(toggled(bool)), this, SLOT(setAutoScrolling(bool))); + + popup->exec(QCursor::pos()); popup->deleteLater(); } @@ -193,4 +197,9 @@ void TreeViewContextMenu::setShowHiddenFiles(bool show) m_parent->setShowHiddenFiles(show); } +void TreeViewContextMenu::setAutoScrolling(bool enable) +{ + m_parent->setAutoScrolling(enable); +} + #include "treeviewcontextmenu.moc" |
