ui: Added option to show file directory in code view title (issue #556)
* relative to project file if shorter * checkbox in preferences * not enabled by default
This commit is contained in:
@@ -146,11 +146,21 @@ Application::~Application()
|
||||
}
|
||||
}
|
||||
|
||||
const std::shared_ptr<Project> Application::getCurrentProject()
|
||||
const std::shared_ptr<Project> Application::getCurrentProject() const
|
||||
{
|
||||
return m_project;
|
||||
}
|
||||
|
||||
FilePath Application::getCurrentProjectPath() const
|
||||
{
|
||||
if (m_project)
|
||||
{
|
||||
return m_project->getProjectSettingsFilePath();
|
||||
}
|
||||
|
||||
return FilePath();
|
||||
}
|
||||
|
||||
bool Application::isProjectLoaded() const
|
||||
{
|
||||
if (m_project)
|
||||
|
||||
@@ -48,7 +48,8 @@ public:
|
||||
|
||||
~Application();
|
||||
|
||||
const std::shared_ptr<Project> getCurrentProject();
|
||||
const std::shared_ptr<Project> getCurrentProject() const;
|
||||
FilePath getCurrentProjectPath() const;
|
||||
bool isProjectLoaded() const;
|
||||
|
||||
bool hasGUI();
|
||||
|
||||
@@ -62,7 +62,7 @@ bool CodeSnippetParams::sort(const CodeSnippetParams& a, const CodeSnippetParams
|
||||
// alphabetical filepath without extension
|
||||
else
|
||||
{
|
||||
return aFilePath.withoutExtension().fileName() < bFilePath.withoutExtension().fileName();
|
||||
return aFilePath.withoutExtension() < bFilePath.withoutExtension();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -182,6 +182,16 @@ void ApplicationSettings::setShowBuiltinTypesInGraph(bool showBuiltinTypes)
|
||||
setValue<bool>("application/builtin_types_in_graph", showBuiltinTypes);
|
||||
}
|
||||
|
||||
bool ApplicationSettings::getShowDirectoryInCodeFileTitle() const
|
||||
{
|
||||
return getValue<bool>("application/directory_in_code_title", false);
|
||||
}
|
||||
|
||||
void ApplicationSettings::setShowDirectoryInCodeFileTitle(bool showDirectory)
|
||||
{
|
||||
setValue<bool>("application/directory_in_code_title", showDirectory);
|
||||
}
|
||||
|
||||
std::wstring ApplicationSettings::getColorSchemeName() const
|
||||
{
|
||||
return getValue<std::wstring>("application/color_scheme", L"bright");
|
||||
|
||||
@@ -54,6 +54,9 @@ public:
|
||||
bool getShowBuiltinTypesInGraph() const;
|
||||
void setShowBuiltinTypesInGraph(bool showBuiltinTypes);
|
||||
|
||||
bool getShowDirectoryInCodeFileTitle() const;
|
||||
void setShowDirectoryInCodeFileTitle(bool showDirectory);
|
||||
|
||||
int getWindowBaseWidth() const;
|
||||
int getWindowBaseHeight() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user