mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +02:00
Added 'Reload Settings' and 'Reset UI' to File/Preferences menu
This commit is contained in:
parent
14e9f9aa53
commit
0adfbce884
2 changed files with 45 additions and 3 deletions
|
@ -229,12 +229,14 @@ namespace IDE
|
||||||
Add("Profile", new => gApp.[Friend]DoProfile);
|
Add("Profile", new => gApp.[Friend]DoProfile);
|
||||||
Add("Quick Info", new => gApp.Cmd_QuickInfo);
|
Add("Quick Info", new => gApp.Cmd_QuickInfo);
|
||||||
Add("Reformat Document", new => gApp.Cmd_ReformatDocument);
|
Add("Reformat Document", new => gApp.Cmd_ReformatDocument);
|
||||||
|
Add("Reload Settings", new => gApp.ReloadSettings);
|
||||||
Add("Remove All Breakpoints", new => gApp.[Friend]RemoveAllBreakpoints);
|
Add("Remove All Breakpoints", new => gApp.[Friend]RemoveAllBreakpoints);
|
||||||
Add("Rename Item", new => gApp.Cmd_RenameItem);
|
Add("Rename Item", new => gApp.Cmd_RenameItem);
|
||||||
Add("Rename Symbol", new => gApp.Cmd_RenameSymbol);
|
Add("Rename Symbol", new => gApp.Cmd_RenameSymbol);
|
||||||
Add("Replace in Document", new => gApp.Cmd_Document__Replace);
|
Add("Replace in Document", new => gApp.Cmd_Document__Replace);
|
||||||
Add("Replace in Files", new => gApp.Cmd_Replace);
|
Add("Replace in Files", new => gApp.Cmd_Replace);
|
||||||
Add("Report Memory", new => gApp.[Friend]ReportMemory);
|
Add("Report Memory", new => gApp.[Friend]ReportMemory);
|
||||||
|
Add("Reset UI", new => gApp.ResetUI);
|
||||||
Add("Run All Tests", new () => { gApp.[Friend]RunTests(true, false); });
|
Add("Run All Tests", new () => { gApp.[Friend]RunTests(true, false); });
|
||||||
Add("Run Normal Tests", new () => { gApp.[Friend]RunTests(false, false); });
|
Add("Run Normal Tests", new () => { gApp.[Friend]RunTests(false, false); });
|
||||||
Add("Run To Cursor", new => gApp.[Friend]RunToCursor);
|
Add("Run To Cursor", new => gApp.[Friend]RunToCursor);
|
||||||
|
|
|
@ -4595,6 +4595,45 @@ namespace IDE
|
||||||
workspaceProperties.PopupWindow(mMainWindow);
|
workspaceProperties.PopupWindow(mMainWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IDECommand]
|
||||||
|
public void ReloadSettings()
|
||||||
|
{
|
||||||
|
delete mSettings;
|
||||||
|
mSettings = new .();
|
||||||
|
|
||||||
|
DeleteAndNullify!(mKeyChordState);
|
||||||
|
|
||||||
|
mSettings.Load();
|
||||||
|
mSettings.Apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
[IDECommand]
|
||||||
|
public void ResetUI()
|
||||||
|
{
|
||||||
|
while (mWindows.Count > 1)
|
||||||
|
mWindows.Back.Close(true);
|
||||||
|
|
||||||
|
void ResetPanel(Widget widget)
|
||||||
|
{
|
||||||
|
if (widget.mParent != null)
|
||||||
|
widget.RemoveSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mRunningTestScript)
|
||||||
|
{
|
||||||
|
mActiveDocumentsTabbedView = null;
|
||||||
|
WithStandardPanels(scope (panel) =>
|
||||||
|
{
|
||||||
|
ResetPanel(panel);
|
||||||
|
});
|
||||||
|
mMainFrame.Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
mDockingFrame = mMainFrame.mDockingFrame;
|
||||||
|
|
||||||
|
CreateDefaultLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
[IDECommand]
|
[IDECommand]
|
||||||
public void ShowKeyboardShortcuts()
|
public void ShowKeyboardShortcuts()
|
||||||
{
|
{
|
||||||
|
@ -5015,8 +5054,9 @@ namespace IDE
|
||||||
AddMenuItem(subMenu, "Save &As...", "Save As", new => UpdateMenuItem_HasActiveDocument);
|
AddMenuItem(subMenu, "Save &As...", "Save As", new => UpdateMenuItem_HasActiveDocument);
|
||||||
AddMenuItem(subMenu, "Save A&ll", "Save All");
|
AddMenuItem(subMenu, "Save A&ll", "Save All");
|
||||||
let prefMenu = subMenu.AddMenuItem("&Preferences");
|
let prefMenu = subMenu.AddMenuItem("&Preferences");
|
||||||
//prefMenu.AddMenuItem("&Keyboard Shortcuts", null, new (evt) => { ShowKeyboardShortcuts(); });
|
|
||||||
AddMenuItem(prefMenu, "&Settings", "Settings");
|
AddMenuItem(prefMenu, "&Settings", "Settings");
|
||||||
|
AddMenuItem(prefMenu, "Reload Settings", "Reload Settings");
|
||||||
|
AddMenuItem(prefMenu, "Reset UI", "Reset UI");
|
||||||
AddMenuItem(subMenu, "Close Workspace", "Close Workspace", new => UpdateMenuItem_HasWorkspace);
|
AddMenuItem(subMenu, "Close Workspace", "Close Workspace", new => UpdateMenuItem_HasWorkspace);
|
||||||
AddMenuItem(subMenu, "E&xit", "Exit");
|
AddMenuItem(subMenu, "E&xit", "Exit");
|
||||||
|
|
||||||
|
@ -10538,12 +10578,12 @@ namespace IDE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateDefaultLayout()
|
public void CreateDefaultLayout(bool allowSavedLayout = true)
|
||||||
{
|
{
|
||||||
//TODO:
|
//TODO:
|
||||||
//mConfigName.Set("Dbg");
|
//mConfigName.Set("Dbg");
|
||||||
|
|
||||||
if ((!mRunningTestScript) && (!mIsFirstRun) && (LoadDefaultLayoutData()))
|
if ((allowSavedLayout) && (!mRunningTestScript) && (!mIsFirstRun) && (LoadDefaultLayoutData()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue