mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 15:24:10 +02:00
Move windows terminal option
This commit is contained in:
parent
6849184cbf
commit
45a5978611
5 changed files with 26 additions and 9 deletions
|
@ -6525,7 +6525,7 @@ namespace IDE
|
||||||
|
|
||||||
ProcessStartInfo procInfo = scope ProcessStartInfo();
|
ProcessStartInfo procInfo = scope ProcessStartInfo();
|
||||||
procInfo.UseShellExecute = true;
|
procInfo.UseShellExecute = true;
|
||||||
procInfo.SetFileName(gApp.mSettings.mEditorSettings.mDefaultConsole);
|
procInfo.SetFileName(gApp.mSettings.mWindowsTerminal);
|
||||||
procInfo.SetWorkingDirectory(directory);
|
procInfo.SetWorkingDirectory(directory);
|
||||||
|
|
||||||
let process = scope SpawnedProcess();
|
let process = scope SpawnedProcess();
|
||||||
|
|
|
@ -657,7 +657,6 @@ namespace IDE
|
||||||
|
|
||||||
public List<String> mFonts = new .() ~ DeleteContainerAndItems!(_);
|
public List<String> mFonts = new .() ~ DeleteContainerAndItems!(_);
|
||||||
public float mFontSize = 12;
|
public float mFontSize = 12;
|
||||||
public String mWindowsConsole = new .("Powershell") ~ delete _;
|
|
||||||
public AutoCompleteShowKind mAutoCompleteShowKind = .PanelIfVisible;
|
public AutoCompleteShowKind mAutoCompleteShowKind = .PanelIfVisible;
|
||||||
public bool mAutoCompleteRequireControl = true;
|
public bool mAutoCompleteRequireControl = true;
|
||||||
public bool mAutoCompleteRequireTab = false;
|
public bool mAutoCompleteRequireTab = false;
|
||||||
|
@ -692,7 +691,6 @@ namespace IDE
|
||||||
sd.Add(str);
|
sd.Add(str);
|
||||||
}
|
}
|
||||||
sd.Add("FontSize", mFontSize);
|
sd.Add("FontSize", mFontSize);
|
||||||
sd.Add("WindowsConsole", mWindowsConsole);
|
|
||||||
sd.Add("AutoCompleteShowKind", mAutoCompleteShowKind);
|
sd.Add("AutoCompleteShowKind", mAutoCompleteShowKind);
|
||||||
sd.Add("AutoCompleteRequireControl", mAutoCompleteRequireControl);
|
sd.Add("AutoCompleteRequireControl", mAutoCompleteRequireControl);
|
||||||
sd.Add("AutoCompleteRequireTab", mAutoCompleteRequireTab);
|
sd.Add("AutoCompleteRequireTab", mAutoCompleteRequireTab);
|
||||||
|
@ -730,7 +728,6 @@ namespace IDE
|
||||||
}
|
}
|
||||||
sd.Get("UIScale", ref gApp.mSettings.mUISettings.mScale); // Legacy
|
sd.Get("UIScale", ref gApp.mSettings.mUISettings.mScale); // Legacy
|
||||||
sd.Get("FontSize", ref mFontSize);
|
sd.Get("FontSize", ref mFontSize);
|
||||||
sd.Get("WindowsConsole", mWindowsConsole);
|
|
||||||
sd.Get("AutoCompleteShowKind", ref mAutoCompleteShowKind);
|
sd.Get("AutoCompleteShowKind", ref mAutoCompleteShowKind);
|
||||||
sd.Get("AutoCompleteRequireControl", ref mAutoCompleteRequireControl);
|
sd.Get("AutoCompleteRequireControl", ref mAutoCompleteRequireControl);
|
||||||
sd.Get("AutoCompleteRequireTab", ref mAutoCompleteRequireTab);
|
sd.Get("AutoCompleteRequireTab", ref mAutoCompleteRequireTab);
|
||||||
|
@ -1112,6 +1109,7 @@ namespace IDE
|
||||||
public KeySettings mKeySettings = new .() ~ delete _;
|
public KeySettings mKeySettings = new .() ~ delete _;
|
||||||
public RecentFiles mRecentFiles = new RecentFiles() ~ delete _;
|
public RecentFiles mRecentFiles = new RecentFiles() ~ delete _;
|
||||||
public String mWakaTimeKey = new .() ~ delete _;
|
public String mWakaTimeKey = new .() ~ delete _;
|
||||||
|
public String mWindowsTerminal = new .("Powershell") ~ delete _;
|
||||||
public String mEmscriptenPath = new .() ~ delete _;
|
public String mEmscriptenPath = new .() ~ delete _;
|
||||||
public bool mEnableDevMode;
|
public bool mEnableDevMode;
|
||||||
public TutorialsFinished mTutorialsFinished = .();
|
public TutorialsFinished mTutorialsFinished = .();
|
||||||
|
@ -1169,6 +1167,8 @@ namespace IDE
|
||||||
mDebuggerSettings.Serialize(sd);
|
mDebuggerSettings.Serialize(sd);
|
||||||
using (sd.CreateObject("VisualStudio"))
|
using (sd.CreateObject("VisualStudio"))
|
||||||
mVSSettings.Serialize(sd);
|
mVSSettings.Serialize(sd);
|
||||||
|
using (sd.CreateObject("Terminal"))
|
||||||
|
sd.Add("WindowsTerminal", mWindowsTerminal);
|
||||||
using (sd.CreateObject("Wasm"))
|
using (sd.CreateObject("Wasm"))
|
||||||
sd.Add("EmscriptenPath", mEmscriptenPath);
|
sd.Add("EmscriptenPath", mEmscriptenPath);
|
||||||
|
|
||||||
|
@ -1258,6 +1258,8 @@ namespace IDE
|
||||||
mDebuggerSettings.Deserialize(sd);
|
mDebuggerSettings.Deserialize(sd);
|
||||||
using (sd.Open("VisualStudio"))
|
using (sd.Open("VisualStudio"))
|
||||||
mVSSettings.Deserialize(sd);
|
mVSSettings.Deserialize(sd);
|
||||||
|
using (sd.Open("Terminal"))
|
||||||
|
sd.Get("WindowsTerminal", mWindowsTerminal);
|
||||||
using (sd.Open("Wasm"))
|
using (sd.Open("Wasm"))
|
||||||
sd.Get("EmscriptenPath", mEmscriptenPath);
|
sd.Get("EmscriptenPath", mEmscriptenPath);
|
||||||
|
|
||||||
|
|
|
@ -2958,7 +2958,7 @@ namespace IDE.ui
|
||||||
void AddOpenContainingFolder()
|
void AddOpenContainingFolder()
|
||||||
{
|
{
|
||||||
var folderItem = menu.AddItem("Open Containing Folder");
|
var folderItem = menu.AddItem("Open Containing Folder");
|
||||||
var item = folderItem.AddItem("In Explorer");
|
var item = folderItem.AddItem("File Explorer");
|
||||||
item.mOnMenuItemSelected.Add(new (item) =>
|
item.mOnMenuItemSelected.Add(new (item) =>
|
||||||
{
|
{
|
||||||
let projectItem = GetSelectedProjectItem();
|
let projectItem = GetSelectedProjectItem();
|
||||||
|
@ -2991,7 +2991,7 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
item = folderItem.AddItem("In Console");
|
item = folderItem.AddItem("Terminal");
|
||||||
item.mOnMenuItemSelected.Add(new (menu) =>
|
item.mOnMenuItemSelected.Add(new (menu) =>
|
||||||
{
|
{
|
||||||
let projectItem = GetSelectedProjectItem();
|
let projectItem = GetSelectedProjectItem();
|
||||||
|
@ -3015,7 +3015,7 @@ namespace IDE.ui
|
||||||
if (!path.IsWhiteSpace)
|
if (!path.IsWhiteSpace)
|
||||||
{
|
{
|
||||||
ProcessStartInfo psi = scope ProcessStartInfo();
|
ProcessStartInfo psi = scope ProcessStartInfo();
|
||||||
psi.SetFileName(gApp.mSettings.mEditorSettings.mWindowsConsole);
|
psi.SetFileName(gApp.mSettings.mWindowsTerminal);
|
||||||
psi.SetWorkingDirectory(path);
|
psi.SetWorkingDirectory(path);
|
||||||
psi.UseShellExecute = true;
|
psi.UseShellExecute = true;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace IDE.ui
|
||||||
Compiler,
|
Compiler,
|
||||||
Debugger,
|
Debugger,
|
||||||
VisualStudio,
|
VisualStudio,
|
||||||
|
Terminal,
|
||||||
Wasm,
|
Wasm,
|
||||||
|
|
||||||
COUNT
|
COUNT
|
||||||
|
@ -61,6 +62,7 @@ namespace IDE.ui
|
||||||
AddCategoryItem(root, "Compiler");
|
AddCategoryItem(root, "Compiler");
|
||||||
AddCategoryItem(root, "Debugger");
|
AddCategoryItem(root, "Debugger");
|
||||||
AddCategoryItem(root, "Visual Studio");
|
AddCategoryItem(root, "Visual Studio");
|
||||||
|
AddCategoryItem(root, "Terminal");
|
||||||
AddCategoryItem(root, "Wasm");
|
AddCategoryItem(root, "Wasm");
|
||||||
|
|
||||||
if (!gApp.mSettings.mVSSettings.IsConfigured())
|
if (!gApp.mSettings.mVSSettings.IsConfigured())
|
||||||
|
@ -96,7 +98,6 @@ namespace IDE.ui
|
||||||
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
|
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
|
||||||
AddPropertiesItem(category, "Font", "mFonts");
|
AddPropertiesItem(category, "Font", "mFonts");
|
||||||
AddPropertiesItem(category, "Font Size", "mFontSize");
|
AddPropertiesItem(category, "Font Size", "mFontSize");
|
||||||
AddPropertiesItem(category, "Windows Console", "mWindowsConsole");
|
|
||||||
AddPropertiesItem(category, "Autocomplete", "mAutoCompleteShowKind");
|
AddPropertiesItem(category, "Autocomplete", "mAutoCompleteShowKind");
|
||||||
AddPropertiesItem(category, "Autocomplete Require Control", "mAutoCompleteRequireControl");
|
AddPropertiesItem(category, "Autocomplete Require Control", "mAutoCompleteRequireControl");
|
||||||
AddPropertiesItem(category, "Autocomplete Require Tab", "mAutoCompleteRequireTab");
|
AddPropertiesItem(category, "Autocomplete Require Tab", "mAutoCompleteRequireTab");
|
||||||
|
@ -169,6 +170,18 @@ namespace IDE.ui
|
||||||
category.Open(true, true);
|
category.Open(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PopulateTerminalOptions()
|
||||||
|
{
|
||||||
|
mCurPropertiesTarget = gApp.mSettings;
|
||||||
|
|
||||||
|
var root = (DarkListViewItem)mPropPage.mPropertiesListView.GetRoot();
|
||||||
|
var (category, propEntry) = AddPropertiesItem(root, "General");
|
||||||
|
category.mIsBold = true;
|
||||||
|
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
|
||||||
|
AddPropertiesItem(category, "Windows Terminal", "mWindowsTerminal");
|
||||||
|
category.Open(true, true);
|
||||||
|
}
|
||||||
|
|
||||||
void CommandContextToString(IDECommand.ContextFlags contextFlags, String str)
|
void CommandContextToString(IDECommand.ContextFlags contextFlags, String str)
|
||||||
{
|
{
|
||||||
bool isFirst = true;
|
bool isFirst = true;
|
||||||
|
@ -424,6 +437,8 @@ namespace IDE.ui
|
||||||
PopulateDebuggerOptions();
|
PopulateDebuggerOptions();
|
||||||
case .VisualStudio:
|
case .VisualStudio:
|
||||||
PopulateVSOptions();
|
PopulateVSOptions();
|
||||||
|
case .Terminal:
|
||||||
|
PopulateTerminalOptions();
|
||||||
case .Wasm:
|
case .Wasm:
|
||||||
PopulateWasmOptions();
|
PopulateWasmOptions();
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessStartInfo psi = scope ProcessStartInfo();
|
ProcessStartInfo psi = scope ProcessStartInfo();
|
||||||
psi.SetFileName(gApp.mSettings.mEditorSettings.mWindowsConsole);
|
psi.SetFileName(gApp.mSettings.mWindowsTerminal);
|
||||||
psi.UseShellExecute = true;
|
psi.UseShellExecute = true;
|
||||||
psi.SetWorkingDirectory(mPath);
|
psi.SetWorkingDirectory(mPath);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue