Skip to content

Commit 61c95db

Browse files
Change "Friendly name" to just "Name"
1 parent ac56666 commit 61c95db

File tree

7 files changed

+46
-49
lines changed

7 files changed

+46
-49
lines changed

src/Files.App/Actions/Open/OpenInIDEAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ internal sealed partial class OpenInIDEAction : ObservableObject, IAction
1212
public string Label
1313
=> string.Format(
1414
"OpenInIDE".GetLocalizedResource(),
15-
_devToolsSettingsService.IDEFriendlyName);
15+
_devToolsSettingsService.IDEName);
1616

1717
public string Description
1818
=> string.Format(
1919
"OpenInIDEDescription".GetLocalizedResource(),
20-
_devToolsSettingsService.IDEFriendlyName);
20+
_devToolsSettingsService.IDEName);
2121

2222
public bool IsExecutable =>
2323
_context.Folder is not null &&
@@ -39,7 +39,7 @@ public async Task ExecuteAsync(object? parameter = null)
3939
);
4040

4141
if (!res)
42-
await DynamicDialogFactory.ShowFor_IDEErrorDialog(_devToolsSettingsService.IDEFriendlyName);
42+
await DynamicDialogFactory.ShowFor_IDEErrorDialog(_devToolsSettingsService.IDEName);
4343
}
4444

4545
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
@@ -54,7 +54,7 @@ private void DevSettings_PropertyChanged(object? sender, PropertyChangedEventArg
5454
{
5555
OnPropertyChanged(nameof(IsExecutable));
5656
}
57-
else if (e.PropertyName == nameof(IDevToolsSettingsService.IDEFriendlyName))
57+
else if (e.PropertyName == nameof(IDevToolsSettingsService.IDEName))
5858
{
5959
OnPropertyChanged(nameof(Label));
6060
OnPropertyChanged(nameof(Description));

src/Files.App/Actions/Open/OpenRepoInIDEAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ internal sealed partial class OpenRepoInIDEAction : ObservableObject, IAction
1010
private readonly IContentPageContext _context;
1111

1212
public string Label
13-
=> string.Format("OpenRepoInIDE".GetLocalizedResource(), _devToolsSettingsService.IDEFriendlyName);
13+
=> string.Format("OpenRepoInIDE".GetLocalizedResource(), _devToolsSettingsService.IDEName);
1414

1515
public string Description
16-
=> string.Format("OpenRepoInIDEDescription".GetLocalizedResource(), _devToolsSettingsService.IDEFriendlyName);
16+
=> string.Format("OpenRepoInIDEDescription".GetLocalizedResource(), _devToolsSettingsService.IDEName);
1717

1818
public bool IsExecutable =>
1919
_context.Folder is not null &&
@@ -36,7 +36,7 @@ public async Task ExecuteAsync(object? parameter = null)
3636
);
3737

3838
if (!res)
39-
await DynamicDialogFactory.ShowFor_IDEErrorDialog(_devToolsSettingsService.IDEFriendlyName);
39+
await DynamicDialogFactory.ShowFor_IDEErrorDialog(_devToolsSettingsService.IDEName);
4040
}
4141

4242
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
@@ -51,7 +51,7 @@ private void DevSettings_PropertyChanged(object? sender, PropertyChangedEventArg
5151
{
5252
OnPropertyChanged(nameof(IsExecutable));
5353
}
54-
else if (e.PropertyName == nameof(IDevToolsSettingsService.IDEFriendlyName))
54+
else if (e.PropertyName == nameof(IDevToolsSettingsService.IDEName))
5555
{
5656
OnPropertyChanged(nameof(Label));
5757
OnPropertyChanged(nameof(Description));

src/Files.App/Data/Contracts/IDevToolsSettingsService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public interface IDevToolsSettingsService : IBaseSettingsService, INotifyPropert
1616
string IDEPath { get; set; }
1717

1818
/// <summary>
19-
/// Gets or sets the friendly name of the chosen IDE.
19+
/// Gets or sets the name of the chosen IDE.
2020
/// </summary>
21-
string IDEFriendlyName { get; set; }
21+
string IDEName { get; set; }
2222
}
2323
}

src/Files.App/Services/Settings/DevToolsSettingsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public string IDEPath
2626
}
2727

2828
/// <inheritdoc/>
29-
public string IDEFriendlyName
29+
public string IDEName
3030
{
3131
get => Get(SoftwareHelpers.IsVSCodeInstalled() ? Strings.VisualStudioCode.GetLocalizedResource() : string.Empty) ?? string.Empty;
3232
set => Set(value);

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4043,9 +4043,6 @@
40434043
<value>Add to shelf</value>
40444044
<comment>Tooltip that displays when dragging items to the Shelf Pane</comment>
40454045
</data>
4046-
<data name="FriendlyName" xml:space="preserve">
4047-
<value>Friendly name</value>
4048-
</data>
40494046
<data name="PathOrAlias" xml:space="preserve">
40504047
<value>Path or alias</value>
40514048
</data>
@@ -4070,7 +4067,7 @@
40704067
<data name="IDEPathPlaceholder" xml:space="preserve">
40714068
<value>Enter a path or launch alias</value>
40724069
</data>
4073-
<data name="InvalidFriendlyNameError" xml:space="preserve">
4070+
<data name="InvalidIDENameError" xml:space="preserve">
40744071
<value>Please, enter a name for the IDE</value>
40754072
</data>
40764073
</root>

src/Files.App/ViewModels/Settings/DevToolsViewModel.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public bool IsEditingIDEConfig
3737
}
3838

3939
public bool CanSaveIDEChanges =>
40-
IsFriendlyNameValid && IsIDEPathValid;
40+
IsIDENameValid && IsIDEPathValid;
4141

4242
private bool _IsIDEPathValid;
4343
public bool IsIDEPathValid
@@ -46,11 +46,11 @@ public bool IsIDEPathValid
4646
set => SetProperty(ref _IsIDEPathValid, value);
4747
}
4848

49-
private bool _IsFriendlyNameValid;
50-
public bool IsFriendlyNameValid
49+
private bool _IsIDENameValid;
50+
public bool IsIDENameValid
5151
{
52-
get => _IsFriendlyNameValid;
53-
set => SetProperty(ref _IsFriendlyNameValid, value);
52+
get => _IsIDENameValid;
53+
set => SetProperty(ref _IsIDENameValid, value);
5454
}
5555

5656
private string _IDEPath;
@@ -72,15 +72,15 @@ public string IDEPath
7272
}
7373
}
7474

75-
private string _IDEFriendlyName;
76-
public string IDEFriendlyName
75+
private string _IDEName;
76+
public string IDEName
7777
{
78-
get => _IDEFriendlyName;
78+
get => _IDEName;
7979
set
8080
{
81-
if (SetProperty(ref _IDEFriendlyName, value))
81+
if (SetProperty(ref _IDEName, value))
8282
{
83-
IsFriendlyNameValid = !string.IsNullOrEmpty(value);
83+
IsIDENameValid = !string.IsNullOrEmpty(value);
8484
OnPropertyChanged(nameof(CanSaveIDEChanges));
8585
}
8686
}
@@ -94,9 +94,9 @@ public DevToolsViewModel()
9494
SelectedOpenInIDEOption = OpenInIDEOptions[DevToolsSettingsService.OpenInIDEOption];
9595

9696
IDEPath = DevToolsSettingsService.IDEPath;
97-
IDEFriendlyName = DevToolsSettingsService.IDEFriendlyName;
97+
IDEName = DevToolsSettingsService.IDEName;
9898
IsIDEPathValid = true;
99-
IsFriendlyNameValid = true;
99+
IsIDENameValid = true;
100100

101101
IsLogoutEnabled = GitHelpers.GetSavedCredentials() != string.Empty;
102102

@@ -141,18 +141,18 @@ private void DoCancelIDEChanges()
141141
{
142142
IsEditingIDEConfig = false;
143143
IDEPath = DevToolsSettingsService.IDEPath;
144-
IDEFriendlyName = DevToolsSettingsService.IDEFriendlyName;
144+
IDEName = DevToolsSettingsService.IDEName;
145145
IsIDEPathValid = true;
146-
IsFriendlyNameValid = true;
146+
IsIDENameValid = true;
147147
}
148148

149149
private void DoSaveIDEChanges()
150150
{
151151
IsEditingIDEConfig = false;
152152
IsIDEPathValid = true;
153-
IsFriendlyNameValid = true;
153+
IsIDENameValid = true;
154154
DevToolsSettingsService.IDEPath = IDEPath;
155-
DevToolsSettingsService.IDEFriendlyName = IDEFriendlyName;
155+
DevToolsSettingsService.IDEName = IDEName;
156156
}
157157

158158
private void DoStartEditingIDE()

src/Files.App/Views/Settings/DevToolsPage.xaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,44 +77,44 @@
7777
<RowDefinition Height="*" />
7878
</Grid.RowDefinitions>
7979

80-
<!-- IDE Friendly Name -->
80+
<!-- IDE Name -->
8181
<TextBlock
82-
x:Name="IDEFriendlyName"
82+
x:Name="IDEName"
8383
MaxWidth="200"
8484
VerticalAlignment="Center"
8585
x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}"
8686
LineHeight="18"
87-
Text="{helpers:ResourceString Name=FriendlyName}"
87+
Text="{helpers:ResourceString Name=Name}"
8888
TextTrimming="CharacterEllipsis" />
8989

9090
<TextBlock
9191
Grid.Column="1"
9292
VerticalAlignment="Center"
9393
FontWeight="SemiBold"
94-
Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay}"
94+
Text="{x:Bind ViewModel.IDEName, Mode=TwoWay}"
9595
Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" />
9696

9797
<TextBox
98-
x:Name="IDEFriendlyNameTextBox"
98+
x:Name="IDENameTextBox"
9999
Grid.ColumnSpan="2"
100100
Width="300"
101101
HorizontalAlignment="Left"
102102
VerticalAlignment="Center"
103-
PlaceholderText="{helpers:ResourceString Name=FriendlyName}"
104-
Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
103+
PlaceholderText="{helpers:ResourceString Name=Name}"
104+
Text="{x:Bind ViewModel.IDEName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
105105
Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}">
106106
<TextBox.Resources>
107107
<SolidColorBrush x:Key="TextControlBackgroundFocused" Color="{ThemeResource SolidBackgroundFillColorSecondary}" />
108108
<TeachingTip
109-
x:Name="InvalidFriendlyNameWarning"
110-
Title="{helpers:ResourceString Name=InvalidFriendlyNameError}"
109+
x:Name="InvalidIDENameWarning"
110+
Title="{helpers:ResourceString Name=InvalidIDENameError}"
111111
IsLightDismissEnabled="True"
112-
IsOpen="{x:Bind ViewModel.IsFriendlyNameValid, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}"
112+
IsOpen="{x:Bind ViewModel.IsIDENameValid, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}"
113113
PreferredPlacement="Bottom"
114-
Target="{x:Bind IDEFriendlyNameTextBox}" />
114+
Target="{x:Bind IDENameTextBox}" />
115115
</TextBox.Resources>
116116
<TextBox.Header>
117-
<TextBlock Text="{helpers:ResourceString Name=FriendlyName}" />
117+
<TextBlock Text="{helpers:ResourceString Name=Name}" />
118118
</TextBox.Header>
119119
</TextBox>
120120

@@ -254,9 +254,9 @@
254254
<Setter Target="IDEPathTextBox.Width" Value="300" />
255255
<Setter Target="IDEPathTextBox.HorizontalAlignment" Value="Left" />
256256
<Setter Target="IDEPathTextBox.(Grid.Column)" Value="0" />
257-
<Setter Target="IDEFriendlyNameTextBox.Width" Value="300" />
258-
<Setter Target="IDEFriendlyNameTextBox.HorizontalAlignment" Value="Left" />
259-
<Setter Target="IDEFriendlyNameTextBox.(Grid.ColumnSpan)" Value="2" />
257+
<Setter Target="IDENameTextBox.Width" Value="300" />
258+
<Setter Target="IDENameTextBox.HorizontalAlignment" Value="Left" />
259+
<Setter Target="IDENameTextBox.(Grid.ColumnSpan)" Value="2" />
260260
<Setter Target="PickIDEExe.(Grid.Column)" Value="1" />
261261
<Setter Target="PickIDEExe.(Grid.Row)" Value="0" />
262262
<Setter Target="IDEPathGrid.Spacing" Value="8" />
@@ -268,9 +268,9 @@
268268
<Setter Target="IDEPathTextBox.Width" Value="Auto" />
269269
<Setter Target="IDEPathTextBox.HorizontalAlignment" Value="Stretch" />
270270
<Setter Target="IDEPathTextBox.(Grid.Column)" Value="3" />
271-
<Setter Target="IDEFriendlyNameTextBox.Width" Value="Auto" />
272-
<Setter Target="IDEFriendlyNameTextBox.HorizontalAlignment" Value="Stretch" />
273-
<Setter Target="IDEFriendlyNameTextBox.(Grid.ColumnSpan)" Value="3" />
271+
<Setter Target="IDENameTextBox.Width" Value="Auto" />
272+
<Setter Target="IDENameTextBox.HorizontalAlignment" Value="Stretch" />
273+
<Setter Target="IDENameTextBox.(Grid.ColumnSpan)" Value="3" />
274274
<Setter Target="PickIDEExe.(Grid.Column)" Value="3" />
275275
<Setter Target="PickIDEExe.(Grid.Row)" Value="1" />
276276
<Setter Target="IDEPathGrid.Spacing" Value="12" />

0 commit comments

Comments
 (0)