Skip to content

Commit adb94fe

Browse files
authored
Merge pull request #437 from duke7553/develop
0.7.1
2 parents 87a4682 + a452087 commit adb94fe

Some content is hidden

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

46 files changed

+3938
-2509
lines changed

Files.Launcher/Files.Launcher.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<OutputType>WinExe</OutputType>
99
<RootNamespace>ProcessLauncher</RootNamespace>
1010
<AssemblyName>ProcessLauncher</AssemblyName>
11-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1414
<Deterministic>true</Deterministic>

Files.Launcher/app.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>

Files.Package/Files.Package.wapproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,13 @@
5252
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
5353
<AppxPackageDir>C:\Users\explo\OneDrive\Desktop\package\</AppxPackageDir>
5454
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
55-
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
55+
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
5656
<DisableXbfLineInfo>False</DisableXbfLineInfo>
5757
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
5858
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
59-
<GenerateTestArtifacts>False</GenerateTestArtifacts>
59+
<GenerateTestArtifacts>True</GenerateTestArtifacts>
6060
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
6161
<EntryPointProjectUniqueName>..\Files\Files.csproj</EntryPointProjectUniqueName>
62-
<PackageCertificateThumbprint>10EF406F2BC44E3C8E8F85988D53990173626FC1</PackageCertificateThumbprint>
6362
</PropertyGroup>
6463
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
6564
<AppxBundle>Always</AppxBundle>
@@ -153,9 +152,10 @@
153152
<Content Include="Assets\WSL\kali.svg" />
154153
<Content Include="Assets\WSL\opensuse.svg" />
155154
<Content Include="Assets\WSL\ubuntu.svg" />
155+
<None Include="Files.Package_TemporaryKey.pfx" />
156156
<None Include="FilesUwp.Package_StoreKey.pfx" />
157157
<None Include="Package.StoreAssociation.xml" />
158158
<None Include="FilesUwp.Package_TemporaryKey.pfx" />
159159
</ItemGroup>
160160
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
161-
</Project>
161+
</Project>

Files.Package/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" IgnorableNamespaces="uap uap5 mp rescap desktop4 desktop">
3-
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7" Version="0.7.0.0" />
3+
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=Luke Blevins" Version="0.7.1.0" />
44
<Properties>
55
<DisplayName>Files UWP - Preview</DisplayName>
66
<PublisherDisplayName>Yair A</PublisherDisplayName>

Files/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="#191919" />
4242
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="#191919"/>
4343
<SolidColorBrush x:Key="CustomInputFieldBorderBrush" Color="#FF363636"/>
44-
<SolidColorBrush x:Key="TextControlBorderBrush" Color="#FF363636"/>
44+
<!--<SolidColorBrush x:Key="TextControlBorderBrush" Color="#FF363636"/>-->
4545
<SolidColorBrush x:Key="RibbonBackgroundColor" Color="#131313"/>
4646
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="RibbonBackgroundColor"/>
4747
</ResourceDictionary>

Files/App.xaml.cs

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
using Files.CommandLine;
2626
using Files.View_Models;
2727
using Files.Controls;
28+
using NLog;
2829

2930
namespace Files
3031
{
@@ -56,23 +57,40 @@ public static IShellPage CurrentInstance
5657
public static ObservableCollection<WSLDistroItem> linuxDistroItems = new ObservableCollection<WSLDistroItem>();
5758
public static SettingsViewModel AppSettings { get; set; }
5859

60+
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
61+
5962
public App()
6063
{
6164
this.InitializeComponent();
6265
this.Suspending += OnSuspending;
66+
67+
// Initialize NLog
68+
Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
69+
NLog.LogManager.Configuration.Variables["LogPath"] = storageFolder.Path;
70+
71+
RegisterUncaughtExceptionLogger();
72+
6373
consentDialog = new Dialogs.ConsentDialog();
6474
propertiesDialog = new Dialogs.PropertiesDialog();
6575
layoutDialog = new Dialogs.LayoutDialog();
6676
addItemDialog = new Dialogs.AddItemDialog();
6777
exceptionDialog = new Dialogs.ExceptionDialog();
68-
//this.UnhandledException += App_UnhandledException;
78+
// this.UnhandledException += App_UnhandledException;
6979
Clipboard.ContentChanged += Clipboard_ContentChanged;
7080
Clipboard_ContentChanged(null, null);
7181
AppCenter.Start("682666d1-51d3-4e4a-93d0-d028d43baaa0", typeof(Analytics), typeof(Crashes));
7282

7383
AppSettings = new SettingsViewModel();
7484
}
7585

86+
private void RegisterUncaughtExceptionLogger()
87+
{
88+
UnhandledException += (sender, args) =>
89+
{
90+
Logger.Error(args.Exception, args.Message);
91+
};
92+
}
93+
7694
private void CoreWindow_PointerPressed(CoreWindow sender, PointerEventArgs args)
7795
{
7896
if (args.CurrentPoint.Properties.IsXButton1Pressed)
@@ -107,10 +125,17 @@ public static void Clipboard_ContentChanged(object sender, object e)
107125
{
108126
try
109127
{
110-
DataPackageView packageView = Clipboard.GetContent();
111-
if (packageView.Contains(StandardDataFormats.StorageItems) && App.CurrentInstance.CurrentPageType != typeof(YourHome))
128+
if (App.CurrentInstance != null)
112129
{
113-
App.PS.isEnabled = true;
130+
DataPackageView packageView = Clipboard.GetContent();
131+
if (packageView.Contains(StandardDataFormats.StorageItems) && App.CurrentInstance.CurrentPageType != typeof(YourHome))
132+
{
133+
App.PS.isEnabled = true;
134+
}
135+
else
136+
{
137+
App.PS.isEnabled = false;
138+
}
114139
}
115140
else
116141
{
@@ -165,7 +190,9 @@ public static IReadOnlyList<ContentDialog> FindDisplayedContentDialogs<T>()
165190
/// <param name="e">Details about the launch request and process.</param>
166191
protected override void OnLaunched(LaunchActivatedEventArgs e)
167192
{
168-
bool canEnablePrelaunch = Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch");
193+
Logger.Info("App launched");
194+
195+
bool canEnablePrelaunch = Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch");
169196

170197
Frame rootFrame = Window.Current.Content as Frame;
171198

@@ -213,6 +240,8 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
213240

214241
protected override void OnActivated(IActivatedEventArgs args)
215242
{
243+
Logger.Info("App activated");
244+
216245
// Window management
217246
Frame rootFrame = Window.Current.Content as Frame;
218247
if (rootFrame == null)

Files/Assets/StoreLogo.png

-1.42 KB
Binary file not shown.

Files/BaseLayout.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Files
2424
/// <summary>
2525
/// The base class which every layout page must derive from
2626
/// </summary>
27-
public class BaseLayout : Page
27+
public abstract class BaseLayout : Page
2828
{
2929
public bool IsQuickLookEnabled { get; set; } = false;
3030

@@ -95,60 +95,60 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
9595
InstanceTabsView instanceTabsView = rootFrame.Content as InstanceTabsView;
9696
instanceTabsView.TabStrip_SelectionChanged(null, null);
9797
}
98-
App.CurrentInstance.CanRefresh = true;
98+
App.CurrentInstance.NavigationControl.CanRefresh = true;
9999
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.AlwaysPresentCommands.isEnabled = true;
100100
AssociatedViewModel.EmptyTextState.isVisible = Visibility.Collapsed;
101101
App.CurrentInstance.ViewModel.Universal.path = parameters;
102102

103103
if (App.CurrentInstance.ViewModel.Universal.path == Path.GetPathRoot(App.CurrentInstance.ViewModel.Universal.path))
104104
{
105-
(App.CurrentInstance.OperationsControl as RibbonArea).Up.IsEnabled = false;
105+
App.CurrentInstance.NavigationControl.CanNavigateToParent = false;
106106
}
107107
else
108108
{
109-
(App.CurrentInstance.OperationsControl as RibbonArea).Up.IsEnabled = true;
109+
App.CurrentInstance.NavigationControl.CanNavigateToParent = true;
110110
}
111111

112112
App.CurrentInstance.ViewModel.AddItemsToCollectionAsync(App.CurrentInstance.ViewModel.Universal.path);
113113
App.Clipboard_ContentChanged(null, null);
114114

115115
if (parameters.Equals(App.AppSettings.DesktopPath))
116116
{
117-
App.CurrentInstance.PathControlDisplayText = "Desktop";
117+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "Desktop";
118118
}
119119
else if (parameters.Equals(App.AppSettings.DocumentsPath))
120120
{
121-
App.CurrentInstance.PathControlDisplayText = "Documents";
121+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "Documents";
122122
}
123123
else if (parameters.Equals(App.AppSettings.DownloadsPath))
124124
{
125-
App.CurrentInstance.PathControlDisplayText = "Downloads";
125+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "Downloads";
126126
}
127127
else if (parameters.Equals(App.AppSettings.PicturesPath))
128128
{
129-
App.CurrentInstance.PathControlDisplayText = "Pictures";
129+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "Pictures";
130130
}
131131
else if (parameters.Equals(App.AppSettings.MusicPath))
132132
{
133-
App.CurrentInstance.PathControlDisplayText = "Music";
133+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "Music";
134134
}
135135
else if (parameters.Equals(App.AppSettings.OneDrivePath))
136136
{
137-
App.CurrentInstance.PathControlDisplayText = "OneDrive";
137+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "OneDrive";
138138
}
139139
else if (parameters.Equals(App.AppSettings.VideosPath))
140140
{
141-
App.CurrentInstance.PathControlDisplayText = "Videos";
141+
App.CurrentInstance.NavigationControl.PathControlDisplayText = "Videos";
142142
}
143143
else
144144
{
145145
if (parameters.Equals(@"C:\") || parameters.Equals(@"c:\"))
146146
{
147-
App.CurrentInstance.PathControlDisplayText = @"Local Disk (C:\)";
147+
App.CurrentInstance.NavigationControl.PathControlDisplayText = @"Local Disk (C:\)";
148148
}
149149
else
150150
{
151-
App.CurrentInstance.PathControlDisplayText = parameters;
151+
App.CurrentInstance.NavigationControl.PathControlDisplayText = parameters;
152152
}
153153
}
154154
}

Files/Files.csproj

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,21 @@
146146
<Compile Include="CommandLine\ParsedCommand.cs" />
147147
<Compile Include="CommandLine\ParsedCommands.cs" />
148148
<Compile Include="CommandLine\ParsedCommandType.cs" />
149-
<Compile Include="UserControls\RibbonArea.xaml.cs">
149+
<Compile Include="UserControls\NavigationToolbar\INavigationToolbar.cs" />
150+
<Compile Include="UserControls\NavigationToolbar\NavigationToolbar.xaml.cs">
151+
<DependentUpon>NavigationToolbar.xaml</DependentUpon>
152+
</Compile>
153+
<Compile Include="UserControls\Ribbon\IRibbonItem.cs" />
154+
<Compile Include="UserControls\Ribbon\RibbonArea.xaml.cs">
150155
<DependentUpon>RibbonArea.xaml</DependentUpon>
151156
</Compile>
152-
<Compile Include="UserControls\RibbonPage.xaml.cs">
157+
<Compile Include="UserControls\Ribbon\RibbonCommandItem.xaml.cs">
158+
<DependentUpon>RibbonCommandItem.xaml</DependentUpon>
159+
</Compile>
160+
<Compile Include="UserControls\Ribbon\RibbonDividerItem.xaml.cs">
161+
<DependentUpon>RibbonDividerItem.xaml</DependentUpon>
162+
</Compile>
163+
<Compile Include="UserControls\Ribbon\RibbonPage.xaml.cs">
153164
<DependentUpon>RibbonPage.xaml</DependentUpon>
154165
</Compile>
155166
<Compile Include="UserControls\Sidebar.xaml.cs">
@@ -267,9 +278,11 @@
267278
<None Include="Assets\terminal\terminal.json">
268279
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
269280
</None>
281+
<None Include="NLog.config">
282+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
283+
</None>
270284
<None Include="Package.StoreAssociation.xml" />
271285
<Content Include="Assets\QuickLook\quicklook_icon_black.png" />
272-
<Content Include="Assets\StoreLogo.png" />
273286
<Content Include="Assets\WSL\alpine.svg" />
274287
<Content Include="Assets\WSL\alpinepng.png" />
275288
<Content Include="Assets\WSL\debian.svg" />
@@ -283,6 +296,7 @@
283296
<Content Include="Assets\WSL\ubuntu.svg" />
284297
<Content Include="Assets\WSL\ubuntupng.png" />
285298
<Content Include="Properties\Default.rd.xml" />
299+
<PRIResource Include="Strings\pl-PL\Resources.resw" />
286300
<PRIResource Include="Strings\nl-NL\Resources.resw" />
287301
<PRIResource Include="Strings\zh-Hans\Resources.resw" />
288302
<PRIResource Include="Strings\de-DE\Resources.resw" />
@@ -295,11 +309,23 @@
295309
<Generator>MSBuild:Compile</Generator>
296310
<SubType>Designer</SubType>
297311
</ApplicationDefinition>
298-
<Page Include="UserControls\RibbonArea.xaml">
312+
<Page Include="UserControls\NavigationToolbar\NavigationToolbar.xaml">
299313
<SubType>Designer</SubType>
300314
<Generator>MSBuild:Compile</Generator>
301315
</Page>
302-
<Page Include="UserControls\RibbonPage.xaml">
316+
<Page Include="UserControls\Ribbon\RibbonArea.xaml">
317+
<SubType>Designer</SubType>
318+
<Generator>MSBuild:Compile</Generator>
319+
</Page>
320+
<Page Include="UserControls\Ribbon\RibbonCommandItem.xaml">
321+
<SubType>Designer</SubType>
322+
<Generator>MSBuild:Compile</Generator>
323+
</Page>
324+
<Page Include="UserControls\Ribbon\RibbonDividerItem.xaml">
325+
<SubType>Designer</SubType>
326+
<Generator>MSBuild:Compile</Generator>
327+
</Page>
328+
<Page Include="UserControls\Ribbon\RibbonPage.xaml">
303329
<SubType>Designer</SubType>
304330
<Generator>MSBuild:Compile</Generator>
305331
</Page>
@@ -444,6 +470,12 @@
444470
<PackageReference Include="Newtonsoft.Json">
445471
<Version>12.0.3</Version>
446472
</PackageReference>
473+
<PackageReference Include="NLog">
474+
<Version>4.6.8</Version>
475+
</PackageReference>
476+
<PackageReference Include="NLog.Schema">
477+
<Version>4.6.8</Version>
478+
</PackageReference>
447479
</ItemGroup>
448480
<ItemGroup>
449481
<SDKReference Include="WindowsDesktop, Version=10.0.18362.0">
@@ -460,6 +492,7 @@
460492
<XliffResource Include="MultilingualResources\Files.es-ES.xlf" />
461493
<XliffResource Include="MultilingualResources\Files.fr-FR.xlf" />
462494
<XliffResource Include="MultilingualResources\Files.nl-NL.xlf" />
495+
<XliffResource Include="MultilingualResources\Files.pl-PL.xlf" />
463496
<XliffResource Include="MultilingualResources\Files.zh-Hans.xlf" />
464497
</ItemGroup>
465498
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">

0 commit comments

Comments
 (0)