Skip to content

Commit

Permalink
Merge branch 'master' into 1328-use-official-sil-logos
Browse files Browse the repository at this point in the history
  • Loading branch information
tombogle committed Aug 23, 2024
2 parents 1aaa8b3 + d982d80 commit 84853e3
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
timeout-minutes: 30
timeout-minutes: 60
runs-on: windows-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net461</TargetFrameworks>
<TargetFrameworks>net461;net48</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<Company>SIL International</Company>
<Authors>SIL International</Authors>
Expand Down
4 changes: 2 additions & 2 deletions SIL.Archiving.Tests/IMDIArchivingDlgViewModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void IsPathWritable_WindowsInvalidPath_False()
var writable = _model.IsPathWritable(dir);
Assert.False(writable);
Assert.AreEqual(1, m_messages.Count);
Assert.AreEqual("The path is not of a legal form.", m_messages[0].MsgText);
Assert.IsTrue(m_messages[0].MsgText.Contains("path"), "Error should mention the path in its explanation.");
Assert.AreEqual(ArchivingDlgViewModel.MessageType.Warning, m_messages[0].MsgType);
}

Expand All @@ -122,7 +122,7 @@ public void IsPathWritable_IllegalCharacterInPath_False()
var writable = _model.IsPathWritable(dir);
Assert.False(writable);
Assert.AreEqual(1, m_messages.Count);
Assert.AreEqual("Illegal characters in path.", m_messages[0].MsgText);
Assert.IsTrue(m_messages[0].MsgText.Contains("path"), "Error should mention the path in its explanation.");
Assert.AreEqual(ArchivingDlgViewModel.MessageType.Warning, m_messages[0].MsgType);
}

Expand Down
6 changes: 3 additions & 3 deletions SIL.Core.Desktop/SIL.Core.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<Company>SIL</Company>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.11.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="NDesk.DBus" Version="0.15.0" Condition="'$(TargetFramework)' != 'netstandard2.0'" />
<PackageReference Include="NDesk.DBus" Version="0.15.0" Condition=" $(DefineConstants.Contains('NETFRAMEWORK')) " />
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
Expand All @@ -20,7 +20,7 @@
<ItemGroup>
<ProjectReference Include="..\SIL.Core\SIL.Core.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
<ItemGroup Condition=" $(DefineConstants.Contains('NETFRAMEWORK')) ">
<Reference Include="System.Configuration" />
<Reference Include="System.Management" />
<Reference Include="System.Security" />
Expand Down
2 changes: 1 addition & 1 deletion SIL.Core/IO/DirectoryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static bool AreEquivalent(DirectoryInfo dirInfo1, DirectoryInfo dirInfo2)
: StringComparison.InvariantCulture;
var backslash = new[]
{
'\\', '/'
'\\', '/', '.'
}; // added this step because mono does not implicitly convert from char to char[]
return string.Compare(dirInfo1.FullName.TrimEnd(backslash),
dirInfo2.FullName.TrimEnd(backslash), comparison) == 0;
Expand Down
2 changes: 1 addition & 1 deletion SIL.Core/ObjectModel/ObservableHashSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public ObservableHashSet(IEnumerable<T> items, IEqualityComparer<T> comparer) :

protected override IEqualityComparer<T> Comparer => Items.Comparer;

protected HashSet<T> Items => (HashSet<T>) _set;
protected HashSet<T> Items => (HashSet<T>) Set;
}
}
52 changes: 26 additions & 26 deletions SIL.Core/ObjectModel/ObservableISet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged
protected virtual event PropertyChangedEventHandler PropertyChanged;

private readonly SimpleMonitor _reentrancyMonitor = new SimpleMonitor();
protected readonly ISet<T> _set;
protected readonly ISet<T> Set;

public ObservableISet(ISet<T> set)
{
_set = set;
Set = set;
}

IEnumerator<T> IEnumerable<T>.GetEnumerator()
{
return _set.GetEnumerator();
return Set.GetEnumerator();
}

IEnumerator IEnumerable.GetEnumerator()
{
return _set.GetEnumerator();
return Set.GetEnumerator();
}

void ICollection<T>.Add(T item)
Expand All @@ -47,8 +47,8 @@ void ICollection<T>.Add(T item)
public virtual void UnionWith(IEnumerable<T> other)
{
CheckReentrancy();
T[] addedItems = other.Where(x => !_set.Contains(x)).ToArray();
_set.UnionWith(addedItems);
T[] addedItems = other.Where(x => !Set.Contains(x)).ToArray();
Set.UnionWith(addedItems);
if (addedItems.Length > 0)
{
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
Expand All @@ -59,8 +59,8 @@ public virtual void UnionWith(IEnumerable<T> other)
public virtual void IntersectWith(IEnumerable<T> other)
{
CheckReentrancy();
T[] removedItems = _set.Where(x => !other.Contains(x)).ToArray();
_set.ExceptWith(removedItems);
T[] removedItems = Set.Where(x => !other.Contains(x)).ToArray();
Set.ExceptWith(removedItems);
if (removedItems.Length > 0)
{
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
Expand All @@ -71,8 +71,8 @@ public virtual void IntersectWith(IEnumerable<T> other)
public virtual void ExceptWith(IEnumerable<T> other)
{
CheckReentrancy();
T[] removedItems = other.Where(x => _set.Contains(x)).ToArray();
_set.ExceptWith(removedItems);
T[] removedItems = other.Where(x => Set.Contains(x)).ToArray();
Set.ExceptWith(removedItems);
if (removedItems.Length > 0)
{
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
Expand All @@ -87,14 +87,14 @@ public virtual void SymmetricExceptWith(IEnumerable<T> other)
var removedItems = new List<T>();
foreach (T item in other.Distinct(Comparer))
{
if (_set.Contains(item))
if (Set.Contains(item))
removedItems.Add(item);
else
addedItems.Add(item);
}

_set.UnionWith(addedItems);
_set.ExceptWith(removedItems);
Set.UnionWith(addedItems);
Set.ExceptWith(removedItems);

if (addedItems.Count > 0 || removedItems.Count > 0)
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
Expand All @@ -106,38 +106,38 @@ public virtual void SymmetricExceptWith(IEnumerable<T> other)

public bool IsSubsetOf(IEnumerable<T> other)
{
return _set.IsSubsetOf(other);
return Set.IsSubsetOf(other);
}

public bool IsSupersetOf(IEnumerable<T> other)
{
return _set.IsSupersetOf(other);
return Set.IsSupersetOf(other);
}

public bool IsProperSupersetOf(IEnumerable<T> other)
{
return _set.IsProperSupersetOf(other);
return Set.IsProperSupersetOf(other);
}

public bool IsProperSubsetOf(IEnumerable<T> other)
{
return _set.IsProperSubsetOf(other);
return Set.IsProperSubsetOf(other);
}

public bool Overlaps(IEnumerable<T> other)
{
return _set.Overlaps(other);
return Set.Overlaps(other);
}

public bool SetEquals(IEnumerable<T> other)
{
return _set.SetEquals(other);
return Set.SetEquals(other);
}

public virtual bool Add(T item)
{
CheckReentrancy();
if (_set.Add(item))
if (Set.Add(item))
{
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));
Expand All @@ -149,8 +149,8 @@ public virtual bool Add(T item)
public virtual void Clear()
{
CheckReentrancy();
int origCount = _set.Count;
_set.Clear();
int origCount = Set.Count;
Set.Clear();
if (origCount > 0)
{
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
Expand All @@ -160,18 +160,18 @@ public virtual void Clear()

public bool Contains(T item)
{
return _set.Contains(item);
return Set.Contains(item);
}

public void CopyTo(T[] array, int arrayIndex)
{
_set.CopyTo(array, arrayIndex);
Set.CopyTo(array, arrayIndex);
}

public virtual bool Remove(T item)
{
CheckReentrancy();
if (_set.Remove(item))
if (Set.Remove(item))
{
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item));
Expand All @@ -182,7 +182,7 @@ public virtual bool Remove(T item)

public int Count
{
get { return _set.Count; }
get { return Set.Count; }
}

bool ICollection<T>.IsReadOnly
Expand Down
2 changes: 1 addition & 1 deletion SIL.Core/ObjectModel/ObservableSortedSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public ObservableSortedSet(IEnumerable<T> items) : base(new SortedSet<T>(items))

protected override IEqualityComparer<T> Comparer => EqualityComparer<T>.Default;

protected SortedSet<T> Items => (SortedSet<T>) _set;
protected SortedSet<T> Items => (SortedSet<T>) Set;
}
}
2 changes: 1 addition & 1 deletion SIL.Core/PlatformUtilities/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static bool IsMono

public static bool IsPreWindows10 => IsWindows && OperatingSystemDescription != "Windows 10";

#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET471_OR_GREATER
public static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
public static bool IsMac => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
Expand Down
2 changes: 1 addition & 1 deletion SIL.Core/SIL.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
<Description>SIL.Core provides general utilities for language software. It is the base library for all Palaso libraries.</Description>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion SIL.DblBundle/SIL.DblBundle.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
<RootNamespace>SIL.DblBundle</RootNamespace>
<AssemblyTitle>SIL.DblBundle</AssemblyTitle>
<Description>SIL.DblBundle provides classes for building a Digital Bible Library (DBL) bundle.</Description>
Expand Down
2 changes: 1 addition & 1 deletion SIL.DictionaryServices/SIL.DictionaryServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>SIL.DictionaryServices</RootNamespace>
<AssemblyTitle>SIL.DictionaryServices</AssemblyTitle>
<Description>SIL.DictionaryServices contains classes for defining a simple lexical model that can be used across applications.</Description>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion SIL.Lexicon/SIL.Lexicon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>SIL.Lexicon</RootNamespace>
<AssemblyTitle>SIL.Lexicon</AssemblyTitle>
<Description>SIL.Lexicon contains various lexicon utility classes that can be used across applications. Currently, this assembly contains classes for persisting lexicon settings that can be shared by different lexicon applications.</Description>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion SIL.Lift/SIL.Lift.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<RootNamespace>SIL.Lift</RootNamespace>
<AssemblyTitle>SIL.Lift</AssemblyTitle>
<Description>SIL.Lift contains classes for reading and writing Lexicon Interchange FormaT (LIFT) data. This assembly currently supports LIFT 0.13.</Description>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.11.1" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion SIL.Linux.Logging/SIL.Linux.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>SIL.Linux.Logging</RootNamespace>
<AssemblyTitle>SIL.Linux.Logging</AssemblyTitle>
<Description>SIL.Linux.Logging provides a library to log to the syslog service.</Description>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion SIL.Scripture/SIL.Scripture.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
<RootNamespace>SIL.Scripture</RootNamespace>
<AssemblyTitle>SIL.Scripture</AssemblyTitle>
<Description>SIL.Scripture provides classes for working with Scripture data such as references and versifications.</Description>
Expand Down
2 changes: 1 addition & 1 deletion SIL.TestUtilities/SIL.TestUtilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>SIL.TestUtilities</RootNamespace>
<AssemblyTitle>SIL.TestUtilities</AssemblyTitle>
<Description>SIL.TestUtilities contains convenience classes for developing unit tests.</Description>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions SIL.Windows.Forms/Extensions/ToolStripExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public static void SizeTextRectangleToText(this ToolStripItemTextRenderEventArgs
/// the WinForms DLL will be able to have access to SIL.WritingSystems, and then this method
/// could be moved into L10nSharp.Windows.Forms.</remarks>
[PublicAPI]
[CLSCompliant(false)]
public static void InitializeWithAvailableUILocales(this ToolStripDropDownItem menu,
Func<string, bool> localeSelectedAction = null, ILocalizationManager lm = null,
LocalizationIncompleteViewModel localizationIncompleteViewModel = null,
Expand Down
2 changes: 1 addition & 1 deletion SIL.Windows.Forms/ImageToolbox/AcquireImageControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private void GetFromDevice(ImageAcquisitionService.DeviceKind deviceKind)
/// <param name="searchTerm"></param>
public void SetInitialSearchString(string searchTerm)
{
_galleryControl.SetIntialSearchTerm(searchTerm);
_galleryControl.SetInitialSearchTerm(searchTerm);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace SIL.Windows.Forms.LocalizationIncompleteDlg
/// </summary>
public class LocalizationIncompleteViewModel
{
[CLSCompliant(false)]
public ILocalizationManager PrimaryLocalizationManager { get; }

public string EmailAddressForLocalizationRequests =>
Expand Down Expand Up @@ -48,6 +49,7 @@ public class LocalizationIncompleteViewModel
/// <param name="issueRequestForLocalization">An action to handle issuing a localization
/// request (typically by passing the <see cref="StandardAnalyticsInfo"/> to
/// DesktopAnalytics.Track</param>
[CLSCompliant(false)]
public LocalizationIncompleteViewModel(ILocalizationManager appLm,
string crowdinProjectName, Action issueRequestForLocalization)
{
Expand Down
Loading

0 comments on commit 84853e3

Please sign in to comment.