File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -503,7 +503,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseLayoutMenuItems(Curren
503
503
} ,
504
504
new ContextMenuFlyoutItemViewModel ( )
505
505
{
506
- Text = " OpenIn". GetLocalized ( ) + " " + App . TerminalController . Model . GetDefaultTerminal ( ) . Name ,
506
+ Text = $ " { " OpenIn". GetLocalized ( ) } { App . TerminalController . Model . GetDefaultTerminal ( ) ? . Name } " ,
507
507
Glyph = "\uE756 " ,
508
508
Command = commandsViewModel . OpenDirectoryInDefaultTerminalCommand ,
509
509
} ,
Original file line number Diff line number Diff line change 923
923
x : Load =" {x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
924
924
Command =" {x:Bind ViewModel.OpenDirectoryInDefaultTerminalCommand, Mode=OneWay}"
925
925
IsEnabled =" {x:Bind ViewModel.InstanceViewModel.CanOpenTerminalInPage, Mode=OneWay}"
926
- Label =" {helpers:ResourceString Name= OpenInTerminal}" >
926
+ Label =" {x:Bind ViewModel. OpenInTerminal, Mode=OneWay }" >
927
927
<AppBarButton .Icon>
928
928
<FontIcon Glyph ="  " />
929
929
</AppBarButton .Icon>
Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ public NavToolbarViewModel()
331
331
dragOverTimer = DispatcherQueue . GetForCurrentThread ( ) . CreateTimer ( ) ;
332
332
SearchBox . Escaped += SearchRegion_Escaped ;
333
333
UserSettingsService . OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent ;
334
+ App . TerminalController . ModelChanged += OnTerminalsChanged ;
334
335
}
335
336
336
337
private void UserSettingsService_OnSettingChangedEvent ( object sender , EventArguments . SettingChangedEventArgs e )
@@ -1157,10 +1158,18 @@ public List<ListedItem> SelectedItems
1157
1158
public bool IsInfFile => SelectedItems is not null && SelectedItems . Count == 1 && FileExtensionHelpers . IsInfFile ( SelectedItems . First ( ) . FileExtension ) ;
1158
1159
public bool IsFont => SelectedItems is not null && SelectedItems . Any ( ) && SelectedItems . All ( x => FileExtensionHelpers . IsFontFile ( x . FileExtension ) ) ;
1159
1160
1161
+ public string OpenInTerminal => $ "{ "OpenIn" . GetLocalized ( ) } { App . TerminalController . Model . GetDefaultTerminal ( ) ? . Name } ";
1162
+
1163
+ private void OnTerminalsChanged ( object _ )
1164
+ {
1165
+ OnPropertyChanged ( nameof ( OpenInTerminal ) ) ;
1166
+ }
1167
+
1160
1168
public void Dispose ( )
1161
1169
{
1162
1170
SearchBox . Escaped -= SearchRegion_Escaped ;
1163
1171
UserSettingsService . OnSettingChangedEvent -= UserSettingsService_OnSettingChangedEvent ;
1172
+ App . TerminalController . ModelChanged -= OnTerminalsChanged ;
1164
1173
1165
1174
InstanceViewModel . FolderSettings . SortDirectionPreferenceUpdated -= FolderSettings_SortDirectionPreferenceUpdated ;
1166
1175
InstanceViewModel . FolderSettings . SortOptionPreferenceUpdated -= FolderSettings_SortOptionPreferenceUpdated ;
You can’t perform that action at this time.
0 commit comments