* Added icon to "Recent >" menu item. * Refactored app menu implementation, and implemented keyboard accelerators. Still doesn't work though. * Few things fixed, but still doesn't work. * Clicking menu items works. * Fixing an issue with resources. * New menu binding implemented. Still doesn't work though. * Menu displayed properly, except for "Settings". * Menu works, but it doesn't refresh. * Works. But needs to be polished. * All known issues with the new app menu solved. * Significantly simplifying app menu binding. * Removing some obsolete classes. * Menu binding mechanism additionally optimized for performances. * Removing unused translations. * Further refactoring app menu binding, in order to make it more general. * Renaming menu items in order to make them usable for both new tab and new window commands. * Changing menu item keyboard accelerators based on new tab / window settings. * Menu item keyboard accelerators are dynamically changing with chainging terminals in new tabs/windows option. * New tab / window settings honored for top level menu items. * New window mechanism simplified. Terminal-launching code refactored to be more readable. A bug with "SSH Info" fixed. * Merging the latest changed. * Fixing some after-merge issues. * Minor refactoring. * Minor refactoring. * Default profile menu item now contains the profile name. Still doesn't update though. * Default profile name in the menu item now updates. * Updating resources from POEditor. * New tab/window cascading menues implemented. * Reverting translations back to the correct (the latest) version. * Undoing translation changes from the last commit. I've made these by mistake. * Configurable tab/window cascading menu. * "Application menu type" settings value added. * Minor spelling fix. * Fixing some after-merge issues.
238 lines
11 KiB
XML
238 lines
11 KiB
XML
<Page
|
|
x:Class="FluentTerminal.App.Views.SettingsPages.GeneralSettings"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:converters="using:FluentTerminal.App.Converters"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<converters:BooleanNegationConverter x:Key="BooleanNegationConverter" />
|
|
</Page.Resources>
|
|
|
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="32" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="1" Margin="{StaticResource HeaderMargin}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
x:Uid="General"
|
|
Margin="0,10,0,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="28"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="General" />
|
|
<CommandBar
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
|
|
DefaultLabelPosition="Right">
|
|
<AppBarButton
|
|
x:Uid="Restore"
|
|
Command="{x:Bind ViewModel.RestoreDefaultsCommand}"
|
|
Icon="Undo"
|
|
Label="Restore Defaults" />
|
|
</CommandBar>
|
|
</Grid>
|
|
<ScrollViewer Grid.Row="2">
|
|
<StackPanel Margin="{StaticResource ContainerMargin}">
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<ComboBox
|
|
x:Uid="Language"
|
|
Width="200"
|
|
Header="Language"
|
|
ItemsSource="{x:Bind ViewModel.Languages}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedLanguage, Mode=TwoWay}" />
|
|
<TextBlock
|
|
x:Uid="NeedsToRestart"
|
|
Foreground="Red"
|
|
Visibility="{x:Bind ViewModel.NeedsToRestart, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
</StackPanel>
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<ToggleSwitch
|
|
x:Uid="RunOnStartup"
|
|
Header="Run on startup"
|
|
IsEnabled="{x:Bind ViewModel.CanEnableStartupTask, Mode=OneWay}"
|
|
IsOn="{x:Bind ViewModel.StartupTaskEnabled, Mode=TwoWay}" />
|
|
<TextBlock
|
|
Foreground="Red"
|
|
Text="{x:Bind ViewModel.StartupTaskErrorMessage, Mode=OneWay}"
|
|
Visibility="{x:Bind ViewModel.CanEnableStartupTask, Mode=OneWay, Converter={StaticResource FalseToVisibleConverter}}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<ToggleSwitch
|
|
x:Uid="SystemTray"
|
|
Header="Show in system tray"
|
|
IsOn="{x:Bind ViewModel.EnableTrayIcon, Mode=TwoWay}" />
|
|
<TextBlock
|
|
x:Uid="NeedRelaunch"
|
|
Foreground="Red"
|
|
Text="Relaunch required to apply setting"
|
|
Visibility="{x:Bind ViewModel.ShouldRestartForTrayMessage, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock
|
|
x:Uid="OpenNewTerminalAs"
|
|
Margin="0,0,0,8"
|
|
Text="Open new terminals as" />
|
|
<RadioButton
|
|
x:Uid="ONTA_Tabs"
|
|
Content="Tabs"
|
|
GroupName="NewTerminalLocation"
|
|
IsChecked="{x:Bind ViewModel.TabIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
x:Uid="ONTA_Windows"
|
|
Content="Windows"
|
|
GroupName="NewTerminalLocation"
|
|
IsChecked="{x:Bind ViewModel.TabIsSelected, Mode=TwoWay, Converter={StaticResource BooleanNegationConverter}}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock
|
|
x:Uid="AppMenuType"
|
|
Margin="0,0,0,8"
|
|
Text="Application menu type" />
|
|
<RadioButton
|
|
x:Uid="AppMenuType_Flat"
|
|
Content="Flat, honoring 'Open new terminals as' setting"
|
|
GroupName="AppMenuType"
|
|
IsChecked="{x:Bind ViewModel.TabWindowCascadingAppMenu, Mode=TwoWay, Converter={StaticResource BooleanNegationConverter}}" />
|
|
<RadioButton
|
|
x:Uid="AppMenuType_Cascading"
|
|
Content="'New Tab' / 'New Window' cascading"
|
|
GroupName="AppMenuType"
|
|
IsChecked="{x:Bind ViewModel.TabWindowCascadingAppMenu, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock
|
|
x:Uid="TabsPostion"
|
|
Margin="0,0,0,8"
|
|
Text="Show tabs on" />
|
|
<RadioButton
|
|
x:Uid="TP_Top"
|
|
Content="Top"
|
|
GroupName="TabsPosition"
|
|
IsChecked="{x:Bind ViewModel.TopIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
x:Uid="TP_Bottom"
|
|
Content="Bottom"
|
|
GroupName="TabsPosition"
|
|
IsChecked="{x:Bind ViewModel.BottomIsSelected, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<ToggleSwitch
|
|
x:Uid="CustomTitle"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Show custom tab title also in titlebar"
|
|
IsOn="{x:Bind ViewModel.ShowCustomTitleInTitlebar, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="UnderlineTab"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Underline selected tab"
|
|
IsOn="{x:Bind ViewModel.UnderlineSelectedTab, Mode=TwoWay}" />
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<TextBlock
|
|
x:Uid="ColorInactiveTabs"
|
|
Margin="0,0,0,8"
|
|
Text="Color on inactive tabs" />
|
|
<RadioButton
|
|
x:Uid="Background"
|
|
Content="Background"
|
|
GroupName="InactiveTabColorMode"
|
|
IsChecked="{x:Bind ViewModel.BackgroundIsSelected, Mode=TwoWay}" />
|
|
<RadioButton
|
|
x:Uid="Underline"
|
|
Content="Underline"
|
|
GroupName="InactiveTabColorMode"
|
|
IsChecked="{x:Bind ViewModel.UnderlinedIsSelected, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<ToggleSwitch
|
|
x:Uid="ConfirmWindowClosing"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Ask before closing windows"
|
|
IsOn="{x:Bind ViewModel.ConfirmClosingWindows, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="ConfirmTabClosing"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Ask before closing tabs"
|
|
IsOn="{x:Bind ViewModel.ConfirmClosingTabs, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="IndicatorOutput"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Show new output indicator on background tabs"
|
|
IsOn="{x:Bind ViewModel.ShowNewOutputIndicator, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="UseMoshByDefault"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Default to Mosh for SSH connections"
|
|
IsOn="{x:Bind ViewModel.UseMoshByDefault, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="AutoFallbackToWindowsUsername"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Use Windows username when opening SSH URLs that don't specify one"
|
|
IsOn="{x:Bind ViewModel.AutoFallbackToWindowsUsernameInLinks, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="RTrimCopiedLines"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Right trim copied lines"
|
|
IsOn="{x:Bind ViewModel.RTrimCopiedLines, Mode=TwoWay}" />
|
|
|
|
<ToggleSwitch
|
|
x:Uid="MuteTerminalBeeps"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="Mute terminal beeps"
|
|
IsOn="{x:Bind ViewModel.MuteTerminalBeeps, Mode=TwoWay}" />
|
|
|
|
<StackPanel Margin="{StaticResource ItemMargin}">
|
|
<ToggleSwitch
|
|
x:Uid="EnableLogging"
|
|
Header="Enable Logging"
|
|
IsOn="{x:Bind ViewModel.EnableLogging, Mode=TwoWay}" />
|
|
<CheckBox
|
|
x:Uid="PrintableOutputOnly"
|
|
Content="Printable output only"
|
|
IsEnabled="{x:Bind ViewModel.EnableLogging, Mode=OneWay}"
|
|
IsChecked="{x:Bind ViewModel.PrintableOutputOnly, Mode=TwoWay}" />
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<TextBox
|
|
x:Uid="LogDirectoryPath"
|
|
Text="{x:Bind ViewModel.LogDirectoryPath, Mode=TwoWay}"
|
|
IsEnabled="{x:Bind ViewModel.EnableLogging, Mode=OneWay}"
|
|
MaxWidth="250" MinWidth="250" />
|
|
<Button
|
|
x:Uid="BrowseButton"
|
|
Command="{x:Bind ViewModel.BrowseLogDirectoryCommand}"
|
|
Content="Browse"
|
|
IsEnabled="{x:Bind ViewModel.EnableLogging, Mode=OneWay}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<ToggleSwitch
|
|
x:Uid="UseConPty"
|
|
Margin="{StaticResource ItemMargin}"
|
|
Header="{x:Bind Converter={StaticResource I18NConverter}, ConverterParameter=UseConPty}"
|
|
IsOn="{x:Bind ViewModel.UseConPty, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Page>
|