Skip to content

Commit

Permalink
Remove last lingering references to profiles.json (#5534)
Browse files Browse the repository at this point in the history
Literally just <kbd>ctrl+f</kbd> find-and-replace all the old `profiles.json` that are sitting around in the repo with `settings.json`. I didn't touch the specs, since it seemed better to leave them in the state that they were originally authored in.

* [x] closes #5522
* [x] I work here.
* [x] This is docs.
  • Loading branch information
zadjii-msft committed Apr 24, 2020
1 parent c803893 commit 757db46
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion doc/cascadia/SettingsSchema.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Profiles.json Documentation
# Settings.json Documentation

## Globals
Properties listed below affect the entire window, regardless of the profile settings.
Expand Down
5 changes: 3 additions & 2 deletions doc/user-docs/UsingJsonSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,17 @@ not affect a particular terminal instance.
Example settings include

```json
{
"defaultProfile" : "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
"initialCols" : 120,
"initialRows" : 50,
"requestedTheme" : "system",
"keybindings" : []
...
}
```

These global properties can exist either in the root json object, or in an
object under a root property `"globals"`.
These global properties should exist in the root json object.

## Key Bindings

Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/AppLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ namespace winrt::TerminalApp::implementation
wil::FolderChangeEvents::All,
[this, settingsPath](wil::FolderChangeEvent event, PCWSTR fileModified) {
// We want file modifications, AND when files are renamed to be
// profiles.json. This second case will oftentimes happen with text
// settings.json. This second case will oftentimes happen with text
// editors, who will write a temp file, then rename it to be the
// actual file you wrote. So listen for that too.
if (!(event == wil::FolderChangeEvent::Modified ||
Expand Down
10 changes: 5 additions & 5 deletions src/cascadia/TerminalApp/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ bool Profile::IsHidden() const noexcept
// Method Description:
// - Helper function for expanding any environment variables in a user-supplied starting directory and validating the resulting path
// Arguments:
// - The value from the profiles.json file
// - The value from the settings.json file
// Return Value:
// - The directory string with any environment variables expanded. If the resulting path is invalid,
// - the function returns an evaluated version of %userprofile% to avoid blocking the session from starting.
Expand Down Expand Up @@ -920,7 +920,7 @@ std::wstring Profile::EvaluateStartingDirectory(const std::wstring& directory)
// Method Description:
// - Helper function for converting a user-specified closeOnExit value to its corresponding enum
// Arguments:
// - The value from the profiles.json file
// - The value from the settings.json file
// Return Value:
// - The corresponding enum value which maps to the string provided by the user
CloseOnExitMode Profile::ParseCloseOnExitMode(const Json::Value& json)
Expand Down Expand Up @@ -974,7 +974,7 @@ std::string_view Profile::_SerializeCloseOnExitMode(const CloseOnExitMode closeO
// Method Description:
// - Helper function for converting a user-specified scrollbar state to its corresponding enum
// Arguments:
// - The value from the profiles.json file
// - The value from the settings.json file
// Return Value:
// - The corresponding enum value which maps to the string provided by the user
ScrollbarState Profile::ParseScrollbarState(const std::wstring& scrollbarState)
Expand All @@ -997,7 +997,7 @@ ScrollbarState Profile::ParseScrollbarState(const std::wstring& scrollbarState)
// - Helper function for converting a user-specified image stretch mode
// to the appropriate enum value
// Arguments:
// - The value from the profiles.json file
// - The value from the settings.json file
// Return Value:
// - The corresponding enum value which maps to the string provided by the user
Media::Stretch Profile::ParseImageStretchMode(const std::string_view imageStretchMode)
Expand Down Expand Up @@ -1047,7 +1047,7 @@ std::string_view Profile::SerializeImageStretchMode(const Media::Stretch imageSt
// - Helper function for converting a user-specified image horizontal and vertical
// alignment to the appropriate enum values tuple
// Arguments:
// - The value from the profiles.json file
// - The value from the settings.json file
// Return Value:
// - The corresponding enum values tuple which maps to the string provided by the user
std::tuple<HorizontalAlignment, VerticalAlignment> Profile::ParseImageAlignment(const std::string_view imageAlignment)
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
<Target Name="_TerminalAppGenerateDefaultsUniversalH" Inputs="..\defaults-universal.json" Outputs="Generated Files\defaults-universal.h" BeforeTargets="BeforeClCompile">
<Exec Command="powershell.exe -noprofile –ExecutionPolicy Unrestricted $(OpenConsoleDir)\tools\GenerateHeaderForJson.ps1 -JsonFile ..\defaults-universal.json -OutPath '&quot;Generated Files\defaults-universal.h&quot;' -VariableName DefaultUniversalJson" />
</Target>
<!-- Same as above, but for the default profiles.json template -->
<!-- Same as above, but for the default settings.json template -->
<Target Name="_TerminalAppGenerateUserSettingsH" Inputs="..\userDefaults.json" Outputs="Generated Files\userDefaults.h" BeforeTargets="BeforeClCompile">
<Exec Command="powershell.exe -noprofile –ExecutionPolicy Unrestricted $(OpenConsoleDir)\tools\GenerateHeaderForJson.ps1 -JsonFile ..\userDefaults.json -OutPath '&quot;Generated Files\userDefaults.h&quot;' -VariableName UserSettingsJson" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TerminalSchemeConsoleTarget : IConsoleTarget
{
public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode)
{
Console.WriteLine("Copy and paste the following text into the schemes array of your Windows Terminal profiles.json file to add this color scheme. (Don't forget to add a comma separator after the previous scheme.)");
Console.WriteLine("Copy and paste the following text into the schemes array of your Windows Terminal settings.json file to add this color scheme. (Don't forget to add a comma separator after the previous scheme.)");
Console.WriteLine("{");
Console.WriteLine($" \"name\": \"{colorScheme.Name}\",");

Expand All @@ -37,8 +37,8 @@ public void ApplyColorScheme(ColorScheme colorScheme, bool quietMode)
{
uint r = color & (0x000000ff);
uint g = (color & (0x0000ff00)) >> 8;
uint b = (color & (0x00ff0000)) >> 16;
Console.WriteLine($" \"{name}\": \"#{r:X2}{g:X2}{b:X2}\"{(last ? "" : ",")}");
uint b = (color & (0x00ff0000)) >> 16;
Console.WriteLine($" \"{name}\": \"#{r:X2}{g:X2}{b:X2}\"{(last ? "" : ",")}");

This comment has been minimized.

Copy link
@HBelusca

HBelusca Apr 25, 2020

Contributor

What has been changed here? 🤔

This comment has been minimized.

Copy link
@DHowett-MSFT

DHowett-MSFT Apr 25, 2020

Contributor

Wow, great question. Maybe we had a single bad line ending and it got renormalized :)

};
if (colorScheme.ConsoleAttributes.Foreground.HasValue)
{
Expand Down

0 comments on commit 757db46

Please sign in to comment.