diff options
| author | Peter Penz <[email protected]> | 2010-10-27 20:11:46 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-10-27 20:11:46 +0000 |
| commit | 8559b78d7d4061bb70e6fe6ac2b787692282e69d (patch) | |
| tree | 5b67cf919dd1c6b5592f37d4dbdaa468b8f64969 /src/panels/folders/treeviewcontextmenu.cpp | |
| parent | 8a7591e20b7184c6214b9d4420298d169d326e4d (diff) | |
- Allow to disable the automatic horizontal scrolling of the Folders Panel
- Remember the 'Show Hidden Files' setting
- Improve the autoscroll behavior
- Fix issue that expanding folders might not increase the horizontal width
- Fix issue that the selected item might get hidden by the horizontal scrollbar
BUG: 191787
FIXED-IN: 4.6.0
CCMAIL: [email protected]>
svn path=/trunk/KDE/kdebase/apps/; revision=1190479
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" |
