ui: fixes

* fixed first match in autocompletion not preselected
* fixed maximize file button extending snippets
* changed names of views and setting name of composite view
* fixed number of error locations
This commit is contained in:
Eberhard Graether
2015-09-10 15:49:28 +02:00
parent 4c0d749a39
commit eaa3fab4ec
13 changed files with 22 additions and 20 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ ComponentManager::~ComponentManager()
void ComponentManager::setup(ViewLayout* viewLayout)
{
std::shared_ptr<CompositeView> compositeView =
m_componentFactory->getViewFactory()->createCompositeView(viewLayout, CompositeView::DIRECTION_HORIZONTAL);
m_componentFactory->getViewFactory()->createCompositeView(viewLayout, CompositeView::DIRECTION_HORIZONTAL, "Search");
m_compositeViews.push_back(compositeView);
std::shared_ptr<Component> undoRedoComponent = m_componentFactory->createUndoRedoComponent(compositeView.get());
+1 -1
View File
@@ -77,7 +77,7 @@ CodeView::~CodeView()
std::string CodeView::getName() const
{
return "CodeView";
return "Code";
}
CodeController* CodeView::getController()
+3 -2
View File
@@ -1,8 +1,9 @@
#include "component/view/CompositeView.h"
CompositeView::CompositeView(ViewLayout* viewLayout, CompositeDirection direction)
CompositeView::CompositeView(ViewLayout* viewLayout, CompositeDirection direction, const std::string& name)
: View(viewLayout)
, m_direction(direction)
, m_name(name)
{
}
@@ -22,7 +23,7 @@ const std::vector<View*>& CompositeView::getViews() const
std::string CompositeView::getName() const
{
return "CompositeView";
return m_name;
}
void CompositeView::addView(View* view)
+2 -1
View File
@@ -17,7 +17,7 @@ public:
DIRECTION_VERTICAL
};
CompositeView(ViewLayout* viewLayout, CompositeDirection direction);
CompositeView(ViewLayout* viewLayout, CompositeDirection direction, const std::string& name);
virtual ~CompositeView();
CompositeDirection getDirection() const;
@@ -41,6 +41,7 @@ public:
private:
std::vector<View*> m_views;
CompositeDirection m_direction;
std::string m_name;
};
#endif // COMPOSITE_VIEW_H
+1 -1
View File
@@ -11,5 +11,5 @@ GraphView::~GraphView()
std::string GraphView::getName() const
{
return "GraphView";
return "Graph";
}
+1 -1
View File
@@ -13,7 +13,7 @@ SearchView::~SearchView()
std::string SearchView::getName() const
{
return "SearchView";
return "Search";
}
SearchController* SearchView::getController()
+1 -1
View File
@@ -22,7 +22,7 @@ public:
virtual std::shared_ptr<MainView> createMainView() const = 0;
virtual std::shared_ptr<CompositeView> createCompositeView(
ViewLayout* viewLayout, CompositeView::CompositeDirection direction) const = 0;
ViewLayout* viewLayout, CompositeView::CompositeDirection direction, const std::string& name) const = 0;
virtual std::shared_ptr<CodeView> createCodeView(ViewLayout* viewLayout) const = 0;
virtual std::shared_ptr<GraphView> createGraphView(ViewLayout* viewLayout) const = 0;
+4 -2
View File
@@ -105,7 +105,7 @@ void Storage::onError(const ParseLocation& location, const std::string& message)
Id errorId = m_errorMessages.size();
m_errorLocationCollection.addTokenLocation(
0, errorId, location.filePath,
getErrorCount(), errorId, location.filePath,
location.startLineNumber, location.startColumnNumber,
location.endLineNumber, location.endColumnNumber
);
@@ -798,7 +798,9 @@ TokenLocationCollection Storage::getTokenLocationsForLocationIds(const std::vect
std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForFile(const std::string& filePath) const
{
return m_sqliteStorage.getTokenLocationsForFile(filePath);
std::shared_ptr<TokenLocationFile> locationFile = m_sqliteStorage.getTokenLocationsForFile(filePath);
locationFile->isWholeCopy = true;
return locationFile;
}
std::shared_ptr<TokenLocationFile> Storage::getTokenLocationsForLinesInFile(