mirror of https://github.com/buggins/dlangide.git
fix opening of workspace file from commandline
This commit is contained in:
parent
99f14342e8
commit
cf63a63ae9
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
||||||
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dlangui": "==0.9.85",
|
"dlangui": "==0.9.86",
|
||||||
"dcd": "~>0.9.0"
|
"dcd": "~>0.9.0"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -88,16 +88,17 @@ extern (C) int UIAppMain(string[] args) {
|
||||||
IDEFrame frame = new IDEFrame(window);
|
IDEFrame frame = new IDEFrame(window);
|
||||||
|
|
||||||
// Open project, if it specified in command line
|
// Open project, if it specified in command line
|
||||||
if (args.length > 1)
|
if (args.length > 0)
|
||||||
{
|
{
|
||||||
Action a = ACTION_FILE_OPEN_WORKSPACE.clone();
|
Action a = ACTION_FILE_OPEN_WORKSPACE.clone();
|
||||||
a.stringParam = args[1];
|
a.stringParam = args[0].toAbsolutePath;
|
||||||
frame.handleAction(a);
|
frame.handleAction(a);
|
||||||
// Mark that workspace opened to prevent auto open
|
// Mark that workspace opened to prevent auto open
|
||||||
frame.isOpenedWorkspace(true);
|
frame.isOpenedWorkspace(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// open home screen tab
|
// open home screen tab
|
||||||
|
if (!frame.isOpenedWorkspace)
|
||||||
frame.showHomeScreen();
|
frame.showHomeScreen();
|
||||||
// for testing: load workspace at startup
|
// for testing: load workspace at startup
|
||||||
//frame.openFileOrWorkspace(appendPath(exePath, "../workspaces/sample1/sample1.dlangidews"));
|
//frame.openFileOrWorkspace(appendPath(exePath, "../workspaces/sample1/sample1.dlangidews"));
|
||||||
|
|
Loading…
Reference in New Issue