Skip to content

Commit 8c5597a

Browse files
committed
Merge branch 'v0.7-changes' into feat/Terminal
2 parents 0be17e7 + 3ac95b9 commit 8c5597a

21 files changed

+281
-136
lines changed

Files.Launcher/Program.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Diagnostics;
1+
using System.ComponentModel;
2+
using System.Diagnostics;
23
using System.IO;
34
using System.IO.Pipes;
45
using System.Security.Principal;
@@ -55,15 +56,22 @@ static void Main(string[] args)
5556
process.StartInfo.CreateNoWindow = true;
5657
process.Start();
5758
}
58-
catch (System.ComponentModel.Win32Exception)
59+
catch (Win32Exception)
5960
{
6061
var executable = (string)ApplicationData.Current.LocalSettings.Values["Application"];
6162
Process process = new Process();
6263
process.StartInfo.UseShellExecute = true;
6364
process.StartInfo.Verb = "runas";
6465
process.StartInfo.FileName = executable;
6566
process.StartInfo.CreateNoWindow = true;
66-
process.Start();
67+
try
68+
{
69+
process.Start();
70+
}
71+
catch (Win32Exception)
72+
{
73+
Process.Start(executable);
74+
}
6775
}
6876

6977

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 mp rescap desktop4 desktop">
3-
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7" Version="0.6.6.0" />
3+
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7" Version="0.7.0.0" />
44
<Properties>
55
<DisplayName>Files</DisplayName>
66
<PublisherDisplayName>Yair A</PublisherDisplayName>

Files/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ private async void DetectWSLDistros()
258258
var distroFolder = await StorageFolder.GetFolderFromPathAsync(@"\\wsl$\");
259259
if ((await distroFolder.GetFoldersAsync()).Count > 0)
260260
{
261-
areLinuxFilesSupported = true;
261+
areLinuxFilesSupported = false;
262262
}
263263

264264
foreach (StorageFolder folder in await distroFolder.GetFoldersAsync())

Files/Assets/FolderIcon.svg

Lines changed: 28 additions & 0 deletions
Loading

Files/Controls/RibbonArea.xaml

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,71 @@
875875
</Setter.Value>
876876
</Setter>
877877
</Style>
878+
<Style x:Key="ListViewItemContainerStyle_NoRevealBorder" TargetType="ListViewItem">
879+
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
880+
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
881+
<Setter Property="Background" Value="{ThemeResource ListViewItemBackground}"/>
882+
<Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}"/>
883+
<Setter Property="TabNavigation" Value="Local"/>
884+
<Setter Property="IsHoldingEnabled" Value="True"/>
885+
<Setter Property="Padding" Value="5,0,0,0"/>
886+
<Setter Property="HorizontalContentAlignment" Value="Left"/>
887+
<Setter Property="VerticalContentAlignment" Value="Center"/>
888+
<Setter Property="MinWidth" Value="8"/>
889+
<Setter Property="MinHeight" Value="20"/>
890+
<Setter Property="AllowDrop" Value="False"/>
891+
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}"/>
892+
<Setter Property="FocusVisualMargin" Value="0"/>
893+
<Setter Property="Template">
894+
<Setter.Value>
895+
<ControlTemplate TargetType="ListViewItem">
896+
<ListViewItemPresenter x:Name="Root" CheckBrush="{ThemeResource ListViewItemCheckBrush}" ContentMargin="{TemplateBinding Padding}" CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}" ContentTransitions="{TemplateBinding ContentTransitions}" CheckMode="{ThemeResource ListViewItemCheckMode}" DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}" DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}" DragBackground="{ThemeResource ListViewItemDragBackground}" DragForeground="{ThemeResource ListViewItemDragForeground}" FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}" FocusVisualMargin="{TemplateBinding FocusVisualMargin}" FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Control.IsTemplateFocusTarget="True" PressedBackground="{ThemeResource ListViewItemBackgroundPressed}" PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}" PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}" PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}" RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}" ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}" RevealBackground="{ThemeResource ListViewItemRevealBackground}" SelectedForeground="{ThemeResource ListViewItemForegroundSelected}" SelectionCheckMarkVisualEnabled="{ThemeResource ListViewItemSelectionCheckMarkVisualEnabled}" SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}" SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}" SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
897+
<VisualStateManager.VisualStateGroups>
898+
<VisualStateGroup x:Name="CommonStates">
899+
<VisualState x:Name="Normal"/>
900+
<VisualState x:Name="Selected"/>
901+
</VisualStateGroup>
902+
<VisualStateGroup x:Name="DisabledStates">
903+
<VisualState x:Name="Enabled"/>
904+
<VisualState x:Name="Disabled">
905+
<VisualState.Setters>
906+
<Setter Target="Root.RevealBorderThickness" Value="0"/>
907+
</VisualState.Setters>
908+
</VisualState>
909+
</VisualStateGroup>
910+
</VisualStateManager.VisualStateGroups>
911+
</ListViewItemPresenter>
912+
</ControlTemplate>
913+
</Setter.Value>
914+
</Setter>
915+
</Style>
916+
<SolidColorBrush x:Key="SystemControlSplitterPointerOver" Color="{ThemeResource SystemBaseLowColor}"/>
917+
<SolidColorBrush x:Key="SystemControlSplitterPressed" Color="{ThemeResource SystemBaseHighColor}"/>
918+
<Style x:Key="GridSplitterStyle_Invisible" TargetType="Custom:GridSplitter">
919+
<Setter Property="IsTabStop" Value="True"/>
920+
<Setter Property="UseSystemFocusVisuals" Value="True"/>
921+
<Setter Property="HorizontalAlignment" Value="Stretch"/>
922+
<Setter Property="VerticalAlignment" Value="Stretch"/>
923+
<Setter Property="IsFocusEngagementEnabled" Value="True"/>
924+
<Setter Property="MinWidth" Value="2"/>
925+
<Setter Property="MinHeight" Value="16"/>
926+
<Setter Property="Background" Value="{ThemeResource SystemControlHighlightChromeHighBrush}"/>
927+
<Setter Property="GripperForeground" Value="{ThemeResource SystemControlForegroundAltHighBrush}"/>
928+
<Setter Property="Template">
929+
<Setter.Value>
930+
<ControlTemplate TargetType="Custom:GridSplitter">
931+
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
932+
<VisualStateManager.VisualStateGroups>
933+
<VisualStateGroup x:Name="GridSplitterStates">
934+
<VisualState x:Name="Normal"/>
935+
</VisualStateGroup>
936+
</VisualStateManager.VisualStateGroups>
937+
<ContentPresenter Content="{TemplateBinding Element}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
938+
</Grid>
939+
</ControlTemplate>
940+
</Setter.Value>
941+
</Setter>
942+
</Style>
878943

879944
</UserControl.Resources>
880945

@@ -1164,14 +1229,14 @@
11641229
<MenuFlyoutItem x:Name="ManualPathEntryItem" Text="Edit address" Icon="Edit" Click="ManualPathEntryItem_Click"/>
11651230
</MenuFlyout>
11661231
</Grid.ContextFlyout>
1167-
<ListView Background="{ThemeResource TextControlBackground}" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto"
1232+
<ListView ItemContainerStyle="{StaticResource ListViewItemContainerStyle_NoRevealBorder}" Background="{ThemeResource TextControlBackground}" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto"
11681233
ScrollViewer.HorizontalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Disabled"
11691234
ItemClick="PathViewInteract_ItemClick" ItemsSource="{x:Bind parentPage.pathBoxItems}" HorizontalContentAlignment="Stretch" x:Name="PathViewInteract" SelectionMode="None" IsItemClickEnabled="True" SelectionChanged="ClickablePathView_SelectionChanged" VerticalContentAlignment="Stretch" CanReorderItems="False" VerticalAlignment="Stretch">
11701235
<ListView.ItemTemplate>
11711236
<DataTemplate>
11721237
<Grid x:Name="ListViewItemContentGrid" Tag="{Binding Path}" Background="Transparent">
11731238
<StackPanel Spacing="5" Orientation="Horizontal">
1174-
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" FontSize="14" Margin="0,0,0,4"/>
1239+
<TextBlock Text="{Binding Title}" FontWeight="Medium" FontSize="14" Margin="0,0,0,4"/>
11751240
<FontIcon FontSize="8" Glyph="&#xE76C;"/>
11761241
</StackPanel>
11771242
</Grid>
@@ -1182,18 +1247,18 @@
11821247
<StackPanel Background="Transparent" Orientation="Horizontal" />
11831248
</ItemsPanelTemplate>
11841249
</ListView.ItemsPanel>
1185-
<ListView.ItemContainerStyle>
1250+
<!--<ListView.ItemContainerStyle>
11861251
<Style TargetType="ListViewItem">
11871252
<Setter Property="Padding" Value="5,0,0,0"/>
11881253
<Setter Property="MinHeight" Value="20"/>
11891254
<Setter Property="MinWidth" Value="8"/>
11901255
<Setter Property="BorderThickness" Value="0"/>
11911256
</Style>
1192-
</ListView.ItemContainerStyle>
1257+
</ListView.ItemContainerStyle>-->
11931258
</ListView>
11941259
</Grid>
11951260
</Grid>
1196-
<Custom:GridSplitter x:Name="SearchBoxResizer" Foreground="Transparent" Background="Transparent" GripperCursor="SizeWestEast" HorizontalAlignment="Right" Width="Auto" Grid.Column="1" ResizeBehavior="CurrentAndNext" ResizeDirection="Columns"/>
1261+
<Custom:GridSplitter Style="{StaticResource GridSplitterStyle_Invisible}" Element="{x:Null}" x:Name="SearchBoxResizer" GripperForeground="Transparent" Background="Transparent" GripperCursor="SizeWestEast" HorizontalAlignment="Right" MinWidth="4" Width="4" Grid.Column="1" ResizeBehavior="CurrentAndNext" ResizeDirection="Columns"/>
11971262
<AutoSuggestBox MaxWidth="485" QueryIcon="Find" PlaceholderText="Search" x:Name="SearchReigon" Grid.Column="2" Margin="0,0,4,0" VerticalAlignment="Center">
11981263
<AutoSuggestBox.Resources>
11991264
<StaticResource x:Key="TextControlBorderBrush" ResourceKey="CustomInputFieldBorderBrush"/>

Files/Controls/RibbonArea.xaml.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ public async void CheckPathInput(ItemViewModel instance, string CurrentInput)
155155
{
156156
if (parentPage.ItemDisplayFrame.SourcePageType == typeof(GenericFileBrowser))
157157
{
158-
await Interaction.LaunchExe(CurrentInput);
158+
await Interaction.InvokeWin32Component(CurrentInput);
159159
}
160160
else if (parentPage.ItemDisplayFrame.SourcePageType == typeof(PhotoAlbum))
161161
{
162-
await Interaction.LaunchExe(CurrentInput);
162+
await Interaction.InvokeWin32Component(CurrentInput);
163163
}
164164

165165
VisiblePath.Text = instance.Universal.path;
@@ -305,16 +305,8 @@ private async void LayoutButton_Click(object sender, RoutedEventArgs e)
305305

306306
public async void ShowPropertiesButton_Click(object sender, RoutedEventArgs e)
307307
{
308-
if (parentPage.ItemDisplayFrame.SourcePageType == typeof(GenericFileBrowser))
309-
{
310-
App.propertiesDialog.accessiblePropertiesFrame.Tag = App.propertiesDialog;
311-
App.propertiesDialog.accessiblePropertiesFrame.Navigate(typeof(Properties), (parentPage.ItemDisplayFrame.Content as GenericFileBrowser).AllView.SelectedItems, new SuppressNavigationTransitionInfo());
312-
}
313-
else if (parentPage.ItemDisplayFrame.SourcePageType == typeof(PhotoAlbum))
314-
{
315-
App.propertiesDialog.accessiblePropertiesFrame.Tag = App.propertiesDialog;
316-
App.propertiesDialog.accessiblePropertiesFrame.Navigate(typeof(Properties), (parentPage.ItemDisplayFrame.Content as PhotoAlbum).FileList.SelectedItems, new SuppressNavigationTransitionInfo());
317-
}
308+
App.propertiesDialog.accessiblePropertiesFrame.Tag = App.propertiesDialog;
309+
App.propertiesDialog.accessiblePropertiesFrame.Navigate(typeof(Properties), (App.OccupiedInstance.ItemDisplayFrame.Content as BaseLayout).SelectedItem, new SuppressNavigationTransitionInfo());
318310
await App.propertiesDialog.ShowAsync(ContentDialogPlacement.Popup);
319311
}
320312

Files/Dialogs/PropertiesDialog.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
88
mc:Ignorable="d"
99
xmlns:Windows10version1903="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
10-
PrimaryButtonText="OK" DefaultButton="Primary" CloseButtonText="Cancel" CornerRadius="4" x:Name="PropertiesDialogMarkup" Title="Properties" >
10+
PrimaryButtonText="OK" CornerRadius="4" DefaultButton="Primary" CloseButtonText="Cancel" x:Name="PropertiesDialogMarkup" Title="Properties" >
1111

12-
<Frame Width="400" Height="450" x:Name="propertiesFrame" />
12+
<Frame Width="375" Height="425" x:Name="propertiesFrame" />
1313
</ContentDialog>

Files/Files.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233
<Content Include="Assets\Files UWP Icon.png" />
234234
<Content Include="Assets\FilesHome.png" />
235235
<Content Include="Assets\FilesDrive.png" />
236+
<Content Include="Assets\FolderIcon.svg" />
236237
<Content Include="Assets\logo.bmp" />
237238
<None Include="Assets\terminal\terminal.json">
238239
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

0 commit comments

Comments
 (0)