Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access keys for settings window #5409

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Rubberduck.Core/UI/Controls/SearchBox.xaml.cs
Expand Up @@ -56,6 +56,8 @@ public string Hint

public ICommand ClearSearchCommand => new DelegateCommand(LogManager.GetCurrentClassLogger(), (arg) => Text = string.Empty);

public TextBox ValueContainerInput { get; }

public SearchBox()
{
// design instance!
Expand All @@ -66,6 +68,7 @@ public SearchBox()
Background = SystemColors.WindowBrush;
// not so much design instance
InitializeComponent();
ValueContainerInput = ValueContainer;
}
}
}
11 changes: 6 additions & 5 deletions Rubberduck.Core/UI/Settings/AutoCompleteSettings.xaml
Expand Up @@ -55,9 +55,8 @@
</StackPanel>
</DockPanel>
</Label>
<CheckBox Margin="10,0" VerticalContentAlignment="Center" IsChecked="{Binding IsEnabled}">
<Label Content="{Resx ResxName=Rubberduck.Resources.Settings.AutoCompletesPage, Key=EnableAutocompleteLabel}"/>
</CheckBox>
<CheckBox Margin="10,0" VerticalContentAlignment="Center" IsChecked="{Binding IsEnabled}"
Content="{Resx ResxName=Rubberduck.Resources.Settings.AutoCompletesPage, Key=EnableAutocompleteLabel}" />

<Label Margin="10"
Content="{Resx ResxName=Rubberduck.Resources.Settings.AutoCompletesPage, Key=SelfClosingPairs}"
Expand All @@ -79,9 +78,11 @@
IsChecked="{Binding ConcatVbNewLine}"
Content="{Resx ResxName=Rubberduck.Resources.Settings.AutoCompletesPage, Key=ConcatVbNewLine}" />

<Label Margin="15,0,15,0" Content="{Resx ResxName=Rubberduck.Resources.Settings.AutoCompletesPage, Key=MaxConcatLines}" />
<Label Target="{Binding ElementName=maximumLines}"
Margin="15,0,15,0" Content="{Resx ResxName=Rubberduck.Resources.Settings.AutoCompletesPage, Key=MaxConcatLines}" />
<StackPanel Orientation="Horizontal" Margin="15,0,15,0">
<TextBox Margin="5,5,0,5" Height="24" Width="50" Text="{Binding ConcatMaxLines, Mode=TwoWay, StringFormat=\{0:D\}, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" VerticalAlignment="Top" VerticalContentAlignment="Center" />
<TextBox x:Name="maximumLines"
Margin="5,5,0,5" Height="24" Width="50" Text="{Binding ConcatMaxLines, Mode=TwoWay, StringFormat=\{0:D\}, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" VerticalAlignment="Top" VerticalContentAlignment="Center" />
<StackPanel Margin="0,5" >
<Button Height="12" Width="20" Command="{Binding IncrementMaxConcatLinesCommand}">
<TextBlock Text="▲" FontSize="10" Margin="0,-4,0,0"/>
Expand Down
12 changes: 8 additions & 4 deletions Rubberduck.Core/UI/Settings/GeneralSettings.xaml
Expand Up @@ -72,8 +72,10 @@
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"/>
</DockPanel>
</Label>
<Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GeneralSettings_LanguageLabel}" FontWeight="SemiBold" />
<ComboBox Width="210"
<Label Target="{Binding ElementName=displayLanguage}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GeneralSettings_LanguageLabel}" FontWeight="SemiBold" />
<ComboBox x:Name="displayLanguage"
Width="210"
HorizontalAlignment="Left"
Margin="5"
SelectedItem="{Binding SelectedLanguage, Mode=TwoWay}"
Expand All @@ -98,9 +100,11 @@
IsChecked="{Binding EnableFolderDragAndDrop}" />
<StackPanel Orientation="Horizontal"/>

<Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GeneralSettings_MinimumLogLevelLabel}" FontWeight="SemiBold" />
<Label Target="{Binding ElementName=minimumLogLevel}"
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=GeneralSettings_MinimumLogLevelLabel}" FontWeight="SemiBold" Margin="1,0,-1,0" />
<StackPanel Orientation="Horizontal">
<ComboBox Width="210"
<ComboBox x:Name="minimumLogLevel"
Width="210"
HorizontalAlignment="Left"
Margin="5"
SelectedItem="{Binding SelectedLogLevel, Mode=TwoWay}"
Expand Down
14 changes: 10 additions & 4 deletions Rubberduck.Core/UI/Settings/InspectionSettings.xaml
Expand Up @@ -61,12 +61,18 @@
</StackPanel.Resources>
<Label Content="-" />
<Image Source="{StaticResource FilterImage}" Width="19" />
<Label Content="{Resx Key=InspectionSettings_FilterByDescription, ResxName=Rubberduck.Resources.RubberduckUI}" />
<controls:SearchBox Width="100"
<Label Target="{Binding ElementName=searchBox, Path=ValueContainerInput}"
Content="{Resx Key=InspectionSettings_FilterByDescription, ResxName=Rubberduck.Resources.RubberduckUI}" />
<controls:SearchBox x:Name="searchBox"
Width="100"
Text="{Binding InspectionSettingsDescriptionFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="26" />
<Border Width="10" />
<Label Content="{Resx Key=InspectionSettings_FilterBySeverity, ResxName=Rubberduck.Resources.RubberduckUI}" />
<ComboBox Width="100"

<Label Target="{Binding ElementName=severity}"
Content="{Resx Key=InspectionSettings_FilterBySeverity, ResxName=Rubberduck.Resources.RubberduckUI}" />
<ComboBox x:Name="severity"
Width="100"
VerticalContentAlignment="Center"
ItemsSource="{Binding SeverityFilters, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedSeverityFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
Expand Down
8 changes: 6 additions & 2 deletions Rubberduck.Core/UI/Settings/UnitTestSettings.xaml
Expand Up @@ -78,16 +78,20 @@
</DockPanel>
</Label>
<Label Content="{Resx ResxName=Rubberduck.Resources.Settings.UnitTestingPage, Key=UnitTestSettings_BindingMode}"
Target="{Binding ElementName=bindingMode}"
FontWeight="SemiBold" />
<ComboBox Margin="5,0,0,5"
<ComboBox x:Name="bindingMode"
Margin="5,0,0,5"
Width="210"
HorizontalAlignment="Left"
ItemsSource="{Binding Source={StaticResource BindingMode}, Converter={StaticResource BindingModeToText}, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding BindingMode, Converter={StaticResource BindingModeValueToText}}" />

<Label Content="{Resx ResxName=Rubberduck.Resources.Settings.UnitTestingPage, Key=UnitTestSettings_AssertMode}"
Target="{Binding ElementName=typeSafety}"
FontWeight="SemiBold" />
<ComboBox Margin="5,0,0,5"
<ComboBox x:Name="typeSafety"
Margin="5,0,0,5"
Width="210"
HorizontalAlignment="Left"
ItemsSource="{Binding Source={StaticResource AssertMode}, Converter={StaticResource AssertModeToText}, UpdateSourceTrigger=PropertyChanged}"
Expand Down
6 changes: 3 additions & 3 deletions Rubberduck.Core/UI/Settings/WindowSettings.xaml
Expand Up @@ -40,19 +40,19 @@
</Label>
<Label Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=WindowSettings_StartupVisibilityHeader}"
FontWeight="SemiBold" />
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorerDockablePresenter_Caption}"
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorerWindowSettings_AccessKey}"
IsChecked="{Binding CodeExplorerVisibleOnStartup, Mode=TwoWay}"
Margin="5,0,0,5"
HorizontalAlignment="Left" />
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=CodeInspections}"
IsChecked="{Binding CodeInspectionsVisibleOnStartup, Mode=TwoWay}"
Margin="5,0,0,5"
HorizontalAlignment="Left" />
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorerWindow_Caption}"
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorerWindow_AccessKey}"
IsChecked="{Binding TestExplorerVisibleOnStartup, Mode=TwoWay}"
Margin="5,0,0,5"
HorizontalAlignment="Left" />
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=TodoExplorer_Caption}"
<CheckBox Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=TodoExplorer_AccessKey}"
IsChecked="{Binding TodoExplorerVisibleOnStartup, Mode=TwoWay}"
Margin="5,0,0,5"
HorizontalAlignment="Left" />
Expand Down
11 changes: 10 additions & 1 deletion Rubberduck.Resources/CodeExplorer/CodeExplorerUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Rubberduck.Resources/CodeExplorer/CodeExplorerUI.resx
Expand Up @@ -461,4 +461,7 @@ Continue?</value>
<data name="CodeExplorer_Annotate" xml:space="preserve">
<value>Annotate</value>
</data>
<data name="CodeExplorerWindowSettings_AccessKey" xml:space="preserve">
<value>Code _Explorer</value>
</data>
</root>
35 changes: 22 additions & 13 deletions Rubberduck.Resources/RubberduckUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.