Commit 79806db4 authored by Daniel Teske's avatar Daniel Teske
Browse files

ProjectExplorerPlugin: Allow hiding Open Terminal/Open containing dir



Those actions do only work if the project tree has some relationship
with the filesystem. Which isn't always the case.

Change-Id: I1db641a5a39463a37d2e4d5466a02ce9da6241ca
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent c17bce14
......@@ -2676,6 +2676,10 @@ void ProjectExplorerPlugin::updateContextMenuActions()
d->m_deleteFileAction->setVisible(true);
d->m_runActionContextMenu->setVisible(false);
d->m_openTerminalHere->setVisible(true);
d->m_showInGraphicalShell->setVisible(true);
d->m_searchOnFileSystem->setVisible(true);
ActionContainer *runMenu = ActionManager::actionContainer(Constants::RUNMENUCONTEXTMENU);
runMenu->menu()->clear();
......@@ -2726,6 +2730,12 @@ void ProjectExplorerPlugin::updateContextMenuActions()
d->m_removeFileAction->setVisible(!enableDelete || enableRemove);
d->m_renameFileAction->setEnabled(actions.contains(ProjectExplorer::Rename));
}
if (actions.contains(ProjectExplorer::HidePathActions)) {
d->m_openTerminalHere->setVisible(false);
d->m_showInGraphicalShell->setVisible(false);
d->m_searchOnFileSystem->setVisible(false);
}
}
}
......
......@@ -84,6 +84,8 @@ enum ProjectAction {
// DeleteFile is a define on windows...
EraseFile,
Rename,
// hides actions that use the path(): Open containing folder, open terminal here and Find in Directory
HidePathActions,
HasSubProjectRunConfigurations
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment