Skip to content

Commit 2adb577

Browse files
committed
Remove mining mode reminder text
Change the default value of the "Hide all buttons when mouse is not over the title bar" option to true
1 parent 4d9dd4c commit 2adb577

File tree

4 files changed

+1
-35
lines changed

4 files changed

+1
-35
lines changed

JL.Windows/ConfigManager.cs

+1-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal sealed class ConfigManager
5353
public bool DisableLookupsForNonJapaneseCharsInMainWindow { get; private set; } // = false;
5454
public bool MainWindowFocusOnHover { get; private set; } // = false;
5555
public bool SteppedBacklogWithMouseWheel { get; private set; } = true;
56-
public bool HideAllTitleBarButtonsWhenMouseIsNotOverTitleBar { get; set; } // = false;
56+
public bool HideAllTitleBarButtonsWhenMouseIsNotOverTitleBar { get; set; } = true;
5757
public bool EnableBacklog { get; private set; } = true;
5858
public bool AutoSaveBacklogBeforeClosing { get; private set; } // = false;
5959
public bool TextToSpeechOnTextChange { get; private set; } // = false;
@@ -99,7 +99,6 @@ internal sealed class ConfigManager
9999
public bool FixedPopupBottomPositioning { get; private set; } // = false;
100100
public double FixedPopupYPosition { get; set; } // = 0;
101101
public bool PopupFocusOnLookup { get; private set; } // = false;
102-
public bool ShowMiningModeReminder { get; private set; } = true;
103102
public bool DisableLookupsForNonJapaneseCharsInPopups { get; private set; } = true;
104103
public Brush PopupBackgroundColor { get; private set; } = new SolidColorBrush(Color.FromRgb(0, 0, 0))
105104
{
@@ -337,7 +336,6 @@ public void ApplyPreferences(SqliteConnection connection)
337336
}
338337

339338
PopupFocusOnLookup = ConfigDBManager.GetValueFromConfig(connection, PopupFocusOnLookup, nameof(PopupFocusOnLookup), bool.TryParse);
340-
ShowMiningModeReminder = ConfigDBManager.GetValueFromConfig(connection, ShowMiningModeReminder, nameof(ShowMiningModeReminder), bool.TryParse);
341339
DisableLookupsForNonJapaneseCharsInPopups = ConfigDBManager.GetValueFromConfig(connection, DisableLookupsForNonJapaneseCharsInPopups, nameof(DisableLookupsForNonJapaneseCharsInPopups), bool.TryParse);
342340
FixedPopupPositioning = ConfigDBManager.GetValueFromConfig(connection, FixedPopupPositioning, nameof(FixedPopupPositioning), bool.TryParse);
343341
FixedPopupRightPositioning = ConfigDBManager.GetValueFromConfig(connection, FixedPopupRightPositioning, nameof(FixedPopupRightPositioning), bool.TryParse);
@@ -1004,7 +1002,6 @@ public void LoadPreferenceWindow(PreferencesWindow preferenceWindow)
10041002
preferenceWindow.MineMouseButtonComboBox.SelectedValue = MineMouseButton.ToString();
10051003
preferenceWindow.MinePrimarySpellingMouseButtonComboBox.SelectedValue = MinePrimarySpellingMouseButton.ToString();
10061004

1007-
preferenceWindow.ShowMiningModeReminderCheckBox.IsChecked = ShowMiningModeReminder;
10081005
preferenceWindow.DisableLookupsForNonJapaneseCharsInPopupsCheckBox.IsChecked = DisableLookupsForNonJapaneseCharsInPopups;
10091006
preferenceWindow.HideDictTabsWithNoResultsCheckBox.IsChecked = HideDictTabsWithNoResults;
10101007
preferenceWindow.AutoHidePopupIfMouseIsNotOverItCheckBox.IsChecked = AutoHidePopupIfMouseIsNotOverIt;
@@ -1417,9 +1414,6 @@ public async Task SavePreferences(PreferencesWindow preferenceWindow)
14171414

14181415
ConfigDBManager.UpdateSetting(connection, "PopupFlip", preferenceWindow.PopupFlipComboBox.SelectedValue.ToString()!);
14191416

1420-
ConfigDBManager.UpdateSetting(connection, nameof(ShowMiningModeReminder),
1421-
preferenceWindow.ShowMiningModeReminderCheckBox.IsChecked.ToString()!);
1422-
14231417
ConfigDBManager.UpdateSetting(connection, nameof(DisableLookupsForNonJapaneseCharsInPopups),
14241418
preferenceWindow.DisableLookupsForNonJapaneseCharsInPopupsCheckBox.IsChecked.ToString()!);
14251419

JL.Windows/GUI/PopupWindow.xaml

-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@
3333
</Button>
3434
</Grid>
3535

36-
<TextBlock Grid.Row="1" Name="TextBlockMiningModeReminder" FontSize="13" Padding="5,0,0,0"
37-
Visibility="Collapsed" TextWrapping="Wrap"
38-
Background="Transparent"
39-
Foreground="{Binding Path=Foreground,
40-
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
41-
</TextBlock>
42-
4336
<ItemsControl Grid.Row="2" Name="ItemsControlButtons" Visibility="Collapsed"
4437
Background="Transparent">
4538
<ItemsControl.ItemsPanel>

JL.Windows/GUI/PopupWindow.xaml.cs

-14
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,6 @@ private void Init()
108108
SearchMenuItem.SetInputGestureText(configManager.SearchWithBrowserKeyGesture);
109109

110110
AddMenuItemsToEditableTextBoxContextMenu();
111-
112-
if (configManager.ShowMiningModeReminder)
113-
{
114-
TextBlockMiningModeReminder.Text = string.Create(CultureInfo.InvariantCulture,
115-
$"Click the ➕ button to mine,\nor press {configManager.ClosePopupKeyGesture.ToFormattedString()} or click on the main window to exit.");
116-
TextBlockMiningModeReminder.ToolTip = "This message can be hidden by disabling Preferences->Popup->Show mining mode reminder";
117-
TextBlockMiningModeReminder.Cursor = Cursors.Help;
118-
}
119111
}
120112

121113
private void AddMenuItemsToEditableTextBoxContextMenu()
@@ -1848,11 +1840,6 @@ private void EnableMiningMode()
18481840
MiningMode = true;
18491841

18501842
TitleBarGrid.Visibility = Visibility.Visible;
1851-
if (ConfigManager.Instance.ShowMiningModeReminder && this == MainWindow.Instance.FirstPopupWindow)
1852-
{
1853-
TextBlockMiningModeReminder.Visibility = Visibility.Visible;
1854-
}
1855-
18561843
ItemsControlButtons.Visibility = Visibility.Visible;
18571844
}
18581845

@@ -2153,7 +2140,6 @@ public void HidePopup()
21532140

21542141
MiningMode = false;
21552142
TitleBarGrid.Visibility = Visibility.Collapsed;
2156-
TextBlockMiningModeReminder.Visibility = Visibility.Collapsed;
21572143
ItemsControlButtons.Visibility = Visibility.Collapsed;
21582144
ItemsControlButtons.ItemsSource = null;
21592145
_buttonAll.Click -= DictTypeButtonOnClick;

JL.Windows/GUI/PreferencesWindow.xaml

-7
Original file line numberDiff line numberDiff line change
@@ -774,13 +774,6 @@
774774
HorizontalAlignment="Right" />
775775
</DockPanel>
776776

777-
<DockPanel>
778-
<TextBlock HorizontalAlignment="Left" Text="Show mining mode reminder"
779-
Style="{StaticResource TextBlockDefault}"
780-
TextWrapping="Wrap" VerticalAlignment="Center" />
781-
<CheckBox x:Name="ShowMiningModeReminderCheckBox" HorizontalAlignment="Right" />
782-
</DockPanel>
783-
784777
<DockPanel>
785778
<TextBlock HorizontalAlignment="Left" Text="Disable lookups for non-Japanese characters"
786779
Style="{StaticResource TextBlockDefault}"

0 commit comments

Comments
 (0)