Skip to content

Commit

Permalink
Merge pull request #818 from dremin/minor-renames-tweaks
Browse files Browse the repository at this point in the history
Minor renames and tweaks
  • Loading branch information
dremin authored Apr 30, 2024
2 parents f97fae3 + 1a1866a commit 1174218
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion RetroBar/Controls/NotifyIcon.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void TrayIcon_NotificationBalloonShown(object sender, NotificationBalloo
return;
}

if (TrayIcon == null || TrayIcon.GetBehavior() == NotifyIconBehavior.AlwaysHide || TrayIcon.GetBehavior() == NotifyIconBehavior.Disabled)
if (TrayIcon == null || TrayIcon.GetBehavior() == NotifyIconBehavior.AlwaysHide || TrayIcon.GetBehavior() == NotifyIconBehavior.Remove)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion RetroBar/Controls/NotifyIconList.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private bool UnpinnedNotifyIcons_Filter(object obj)
{
if (obj is ManagedShell.WindowsTray.NotifyIcon notifyIcon)
{
return !notifyIcon.IsPinned && !notifyIcon.IsHidden && notifyIcon.GetBehavior() != NotifyIconBehavior.Disabled;
return !notifyIcon.IsPinned && !notifyIcon.IsHidden && notifyIcon.GetBehavior() != NotifyIconBehavior.Remove;
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion RetroBar/Languages/English.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<s:String x:Key="hide_when_inactive">Hide when inactive</s:String>
<s:String x:Key="always_show">Always show</s:String>
<s:String x:Key="always_hide">Always hide</s:String>
<s:String x:Key="disabled">Disabled</s:String>
<s:String x:Key="remove">Remove</s:String>
<s:String x:Key="name_heading">Name</s:String>
<s:String x:Key="behavior_heading">Behavior</s:String>
<s:String x:Key="invert_heading">Invert</s:String>
Expand Down
4 changes: 2 additions & 2 deletions RetroBar/NotificationPropertiesWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<Setter Property="Text" Value="{DynamicResource always_show}" />
</DataTrigger>
<DataTrigger Binding="{Binding Converter={StaticResource notifyIconBehaviorConverter}}" Value="3">
<Setter Property="Text" Value="{DynamicResource disabled}" />
<Setter Property="Text" Value="{DynamicResource remove}" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand All @@ -124,7 +124,7 @@
<ComboBoxItem Content="{DynamicResource hide_when_inactive}" Tag="{x:Static Settings:NotifyIconBehavior.HideWhenInactive}" />
<ComboBoxItem Content="{DynamicResource always_hide}" Tag="{x:Static Settings:NotifyIconBehavior.AlwaysHide}" />
<ComboBoxItem Content="{DynamicResource always_show}" Tag="{x:Static Settings:NotifyIconBehavior.AlwaysShow}" />
<ComboBoxItem Content="{DynamicResource disabled}" Tag="{x:Static Settings:NotifyIconBehavior.Disabled}" />
<ComboBoxItem Content="{DynamicResource remove}" Tag="{x:Static Settings:NotifyIconBehavior.Remove}" />
</ComboBox>
</StackPanel>
<DataTemplate.Triggers>
Expand Down
22 changes: 11 additions & 11 deletions RetroBar/PropertiesWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,19 @@
<Label Content="{DynamicResource debug_logging}" />
</CheckBox>
<CheckBox x:Name="cbCheckForUpdates"
IsChecked="{Binding Source={x:Static Settings:Settings.Instance}, Path=Updates, UpdateSourceTrigger=PropertyChanged}">
IsChecked="{Binding Source={x:Static Settings:Settings.Instance}, Path=CheckForUpdates, UpdateSourceTrigger=PropertyChanged}">
<Label Content="{DynamicResource check_for_updates}" />
</CheckBox>
<DockPanel>
<Label VerticalAlignment="Center"
Target="{Binding ElementName=cboMiddleMouseAction}">
<AccessText Text="{DynamicResource middle_mouse_task_action}" />
</Label>
<ComboBox x:Name="cboMiddleMouseAction"
ItemsSource="{DynamicResource middle_mouse_task_action_values}"
SelectedIndex="{Binding Source={x:Static Settings:Settings.Instance}, Path=TaskMiddleClickAction, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource enumConverter}}"
SelectionChanged="cboMiddleMouseAction_SelectionChanged" />
</DockPanel>
<DockPanel>
<Label VerticalAlignment="Center"
Target="{Binding ElementName=cboInvertIconsMode}">
Expand All @@ -337,16 +347,6 @@
<Button HorizontalAlignment="Right"
Content="{DynamicResource customize}"
Click="CustomizeNotifications_OnClick" />
<DockPanel>
<Label VerticalAlignment="Center"
Target="{Binding ElementName=cboMiddleMouseAction}">
<AccessText Text="{DynamicResource middle_mouse_task_action}" />
</Label>
<ComboBox x:Name="cboMiddleMouseAction"
ItemsSource="{DynamicResource middle_mouse_task_action_values}"
SelectedIndex="{Binding Source={x:Static Settings:Settings.Instance}, Path=TaskMiddleClickAction, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource enumConverter}}"
SelectionChanged="cboMiddleMouseAction_SelectionChanged" />
</DockPanel>
</StackPanel>
<GroupBox Header="{DynamicResource multiple_displays}"
Margin="0,0,0,10">
Expand Down
6 changes: 6 additions & 0 deletions RetroBar/PropertiesWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ public Orientation Orientation
get => Orientation.Horizontal;
}

// Previews should always assume normal mode
public AppBarMode AppBarMode
{
get => AppBarMode.Normal;
}

// Previews should reflect the locked setting
public bool IsLocked
{
Expand Down
10 changes: 5 additions & 5 deletions RetroBar/Utilities/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ public TaskMiddleClickOption TaskMiddleClickAction
set => SetEnum(ref _taskMiddleClickAction, value);
}

private bool _updates = true;
public bool Updates
private bool _checkForUpdates = true;
public bool CheckForUpdates
{
get => _updates;
set => Set(ref _updates, value);
get => _checkForUpdates;
set => Set(ref _checkForUpdates, value);
}
#endregion

Expand Down Expand Up @@ -357,7 +357,7 @@ public enum NotifyIconBehavior
HideWhenInactive,
AlwaysHide,
AlwaysShow,
Disabled
Remove
}
#endregion

Expand Down
4 changes: 2 additions & 2 deletions RetroBar/Utilities/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public Updater()

private void Settings_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Settings.Updates))
if (e.PropertyName == nameof(Settings.CheckForUpdates))
{
SetTimer();
}
}

private void SetTimer()
{
if (Settings.Instance.Updates)
if (Settings.Instance.CheckForUpdates)
{
if (updateCheck == null)
{
Expand Down

0 comments on commit 1174218

Please sign in to comment.