Skip to content

Commit 55b159e

Browse files
committed
Init
1 parent b348223 commit 55b159e

File tree

21 files changed

+180
-142
lines changed

21 files changed

+180
-142
lines changed

.github/scripts/Configure-AppxManifest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ elseif ($Branch -eq "StorePreview")
6060
$xmlDoc.Package.Identity.Name="49306atecsolution.FilesPreview"
6161
$xmlDoc.Package.Properties.DisplayName="Files - Preview"
6262
$xmlDoc.Package.Applications.Application.VisualElements.DisplayName="Files - Preview"
63-
$xmlDoc.Package.Applications.Application.VisualElements.DefaultTile.ShortName="Files - Preview"
63+
$xmlDoc.Package.Applications.Application.VisualElements.DefaultTile.ShortName="49306atecsolution.FilesPreview"
6464

6565
# Remove capability that is only used for the sideload package
6666
$nsmgr = New-Object System.Xml.XmlNamespaceManager($xmlDoc.NameTable)

src/Files.App (Package)/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Identity
1717
Name="FilesDev"
1818
Publisher="CN=Files"
19-
Version="3.9.9.0" />
19+
Version="3.9.8.0" />
2020

2121
<Properties>
2222
<DisplayName>Files - Dev</DisplayName>

src/Files.App.BackgroundTasks/Files.App.BackgroundTasks.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<Platforms>x86;x64;ARM64</Platforms>
1111
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
13+
<IsAotCompatible>true</IsAotCompatible>
1314
</PropertyGroup>
1415

1516
<PropertyGroup>

src/Files.App.CsWin32/Files.App.CsWin32.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<Configurations>Debug;Release</Configurations>
1010
<Platforms>x86;x64;arm64</Platforms>
1111
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
12+
<IsAotCompatible>true</IsAotCompatible>
1213
</PropertyGroup>
1314

1415
<ItemGroup>

src/Files.App.CsWin32/NativeMethods.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ RemoveDirectoryFromApp
4545
GetKeyState
4646
CreateDirectoryFromApp
4747
WNetCancelConnection2
48-
NET_USE_CONNECT_FLAGS
4948
NETRESOURCEW
5049
WNetAddConnection3
5150
CREDENTIALW
@@ -78,7 +77,6 @@ GetAce
7877
SetEntriesInAcl
7978
ACL_SIZE_INFORMATION
8079
DeleteAce
81-
EXPLICIT_ACCESS
8280
ACCESS_ALLOWED_ACE
8381
LookupAccountSid
8482
GetComputerName
@@ -97,6 +95,7 @@ SendMessage
9795
IsWindowVisible
9896
COPYDATASTRUCT
9997
WINDOW_LONG_PTR_INDEX
98+
GetDpiForWindow
10099
CallWindowProc
101100
MINMAXINFO
102101
SUBCLASSPROC
@@ -133,7 +132,6 @@ ShellExecuteEx
133132
CoTaskMemFree
134133
QueryDosDevice
135134
DeviceIoControl
136-
GetLastError
137135
CreateFile
138136
GetVolumeInformation
139137
COMPRESSION_FORMAT
@@ -225,6 +223,3 @@ _SICHINTF
225223
RoGetAgileReference
226224
IQueryInfo
227225
QITIPF_FLAGS
228-
GetKeyboardState
229-
MapVirtualKey
230-
GetKeyboardLayout

src/Files.App.Storage/Files.App.Storage.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<Platforms>x86;x64;arm64</Platforms>
1111
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
13+
<IsAotCompatible>true</IsAotCompatible>
1314
</PropertyGroup>
1415

1516
<ItemGroup>

src/Files.App.Storage/Storables/WindowsStorage/WindowsStorableHelpers.Icon.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public unsafe static HRESULT TryGetThumbnail(this IWindowsStorable storable, int
4444
{
4545
thumbnailData = null;
4646

47-
using ComPtr<IShellItemImageFactory> pShellItemImageFactory = storable.ThisPtr.As<IShellItemImageFactory>();
47+
using ComPtr<IShellItemImageFactory> pShellItemImageFactory = default;
48+
storable.ThisPtr.As(pShellItemImageFactory.GetAddressOf());
4849
if (pShellItemImageFactory.IsNull)
4950
return HRESULT.E_NOINTERFACE;
5051

src/Files.App.Storage/Watchers/RecycleBinWatcher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Files.App.Storage.Watchers
88
{
9+
[Obsolete]
910
public class RecycleBinWatcher : ITrashWatcher
1011
{
1112
private readonly List<SystemIO.FileSystemWatcher> _watchers = [];

src/Files.App/Data/Commands/HotKey/HotKey.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Collections.Frozen;
55
using System.Runtime.InteropServices;
66
using System.Text;
7-
using Windows.Win32;
87
using Forms = System.Windows.Forms;
98

109
namespace Files.App.Data.Commands
@@ -375,17 +374,17 @@ private static string GetKeyCharacter(Forms.Keys key)
375374
var state = new byte[256];
376375

377376
// Get the current keyboard state
378-
if (!PInvoke.GetKeyboardState(state))
377+
if (!Win32PInvoke.GetKeyboardState(state))
379378
return buffer.ToString();
380379

381380
// Convert the key to its virtual key code
382381
var virtualKey = (uint)key;
383382

384383
// Map the virtual key to a scan code
385-
var scanCode = PInvoke.MapVirtualKey(virtualKey, 0);
384+
var scanCode = Win32PInvoke.MapVirtualKey(virtualKey, 0);
386385

387386
// Get the active keyboard layout
388-
var keyboardLayout = PInvoke.GetKeyboardLayout(0);
387+
var keyboardLayout = Win32PInvoke.GetKeyboardLayout(0);
389388

390389
if (Win32PInvoke.ToUnicodeEx(virtualKey, scanCode, state, buffer, buffer.Capacity, 0, keyboardLayout) > 0)
391390
return buffer[^1].ToString();

src/Files.App/Data/Items/NavigationBarSuggestionItem.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Copyright (c) Files Community
22
// Licensed under the MIT License.
33

4+
using Files.App.Controls;
5+
46
namespace Files.App.Data.Items
57
{
68
[Obsolete("Remove once Omnibar goes out of experimental.")]
7-
public sealed partial class NavigationBarSuggestionItem : ObservableObject
9+
public sealed partial class NavigationBarSuggestionItem : ObservableObject, IOmnibarTextMemberPathProvider
810
{
911
private string? _Text;
1012
public string? Text
@@ -88,5 +90,16 @@ private void UpdatePrimaryDisplay()
8890
}
8991
}
9092
}
93+
94+
public string GetTextMemberPath(string textMemberPath)
95+
{
96+
return textMemberPath switch
97+
{
98+
nameof(Text) => Text,
99+
nameof(PrimaryDisplay) => PrimaryDisplay,
100+
nameof(SearchText) => SearchText,
101+
_ => string.Empty
102+
};
103+
}
91104
}
92105
}

0 commit comments

Comments
 (0)