mirror of https://github.com/buggins/dlangide.git
parent
b0aa592f73
commit
c7fd915e1e
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
||||||
"stringImportPaths": ["views"],
|
"stringImportPaths": ["views"],
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dlangui": "==0.9.130",
|
"dlangui": "==0.9.131",
|
||||||
"dsymbol": "~>0.2.9",
|
"dsymbol": "~>0.2.9",
|
||||||
"dcd": "~>0.9.1"
|
"dcd": "~>0.9.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -105,6 +105,8 @@ extern (C) int UIAppMain(string[] args) {
|
||||||
|
|
||||||
// show window
|
// show window
|
||||||
window.show();
|
window.show();
|
||||||
|
// restore window state, size, position
|
||||||
|
frame.restoreUIStateOnStartup();
|
||||||
|
|
||||||
//jsonTest();
|
//jsonTest();
|
||||||
|
|
||||||
|
|
|
@ -1650,6 +1650,10 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void restoreUIStateOnStartup() {
|
||||||
|
window.restoreWindowState(_settings.uiState);
|
||||||
|
}
|
||||||
|
|
||||||
/// return false to prevent closing
|
/// return false to prevent closing
|
||||||
bool onCanClose() {
|
bool onCanClose() {
|
||||||
askForUnsavedEdits(delegate() {
|
askForUnsavedEdits(delegate() {
|
||||||
|
@ -1663,6 +1667,8 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
||||||
}
|
}
|
||||||
/// called when main window is closing
|
/// called when main window is closing
|
||||||
void onWindowClose() {
|
void onWindowClose() {
|
||||||
|
window.saveWindowState(_settings.uiState);
|
||||||
|
_settings.save();
|
||||||
Log.i("onWindowClose()");
|
Log.i("onWindowClose()");
|
||||||
stopExecution();
|
stopExecution();
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,5 +302,10 @@ class IDESettings : SettingsFile {
|
||||||
Setting obj =_setting.objectByPath("common", true);
|
Setting obj =_setting.objectByPath("common", true);
|
||||||
obj.setBoolean("autoOpenLastProject", value);
|
obj.setBoolean("autoOpenLastProject", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// for saving window state, position, and other UI states
|
||||||
|
@property Setting uiState() {
|
||||||
|
return _setting.objectByPath("uiState", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v0.7.78
|
v0.7.79
|
Loading…
Reference in New Issue