Skip to content

Commit

Permalink
Fix .NET Core build.
Browse files Browse the repository at this point in the history
  • Loading branch information
madewokherd committed Mar 4, 2024
1 parent 6dabdbc commit da1cae6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
2 changes: 0 additions & 2 deletions xalia/AtSpi2/DBusUtils.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Documents;
using Tmds.DBus.Protocol;
using Xalia.Sdl;

Expand Down
8 changes: 4 additions & 4 deletions xalia/Util/Range.cs → xalia/Util/RangeList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Xalia.Util
{
public class Range : IList<int>
public class RangeList : IList<int>
{
public Range(int start, int end)
public RangeList(int start, int end)
{
if (end < start)
throw new ArgumentException($"end ({end}) must be greater than or equal to start ({start})");
Expand Down Expand Up @@ -82,13 +82,13 @@ IEnumerator IEnumerable.GetEnumerator()

public class RangeEnumerator : IEnumerator<int>
{
public RangeEnumerator(Range range)
public RangeEnumerator(RangeList range)
{
Range = range;
Reset();
}

public Range Range { get; }
public RangeList Range { get; }

public int Current { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion xalia/Win32/HwndListViewProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ private void RefreshChildren()

private void SetRecurseMethodRange(int start, int end)
{
Element.SyncRecurseMethodChildren(new Range(start, end), (int key) => Connection.GetElementName(Hwnd, OBJID_CLIENT, key+1),
Element.SyncRecurseMethodChildren(new RangeList(start, end), (int key) => Connection.GetElementName(Hwnd, OBJID_CLIENT, key+1),
CreateChildItem);
}

Expand Down
2 changes: 1 addition & 1 deletion xalia/Win32/HwndTabProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private void SetUiDomChildCount(int newCount)
if (Element.RecurseMethodChildCount == newCount)
return;

Element.SyncRecurseMethodChildren(new Range(1, newCount + 1),
Element.SyncRecurseMethodChildren(new RangeList(1, newCount + 1),
(int key) => Connection.GetElementName(Hwnd, OBJID_CLIENT, key), CreateChildElement);
}

Expand Down
9 changes: 3 additions & 6 deletions xalia/xalia-netcore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

<ItemGroup Condition="'$(Configuration)'=='Release-Linux' OR '$(Configuration)'=='Debug-Linux'">
<Compile Remove="Uia\**" />
<Compile Remove="Win32\**" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release-Windows' OR '$(Configuration)'=='Debug-Windows'">
Expand Down Expand Up @@ -105,12 +106,8 @@

<ItemGroup>
<PackageReference Include="Superpower" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="Tmds.DBus">
<HintPath>..\external\Tmds.Dbus\src\Tmds.DBus\bin\Release\netstandard2.0\Tmds.DBus.dll</HintPath>
</Reference>
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="Tmds.DBus.Protocol" Version="0.16.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion xalia/xalia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<Compile Include="Sdl\SdlOverlayBox.cs" />
<Compile Include="Sdl\WindowingSystem.cs" />
<Compile Include="external\SDL2-CS\src\SDL2.cs" />
<Compile Include="Util\Range.cs" />
<Compile Include="Util\RangeList.cs" />
<Compile Include="Win32\AccessibleProvider.cs" />
<Compile Include="Win32\ElementIdentifier.cs" />
<Compile Include="Win32\HwndButtonProvider.cs" />
Expand Down

0 comments on commit da1cae6

Please sign in to comment.