diff options
| author | Peter Penz <[email protected]> | 2012-02-15 16:10:01 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-02-15 16:20:47 +0100 |
| commit | 749362987b9617ddfc461b647ac436be5a6eaca4 (patch) | |
| tree | fa4f943872d44450d946e2ad4ea05ffd264e9b6b /src/panels/folders/treeviewcontextmenu.cpp | |
| parent | cf72e481110d76081d1757dc89da5d8f68627b19 (diff) | |
Folders Panel: Use the whole width as selection region
As no rubberband-selection is enabled for the Folders Panel it does
not make sense to keep the selection region as small as possible.
BUG: 294111
FIXED-IN: 4.8.1
Diffstat (limited to 'src/panels/folders/treeviewcontextmenu.cpp')
| -rw-r--r-- | src/panels/folders/treeviewcontextmenu.cpp | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index 8d0b24cf3..b91fccbc0 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -105,34 +105,38 @@ void TreeViewContextMenu::open() } popup->addSeparator(); + } + + // insert 'Show Hidden Files' + QAction* showHiddenFilesAction = new QAction(i18nc("@action:inmenu", "Show Hidden Files"), this); + showHiddenFilesAction->setCheckable(true); + showHiddenFilesAction->setChecked(m_parent->showHiddenFiles()); + popup->addAction(showHiddenFilesAction); + connect(showHiddenFilesAction, SIGNAL(toggled(bool)), this, SLOT(setShowHiddenFiles(bool))); + // insert 'Automatic Scrolling' + QAction* autoScrollingAction = new QAction(i18nc("@action:inmenu", "Automatic Scrolling"), this); + autoScrollingAction->setCheckable(true); + autoScrollingAction->setChecked(m_parent->autoScrolling()); + // TODO: Temporary disabled. Horizontal autoscrolling will be implemented later either + // in KItemViews or manually as part of the FoldersPanel + //popup->addAction(autoScrollingAction); + connect(autoScrollingAction, SIGNAL(toggled(bool)), this, SLOT(setAutoScrolling(bool))); + + if (!m_fileItem.isNull()) { // insert 'Properties' entry QAction* propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this); propertiesAction->setIcon(KIcon("document-properties")); connect(propertiesAction, SIGNAL(triggered()), this, SLOT(showProperties())); popup->addAction(propertiesAction); - - popup->addSeparator(); } - if (m_fileItem.isNull()) { - QAction* showHiddenFilesAction = new QAction(i18nc("@action:inmenu", "Show Hidden Files"), this); - showHiddenFilesAction->setCheckable(true); - 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()); - // TODO: Temporary disabled. Horizontal autoscrolling will be implemented later either - // in KItemViews or manually as part of the FoldersPanel - //popup->addAction(autoScrollingAction); - connect(autoScrollingAction, SIGNAL(toggled(bool)), this, SLOT(setAutoScrolling(bool))); - } - - foreach (QAction* action, m_parent->customContextMenuActions()) { - popup->addAction(action); + QList<QAction*> customActions = m_parent->customContextMenuActions(); + if (!customActions.isEmpty()) { + popup->addSeparator(); + foreach (QAction* action, customActions) { + popup->addAction(action); + } } QWeakPointer<KMenu> popupPtr = popup; |
