Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions Files.Launcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ static void Main(string[] args)
{
if (arguments.Equals("StartupTasks"))
{
// Detect User Paths
ApplicationData.Current.LocalSettings.Values["DesktopPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Desktop", null);
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);
ApplicationData.Current.LocalSettings.Values["DocumentsPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Personal", null);
ApplicationData.Current.LocalSettings.Values["PicturesPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Pictures", null);
ApplicationData.Current.LocalSettings.Values["MusicPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Music", null);
ApplicationData.Current.LocalSettings.Values["VideosPath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "My Video", null);
ApplicationData.Current.LocalSettings.Values["OneDrivePath"] = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\OneDrive", "UserFolder", null);

// Check QuickLook Availability
// Check QuickLook Availability
QuickLook.CheckQuickLookAvailability(localSettings);
}
else if (arguments.Equals("ToggleQuickLook"))
Expand Down
2 changes: 1 addition & 1 deletion Files/MultilingualResources/Files.es-ES.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,4 @@
</group>
</body>
</file>
</xliff>
</xliff>
3 changes: 3 additions & 0 deletions Files/Strings/es-ES/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,7 @@
<data name="SettingsPageHeader.Text" xml:space="preserve">
<value>Ajustes</value>
</data>
<data name="StatusBarControlInvertSelection.Text" xml:space="preserve">
<value>Invertir Selección</value>
</data>
</root>
2 changes: 1 addition & 1 deletion Files/UserControls/LayoutModes/GenericFileBrowser.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@
DoubleTapped="{x:Bind local:App.CurrentInstance.InteractionOperations.List_ItemClick}"
DragOver="List_DragOver"
Drop="List_Drop"
LoadingRow="AllView_LoadingRow"
FocusVisualPrimaryThickness="0"
IsDoubleTapEnabled="True"
IsRightTapEnabled="True"
ItemsSource="{x:Bind AssociatedViewModel.FilesAndFolders, Mode=OneWay}"
LoadingRow="AllView_LoadingRow"
PreparingCellForEdit="AllView_PreparingCellForEdit"
PreviewKeyDown="AllView_PreviewKeyDown"
RightTapped="{x:Bind local:App.CurrentInstance.InteractionOperations.AllView_RightTapped}"
Expand Down
6 changes: 3 additions & 3 deletions Files/UserControls/StatusBarControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@
<MenuFlyout>
<MenuFlyoutItem
x:Uid="StatusBarControlSelectAll"
Icon="SelectAll"
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.SelectAllItems}"
Icon="SelectAll"
Text="Select All" />
<MenuFlyoutItem
x:Uid="StatusBarControlInvertSelection"
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.InvertAllItems}"
Text="Invert Selection">
<MenuFlyoutItem.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE746;"/>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE746;" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem
x:Uid="StatusBarControlClearSelection"
Icon="ClearSelection"
Click="{x:Bind local1:App.CurrentInstance.InteractionOperations.ClearAllItems}"
Icon="ClearSelection"
Text="Clear Selection" />
</MenuFlyout>
</Button.Flyout>
Expand Down
56 changes: 14 additions & 42 deletions Files/View Models/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,20 @@ public bool PinOneDriveToSideBar
}
}

public string DesktopPath = UserDataPaths.GetDefault().Desktop;

public string DocumentsPath = UserDataPaths.GetDefault().Documents;

public string DownloadsPath = UserDataPaths.GetDefault().Downloads;

public string PicturesPath = UserDataPaths.GetDefault().Pictures;

public string MusicPath = UserDataPaths.GetDefault().Music;

public string VideosPath = UserDataPaths.GetDefault().Videos;

public string OneDrivePath = Environment.GetEnvironmentVariable("OneDrive");

private string _TempPath = (string)Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Environment", "TEMP", null);
public string TempPath
{
Expand Down Expand Up @@ -468,48 +482,6 @@ public string WinDirPath
set => Set(ref _WinDirPath, value);
}

public string DesktopPath
{
get => Get(UserDataPaths.GetDefault().Desktop);
set => Set(value);
}

public string DocumentsPath
{
get => Get(UserDataPaths.GetDefault().Documents);
set => Set(value);
}

public string DownloadsPath
{
get => Get(UserDataPaths.GetDefault().Downloads);
set => Set(value);
}

public string PicturesPath
{
get => Get(UserDataPaths.GetDefault().Pictures);
set => Set(value);
}

public string MusicPath
{
get => Get(UserDataPaths.GetDefault().Music);
set => Set(value);
}

public string VideosPath
{
get => Get(UserDataPaths.GetDefault().Videos);
set => Set(value);
}

public string OneDrivePath
{
get => Get(Environment.GetEnvironmentVariable("OneDrive"));
set => Set(value);
}

public bool AcrylicSidebar
{
get => Get(false);
Expand Down