Skip to content

Commit 62f7e12

Browse files
committed
Merge branch 'dev' into beta
2 parents b4c3076 + 8f47b07 commit 62f7e12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1345
-1508
lines changed

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageVersion Include="FluentAssertions" Version="8.2.0" />
1010
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" />
1111
<PackageVersion Include="Job.Scheduler" Version="3.1.8" />
12-
<PackageVersion Include="Markdig" Version="0.41.0" />
12+
<PackageVersion Include="Markdig" Version="0.41.1" />
1313
<PackageVersion Include="MessagePack" Version="3.1.3" />
1414
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
1515
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.4" />
@@ -23,13 +23,13 @@
2323
<PackageVersion Include="NUnit3TestAdapter" Version="5.0.0" />
2424
<PackageVersion Include="Polly.Core" Version="8.5.2" />
2525
<PackageVersion Include="RailSharp" Version="1.0.0" />
26-
<PackageVersion Include="Sentry.Serilog" Version="5.5.1" />
26+
<PackageVersion Include="Sentry.Serilog" Version="5.6.0" />
2727
<PackageVersion Include="Serilog" Version="4.2.0" />
2828
<PackageVersion Include="Serilog.Enrichers.Environment" Version="3.0.1" />
2929
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0+build.694" />
3030
<PackageVersion Include="Serilog.Formatting.Compact" Version="3.0.0" />
3131
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
32-
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
32+
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
3333
<PackageVersion Include="SerilogTraceListener" Version="3.2.0" />
3434
<PackageVersion Include="Spectre.Console" Version="0.50.0" />
3535
<PackageVersion Include="Spectre.Console.Cli" Version="0.50.0" />

SoundSwitch/Framework/Configuration/ISoundSwitchConfiguration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using SoundSwitch.Framework.NotificationManager;
2222
using SoundSwitch.Framework.Profile;
2323
using SoundSwitch.Framework.TrayIcon.Icon;
24+
using SoundSwitch.Framework.TrayIcon.IconDoubleClick;
2425
using SoundSwitch.Framework.TrayIcon.TooltipInfoManager.TootipInfo;
2526
using SoundSwitch.Framework.Updater;
2627
using SoundSwitch.Framework.Updater.Remind;
@@ -65,6 +66,8 @@ public interface ISoundSwitchConfiguration : IConfiguration
6566
/// </summary>
6667
IconChangerEnum SwitchIcon { get; set; }
6768

69+
IconDoubleClickEnum IconDoubleClick { get; set; }
70+
6871
HashSet<ProfileSetting> ProfileSettings { get; set; }
6972
HashSet<Profile.Profile> Profiles { get; set; }
7073
DateTime LastDonationNagTime { get; set; }

SoundSwitch/Framework/Configuration/SoundSwitchConfiguration.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
using SoundSwitch.Framework.Profile;
2929
using SoundSwitch.Framework.Profile.Trigger;
3030
using SoundSwitch.Framework.TrayIcon.Icon;
31+
using SoundSwitch.Framework.TrayIcon.IconDoubleClick;
3132
using SoundSwitch.Framework.TrayIcon.TooltipInfoManager.TootipInfo;
3233
using SoundSwitch.Framework.Updater;
3334
using SoundSwitch.Framework.Updater.Remind;
@@ -43,6 +44,7 @@ public SoundSwitchConfiguration()
4344
// Basic Settings
4445
FirstRun = true;
4546
SwitchForegroundProgram = false;
47+
IconDoubleClick = IconDoubleClickEnum.SwitchDevice;
4648

4749
// Audio Settings
4850
ChangeCommunications = false;
@@ -90,17 +92,18 @@ public SoundSwitchConfiguration()
9092
public bool ChangeCommunications { get; set; }
9193
public uint UpdateCheckInterval { get; set; }
9294
public UpdateMode UpdateMode { get; set; }
95+
public IconDoubleClickEnum IconDoubleClick { get; set; }
9396
public TooltipInfoTypeEnum TooltipInfo { get; set; }
9497
public DeviceCyclerTypeEnum CyclerType { get; set; }
9598
public NotificationTypeEnum NotificationSettings { get; set; }
9699
public BannerPositionEnum BannerPosition { get; set; }
100+
public MicrophoneMuteEnum MicrophoneMuteNotification { get; set; }
97101
public Language Language { get; set; }
98102
public bool IncludeBetaVersions { get; set; }
99103
public string CustomNotificationFilePath { get; set; }
100104
public bool NotifyUsingPrimaryScreen { get; set; }
101105
[Obsolete("Replaced by "+nameof(MicrophoneMutePersistent))]
102106
public bool PersistentMuteNotification { get; set; }
103-
public MicrophoneMuteEnum MicrophoneMuteNotification { get; set; }
104107

105108
[Obsolete("Feature has been removed")]
106109
public bool AutoAddNewConnectedDevices { get; set; }

SoundSwitch/Framework/NotificationManager/NotificationFactory.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace SoundSwitch.Framework.NotificationManager
2121
{
22-
public class NotificationFactory : AbstractFactory<NotificationTypeEnum, INotification>
22+
public class NotificationFactory() : AbstractFactory<NotificationTypeEnum, INotification>(Notifications)
2323
{
2424
private static readonly IEnumImplList<NotificationTypeEnum, INotification> Notifications = new EnumImplList
2525
<NotificationTypeEnum, INotification>
@@ -30,10 +30,6 @@ public class NotificationFactory : AbstractFactory<NotificationTypeEnum, INotifi
3030
new NotificationSound()
3131
};
3232

33-
public NotificationFactory() : base(Notifications)
34-
{
35-
}
36-
3733
protected override IReadOnlyDictionary<NotificationTypeEnum, INotification> DataSource()
3834
{
3935
return AllImplementations.Where(pair => pair.Value.IsAvailable()).ToDictionary(pair => pair.Key, pair => pair.Value);

SoundSwitch/Framework/TrayIcon/Icon/IconChangerFactory.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace SoundSwitch.Framework.TrayIcon.Icon
1919
{
20-
public class IconChangerFactory : AbstractFactory<IconChangerEnum, IIconChanger>
20+
public class IconChangerFactory() : AbstractFactory<IconChangerEnum, IIconChanger>(Impl)
2121
{
2222
private static readonly IEnumImplList<IconChangerEnum, IIconChanger> Impl = new EnumImplList<IconChangerEnum, IIconChanger>()
2323
{
@@ -26,9 +26,5 @@ public class IconChangerFactory : AbstractFactory<IconChangerEnum, IIconChanger>
2626
new RecordingIconChanger(),
2727
new AlwaysIconChanger()
2828
};
29-
30-
public IconChangerFactory() : base(Impl)
31-
{
32-
}
3329
}
3430
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/********************************************************************
2+
* Copyright (C) 2015-2017 Antoine Aflalo
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
********************************************************************/
14+
15+
using SoundSwitch.Framework.Factory;
16+
17+
namespace SoundSwitch.Framework.TrayIcon.IconDoubleClick.DoubleClick
18+
{
19+
public interface IIconDoubleClick : IEnumImpl<IconDoubleClickEnum>
20+
{
21+
}
22+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/********************************************************************
2+
* Copyright (C) 2015-2017 Antoine Aflalo
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
********************************************************************/
14+
15+
using SoundSwitch.Localization;
16+
17+
namespace SoundSwitch.Framework.TrayIcon.IconDoubleClick.DoubleClick
18+
{
19+
internal class IconDoubleClickOpenSettings : IIconDoubleClick
20+
{
21+
public IconDoubleClickEnum TypeEnum => IconDoubleClickEnum.OpenSettings;
22+
public string Label => SettingsStrings.openSettings;
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/********************************************************************
2+
* Copyright (C) 2015-2017 Antoine Aflalo
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
********************************************************************/
14+
15+
using SoundSwitch.Localization;
16+
17+
namespace SoundSwitch.Framework.TrayIcon.IconDoubleClick.DoubleClick
18+
{
19+
internal class IconDoubleClickSwitchDevice: IIconDoubleClick
20+
{
21+
public IconDoubleClickEnum TypeEnum => IconDoubleClickEnum.SwitchDevice;
22+
public string Label => SettingsStrings.switchDevice;
23+
}
24+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/********************************************************************
2+
* Copyright (C) 2015-2017 Antoine Aflalo
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
********************************************************************/
14+
15+
namespace SoundSwitch.Framework.TrayIcon.IconDoubleClick
16+
{
17+
public enum IconDoubleClickEnum
18+
{
19+
SwitchDevice = 0,
20+
OpenSettings = 1
21+
}
22+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/********************************************************************
2+
* Copyright (C) 2015-2017 Antoine Aflalo
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
********************************************************************/
14+
15+
using SoundSwitch.Framework.Factory;
16+
using SoundSwitch.Framework.TrayIcon.IconDoubleClick.DoubleClick;
17+
18+
namespace SoundSwitch.Framework.TrayIcon.IconDoubleClick
19+
{
20+
public class IconDoubleClickFactory() : AbstractFactory<IconDoubleClickEnum, IIconDoubleClick>(DoubleClick)
21+
{
22+
private static readonly IEnumImplList<IconDoubleClickEnum, IIconDoubleClick> DoubleClick = new EnumImplList
23+
<IconDoubleClickEnum, IIconDoubleClick>
24+
{
25+
new IconDoubleClickSwitchDevice(),
26+
new IconDoubleClickOpenSettings()
27+
};
28+
}
29+
}

0 commit comments

Comments
 (0)