mirror of https://github.com/buggins/dlangide.git
window title should show workspace name instead of editor file name - fix 298
This commit is contained in:
parent
e0c267080f
commit
63c2ec36e5
|
@ -88,8 +88,8 @@ const Action ACTION_PROJECT_FOLDER_OPEN_ITEM = new Action(IDEActions.ProjectFold
|
|||
const Action ACTION_PROJECT_FOLDER_REMOVE_ITEM = new Action(IDEActions.ProjectFolderRemoveItem, "MENU_PROJECT_FOLDER_REMOVE_ITEM"c);
|
||||
const Action ACTION_PROJECT_FOLDER_RENAME_ITEM = new Action(IDEActions.ProjectFolderRenameItem, "MENU_PROJECT_FOLDER_RENAME_ITEM"c);
|
||||
const Action ACTION_PROJECT_FOLDER_REFRESH = new Action(IDEActions.ProjectFolderRefresh, "MENU_PROJECT_FOLDER_REFRESH"c);
|
||||
const Action ACTION_PROJECT_FOLDER_EXPAND_ALL = new Action(IDEActions.ProjectFolderExpandAll, "MENU_PROJECT_FOLDER_EXPAND_ALL"c);
|
||||
const Action ACTION_PROJECT_FOLDER_COLLAPSE_ALL = new Action(IDEActions.ProjectFolderCollapseAll, "MENU_PROJECT_FOLDER_COLLAPSE_ALL"c);
|
||||
const Action ACTION_PROJECT_FOLDER_EXPAND_ALL = new Action(IDEActions.ProjectFolderExpandAll, "MENU_PROJECT_FOLDER_EXPAND_ALL"c, null, KeyCode.KEY_ADD, KeyFlag.Control);
|
||||
const Action ACTION_PROJECT_FOLDER_COLLAPSE_ALL = new Action(IDEActions.ProjectFolderCollapseAll, "MENU_PROJECT_FOLDER_COLLAPSE_ALL"c, null, KeyCode.KEY_SUBTRACT, KeyFlag.Control);
|
||||
|
||||
const Action ACTION_FILE_WORKSPACE_CLOSE = new Action(IDEActions.CloseWorkspace, "MENU_FILE_WORKSPACE_CLOSE"c).disableByDefault();
|
||||
|
||||
|
|
|
@ -503,7 +503,9 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
_wsPanel.selectItem(file);
|
||||
focusEditor(file.filename);
|
||||
}
|
||||
window.windowCaption(tab.text.value ~ " - "d ~ frameWindowCaptionSuffix);
|
||||
//window.windowCaption(tab.text.value ~ " - "d ~ frameWindowCaptionSuffix);
|
||||
} else {
|
||||
//window.windowCaption(frameWindowCaptionSuffix);
|
||||
}
|
||||
requestActionsUpdate();
|
||||
}
|
||||
|
@ -1663,7 +1665,9 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
if (ws.startupProject) {
|
||||
warmUpImportPaths(ws.startupProject);
|
||||
}
|
||||
window.windowCaption(ws.name ~ " - "d ~ frameWindowCaptionSuffix);
|
||||
} else {
|
||||
window.windowCaption(frameWindowCaptionSuffix);
|
||||
_wsPanel.hide();
|
||||
}
|
||||
|
||||
|
|
|
@ -267,13 +267,15 @@ class WorkspacePanel : DockWindow {
|
|||
items ~= k;
|
||||
}
|
||||
_workspace.expandedItems = items;
|
||||
debug Log.d("stored Expanded state ", expanded, " for ", itemPath);
|
||||
}
|
||||
debug Log.d("stored Expanded state ", expanded, " for ", itemPath);
|
||||
}
|
||||
/// Is need to expand item?
|
||||
protected bool restoreItemState(string itemPath) {
|
||||
if (auto p = itemPath in _itemStates) {
|
||||
// Item itself must expand, but upper items may be collapsed
|
||||
return *p;
|
||||
/*
|
||||
auto path = itemPath;
|
||||
while (path.length > 0 && !path.endsWith("src") && path in _itemStates) {
|
||||
auto pos = lastIndexOf(path, '/');
|
||||
|
@ -283,6 +285,7 @@ class WorkspacePanel : DockWindow {
|
|||
debug Log.d("restored Expanded state for ", itemPath);
|
||||
return *p;
|
||||
}
|
||||
*/
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -299,7 +302,9 @@ class WorkspacePanel : DockWindow {
|
|||
|
||||
void reloadItems() {
|
||||
_tree.expandedChange.disconnect(&onTreeExpandedStateChange);
|
||||
_tree.selectionChange.disconnect(&onTreeItemSelected);
|
||||
_tree.clearAllItems();
|
||||
|
||||
if (_workspace) {
|
||||
TreeItem defaultItem = null;
|
||||
TreeItem root = _tree.items.newChild(_workspace.filename, _workspace.name, "project-development");
|
||||
|
@ -321,6 +326,7 @@ class WorkspacePanel : DockWindow {
|
|||
_tree.items.newChild("none", "No workspace"d, "project-development");
|
||||
}
|
||||
_tree.expandedChange.connect(&onTreeExpandedStateChange);
|
||||
_tree.selectionChange.connect(&onTreeItemSelected);
|
||||
|
||||
// expand default project if no information about expanded items
|
||||
if (!_itemStates.length) {
|
||||
|
|
Loading…
Reference in New Issue