summaryrefslogtreecommitdiffstats
path: root/Project/MainFrame.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-09-19 21:12:45 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-09-19 21:12:45 -0300
commitb76d50299a7995b2b3be0a3f9bf954cceeb89314 (patch)
tree5e234bb5216325882610e028826256617b44c2f8 /Project/MainFrame.cpp
parentde90dfcf76c1fb13648633b6bddb011b15ac8458 (diff)
downloadPSP.git-b76d50299a7995b2b3be0a3f9bf954cceeb89314.tar.gz
PSP.git-b76d50299a7995b2b3be0a3f9bf954cceeb89314.tar.xz
PSP.git-b76d50299a7995b2b3be0a3f9bf954cceeb89314.zip
Open file .psp implemented
Several directories bugfixes
Diffstat (limited to 'Project/MainFrame.cpp')
-rw-r--r--Project/MainFrame.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp
index 9477e13..436f1fd 100644
--- a/Project/MainFrame.cpp
+++ b/Project/MainFrame.cpp
@@ -19,12 +19,34 @@
#include "AboutForm.h"
MainFrame::MainFrame() : MainFrameBase(NULL) {}
-MainFrame::MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties) : MainFrameBase(parent)
+MainFrame::MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties, wxString openPath)
+ : MainFrameBase(parent)
{
m_locale = locale;
m_generalProperties = initProperties;
Init();
+
+ if(openPath != "") {
+ EnableCurrentProjectRibbon();
+ Workspace* newWorkspace = new Workspace(this, _("Open project"), this->GetStatusBar());
+
+ FileHanding fileHandling(newWorkspace);
+ if(fileHandling.OpenProject(openPath)) {
+ newWorkspace->SetSavedPath(openPath);
+
+ m_workspaceList.push_back(newWorkspace);
+
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
+
+ m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
+ m_auiNotebook->Layout();
+ newWorkspace->Redraw();
+ newWorkspace->SetJustOpened(true);
+ m_projectNumber++;
+ }
+ }
}
MainFrame::~MainFrame()