Skip to content

Commit 09f5cb1

Browse files
authored
v0.7.7 (#628)
1 parent 16171ff commit 09f5cb1

Some content is hidden

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

45 files changed

+2665
-1079
lines changed

Files.Launcher/Program.cs

+1-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,7 @@ static void Main(string[] args)
1717
{
1818
if (arguments.Equals("StartupTasks"))
1919
{
20-
// Detect User Paths
21-
ApplicationData.Current.LocalSettings.Values["DesktopPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Desktop", null);
22-
ApplicationData.Current.LocalSettings.Values["DownloadsPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", null);
23-
ApplicationData.Current.LocalSettings.Values["DocumentsPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Personal", null);
24-
ApplicationData.Current.LocalSettings.Values["PicturesPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Pictures", null);
25-
ApplicationData.Current.LocalSettings.Values["MusicPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Music", null);
26-
ApplicationData.Current.LocalSettings.Values["VideosPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Video", null);
27-
ApplicationData.Current.LocalSettings.Values["OneDrivePath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\OneDrive", "UserFolder", null);
28-
29-
// Check QuickLook Availability
20+
// Check QuickLook Availability
3021
QuickLook.CheckQuickLookAvailability(localSettings);
3122
}
3223
else if (arguments.Equals("ToggleQuickLook"))

Files.Package/Package.appxmanifest

+2-2
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.6.0" />
3+
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7" Version="0.7.7.0" />
44
<Properties>
55
<DisplayName>Files UWP - Preview</DisplayName>
66
<PublisherDisplayName>Yair A</PublisherDisplayName>
@@ -48,7 +48,7 @@
4848
</Application>
4949
</Applications>
5050
<Capabilities>
51-
<rescap:Capability Name="packageQuery"/>
51+
<!--<rescap:Capability Name="packageQuery"/>-->
5252
<rescap:Capability Name="runFullTrust" />
5353
<rescap:Capability Name="broadFileSystemAccess" />
5454
<uap:Capability Name="removableStorage" />

Files/App.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private void CoreWindow_PointerPressed(CoreWindow sender, PointerEventArgs args)
9898
{
9999
NavigationActions.Back_Click(null, null);
100100
}
101-
else if (args.CurrentPoint.Properties.IsXButton1Pressed)
101+
else if (args.CurrentPoint.Properties.IsXButton2Pressed)
102102
{
103103
NavigationActions.Forward_Click(null, null);
104104
}

Files/Files.csproj

+7-5
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
<Compile Include="Views\Pages\ModernShellPage.xaml.cs">
218218
<DependentUpon>ModernShellPage.xaml</DependentUpon>
219219
</Compile>
220-
<Compile Include="Properties.xaml.cs">
220+
<Compile Include="Views\Pages\Properties.xaml.cs">
221221
<DependentUpon>Properties.xaml</DependentUpon>
222222
</Compile>
223223
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -240,8 +240,8 @@
240240
<Compile Include="Views\SettingsPages\Appearance.xaml.cs">
241241
<DependentUpon>Appearance.xaml</DependentUpon>
242242
</Compile>
243-
<Compile Include="Views\SettingsPages\Flags.xaml.cs">
244-
<DependentUpon>Flags.xaml</DependentUpon>
243+
<Compile Include="Views\SettingsPages\Experimental.xaml.cs">
244+
<DependentUpon>Experimental.xaml</DependentUpon>
245245
</Compile>
246246
<Compile Include="Views\SettingsPages\Preferences.xaml.cs">
247247
<DependentUpon>Preferences.xaml</DependentUpon>
@@ -332,6 +332,7 @@
332332
<Content Include="Assets\WSL\ubuntu.svg" />
333333
<Content Include="Assets\WSL\ubuntupng.png" />
334334
<Content Include="Properties\Default.rd.xml" />
335+
<PRIResource Include="Strings\it-IT\Resources.resw" />
335336
<PRIResource Include="Strings\uk-UA\Resources.resw" />
336337
<PRIResource Include="Strings\tr-TR\Resources.resw" />
337338
<PRIResource Include="Strings\ru-RU\Resources.resw" />
@@ -408,7 +409,7 @@
408409
<SubType>Designer</SubType>
409410
<Generator>MSBuild:Compile</Generator>
410411
</Page>
411-
<Page Include="Properties.xaml">
412+
<Page Include="Views\Pages\Properties.xaml">
412413
<SubType>Designer</SubType>
413414
<Generator>MSBuild:Compile</Generator>
414415
</Page>
@@ -436,7 +437,7 @@
436437
<SubType>Designer</SubType>
437438
<Generator>MSBuild:Compile</Generator>
438439
</Page>
439-
<Page Include="Views\SettingsPages\Flags.xaml">
440+
<Page Include="Views\SettingsPages\Experimental.xaml">
440441
<Generator>MSBuild:Compile</Generator>
441442
<SubType>Designer</SubType>
442443
</Page>
@@ -516,6 +517,7 @@
516517
<XliffResource Include="MultilingualResources\Files.de-DE.xlf" />
517518
<XliffResource Include="MultilingualResources\Files.es-ES.xlf" />
518519
<XliffResource Include="MultilingualResources\Files.fr-FR.xlf" />
520+
<XliffResource Include="MultilingualResources\Files.it-IT.xlf" />
519521
<XliffResource Include="MultilingualResources\Files.nl-NL.xlf" />
520522
<XliffResource Include="MultilingualResources\Files.pl-PL.xlf" />
521523
<XliffResource Include="MultilingualResources\Files.ru-RU.xlf" />

Files/Interacts/Interaction.cs

+38-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Files.Filesystem;
33
using Microsoft.Toolkit.Uwp.UI.Controls;
44
using System;
5-
using System.Collections;
65
using System.Collections.Generic;
76
using System.Collections.ObjectModel;
87
using System.Diagnostics;
@@ -32,8 +31,6 @@
3231
using Windows.UI.Xaml.Hosting;
3332
using Windows.UI.WindowManagement.Preview;
3433
using Windows.UI;
35-
using Files.View_Models;
36-
using System.Security.Cryptography;
3734
using Windows.Security.Cryptography.Core;
3835
using Microsoft.Toolkit.Uwp.Helpers;
3936
using Windows.Security.Cryptography;
@@ -111,11 +108,22 @@ public async void OpenDirectoryInNewTab_Click(object sender, RoutedEventArgs e)
111108
var items = (CurrentInstance.ContentPage as BaseLayout).SelectedItems;
112109
foreach (ListedItem listedItem in items)
113110
{
114-
await CoreWindow.GetForCurrentThread().Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>
111+
await CoreWindow.GetForCurrentThread().Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>
115112
{
116113
instanceTabsView.AddNewTab(typeof(ModernShellPage), listedItem.ItemPath);
117114
});
118115
}
116+
}
117+
118+
public void OpenPathInNewTab(string path)
119+
{
120+
instanceTabsView.AddNewTab(typeof(ModernShellPage), path);
121+
}
122+
123+
public async void OpenPathInNewWindow(string path)
124+
{
125+
var folderUri = new Uri("files-uwp:" + "?folder=" + path);
126+
await Launcher.LaunchUriAsync(folderUri);
119127
}
120128

121129
public async void OpenDirectoryInTerminal(object sender, RoutedEventArgs e)
@@ -254,7 +262,7 @@ public void AllView_RightTapped(object sender, RightTappedRoutedEventArgs e)
254262
if (App.CurrentInstance.ContentPage.SelectedItems.Contains(ObjectPressed))
255263
return;
256264
}
257-
265+
258266
// The following code is only reachable when a user RightTapped an unselected row
259267
dataGrid.SelectedItems.Clear();
260268
dataGrid.SelectedItems.Add(ObjectPressed);
@@ -436,17 +444,32 @@ public async void ShowPropertiesButton_Click(object sender, RoutedEventArgs e)
436444
{
437445
AppWindow appWindow = await AppWindow.TryCreateAsync();
438446
Frame frame = new Frame();
447+
appWindow.TitleBar.ExtendsContentIntoTitleBar = true;
448+
var titleBar = appWindow.TitleBar;
449+
titleBar.ButtonBackgroundColor = Colors.Transparent;
450+
titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
451+
var selectedTheme = Application.Current.RequestedTheme;
452+
if (selectedTheme == ApplicationTheme.Light)
453+
{
454+
titleBar.ButtonForegroundColor = Color.FromArgb(255, 0, 0, 0);
455+
titleBar.ButtonHoverBackgroundColor = Color.FromArgb(20, 0, 0, 0);
456+
}
457+
else if (selectedTheme == ApplicationTheme.Dark)
458+
{
459+
titleBar.ButtonHoverBackgroundColor = Color.FromArgb(40, 255, 255, 255);
460+
}
439461
frame.Navigate(typeof(Properties), null, new SuppressNavigationTransitionInfo());
440462
WindowManagementPreview.SetPreferredMinSize(appWindow, new Size(400, 475));
463+
441464
appWindow.RequestSize(new Size(400, 475));
442-
appWindow.Title = "Properties";
465+
appWindow.Title = ResourceController.GetTranslation("PropertiesTitle");
443466

444467
ElementCompositionPreview.SetAppWindowContent(appWindow, frame);
445468
AppWindows.Add(frame.UIContext, appWindow);
446469

447470
appWindow.Closed += delegate
448471
{
449-
Interaction.AppWindows.Remove(frame.UIContext);
472+
AppWindows.Remove(frame.UIContext);
450473
frame.Content = null;
451474
appWindow = null;
452475
};
@@ -470,7 +493,7 @@ public async void ShowFolderPropertiesButton_Click(object sender, RoutedEventArg
470493
frame.Navigate(typeof(Properties), null, new SuppressNavigationTransitionInfo());
471494
WindowManagementPreview.SetPreferredMinSize(appWindow, new Size(400, 475));
472495
appWindow.RequestSize(new Size(400, 475));
473-
appWindow.Title = "Properties";
496+
appWindow.Title = ResourceController.GetTranslation("PropertiesTitle");
474497

475498
ElementCompositionPreview.SetAppWindowContent(appWindow, frame);
476499
AppWindows.Add(frame.UIContext, appWindow);
@@ -643,7 +666,7 @@ public async void DeleteItem_Click(object sender, RoutedEventArgs e)
643666
catch (FileNotFoundException)
644667
{
645668
Debug.WriteLine("Attention: Tried to delete an item that could be found");
646-
}
669+
}
647670

648671
App.InteractionViewModel.PermanentlyDelete = false; //reset PermanentlyDelete flag
649672
}
@@ -686,7 +709,7 @@ public async Task<bool> RenameFileItem(ListedItem item, string oldName, string n
686709
}
687710

688711
catch (Exception)
689-
712+
690713
{
691714
var dialog = new ContentDialog()
692715
{
@@ -730,7 +753,7 @@ public async Task<bool> RenameFileItem(ListedItem item, string oldName, string n
730753
}
731754
}
732755
}
733-
756+
734757
CurrentInstance.NavigationToolbar.CanGoForward = false;
735758
return true;
736759
}
@@ -772,7 +795,8 @@ public async void CutItem_Click(object sender, RoutedEventArgs e)
772795
if (App.CurrentInstance.CurrentPageType == typeof(GenericFileBrowser))
773796
{
774797
(CurrentInstance.ContentPage as GenericFileBrowser).AllView.Columns[0].GetCellContent(listedItem).Opacity = 0.4;
775-
} else if (App.CurrentInstance.CurrentPageType == typeof(PhotoAlbum))
798+
}
799+
else if (App.CurrentInstance.CurrentPageType == typeof(PhotoAlbum))
776800
{
777801
GridViewItem itemToDimForCut = (GridViewItem)(CurrentInstance.ContentPage as PhotoAlbum).FileList.ContainerFromItem(listedItem);
778802
List<Grid> itemContentGrids = new List<Grid>();
@@ -934,7 +958,7 @@ public async Task PasteItems(DataPackageView packageView, string destinationPath
934958

935959
if (acceptedOperation == DataPackageOperation.Move)
936960
{
937-
foreach (IStorageItem item in pastedItems)
961+
foreach (IStorageItem item in itemsToPaste)
938962
{
939963
if (item.IsOfType(StorageItemTypes.File))
940964
{
@@ -970,7 +994,7 @@ public async Task<StorageFolder> CloneDirectoryAsync(string SourcePath, string D
970994

971995
foreach (StorageFile fileInSourceDir in await SourceFolder.GetFilesAsync())
972996
{
973-
if(itemsToPaste != null)
997+
if (itemsToPaste != null)
974998
{
975999
if (itemsToPaste.Count > 3 && !suppressProgressFlyout)
9761000
{

Files/MultilingualResources/Files.de-DE.xlf

+40-8
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,6 @@
176176
<source>Unpin from Sidebar</source>
177177
<target state="translated">Von Seitenleiste entfernen</target>
178178
</trans-unit>
179-
<trans-unit id="SettingsFlagsTitle.Text" translate="yes" xml:space="preserve">
180-
<source>Flags</source>
181-
<target state="translated">Flags</target>
182-
</trans-unit>
183179
<trans-unit id="ConfirmDeleteDialog.Title" translate="yes" xml:space="preserve">
184180
<source>Delete Item(s)</source>
185181
<target state="translated">Löschen</target>
@@ -321,10 +317,6 @@
321317
<source>Extract</source>
322318
<target state="translated">Entpacken</target>
323319
</trans-unit>
324-
<trans-unit id="BaseLayoutItemContextFlyoutOpenWith.Text" translate="yes" xml:space="preserve">
325-
<source>Open with...</source>
326-
<target state="translated">Öffnen mit...</target>
327-
</trans-unit>
328320
<trans-unit id="BaseLayoutItemContextFlyoutOpenInNewTab.Text" translate="yes" xml:space="preserve">
329321
<source>Open in new tab</source>
330322
<target state="translated">In neuem Tab öffnen</target>
@@ -582,6 +574,46 @@
582574
<source>Invert Selection</source>
583575
<target state="new">Invert Selection</target>
584576
</trans-unit>
577+
<trans-unit id="BaseLayoutItemContextFlyoutOpenItem.Text" translate="yes" xml:space="preserve">
578+
<source>Open</source>
579+
<target state="new">Open</target>
580+
</trans-unit>
581+
<trans-unit id="PropertiesTitle" translate="yes" xml:space="preserve">
582+
<source>Properties</source>
583+
<target state="new">Properties</target>
584+
</trans-unit>
585+
<trans-unit id="PropertiesAttributes.Text" translate="yes" xml:space="preserve">
586+
<source>Attributes:</source>
587+
<target state="new">Attributes:</target>
588+
</trans-unit>
589+
<trans-unit id="PropertiesTitleSecondary.Text" translate="yes" xml:space="preserve">
590+
<source>Properties</source>
591+
<target state="new">Properties</target>
592+
</trans-unit>
593+
<trans-unit id="SideBarOpenInNewTab.Text" translate="yes" xml:space="preserve">
594+
<source>Open in new tab</source>
595+
<target state="new">Open in new tab</target>
596+
</trans-unit>
597+
<trans-unit id="SideBarOpenInNewWindow.Text" translate="yes" xml:space="preserve">
598+
<source>Open in new window</source>
599+
<target state="new">Open in new window</target>
600+
</trans-unit>
601+
<trans-unit id="SettingsExperimentalTitle.Text" translate="yes" xml:space="preserve">
602+
<source>Experimental</source>
603+
<target state="new">Experimental</target>
604+
</trans-unit>
605+
<trans-unit id="SettingsExperimentalDescription.Text" translate="yes" xml:space="preserve">
606+
<source>WARNING: EXPERIMENTAL FEATURES AHEAD!</source>
607+
<target state="new">WARNING: EXPERIMENTAL FEATURES AHEAD!</target>
608+
</trans-unit>
609+
<trans-unit id="SettingsNavExperimental.Content" translate="yes" xml:space="preserve">
610+
<source>Experimental</source>
611+
<target state="new">Experimental</target>
612+
</trans-unit>
613+
<trans-unit id="SettingsExperimentalDoubleTapToRenameFiles.Text" translate="yes" xml:space="preserve">
614+
<source>Double tap to rename files</source>
615+
<target state="new">Double tap to rename files</target>
616+
</trans-unit>
585617
</group>
586618
</body>
587619
</file>

0 commit comments

Comments
 (0)