Skip to content

Commit 1fdb427

Browse files
author
Marco Gavelli
committed
Fix build errors
1 parent 6fbaad7 commit 1fdb427

File tree

7 files changed

+81
-69
lines changed

7 files changed

+81
-69
lines changed

src/Files.App.CsWin32/NativeMethods.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ WNDCLASSEXW
66
RegisterClassEx
77
CreateWindowEx
88
DestroyWindow
9+
ShowWindow
910
GetModuleHandle
1011
RECT
1112
NOTIFYICONIDENTIFIER

src/Files.App/Files.App.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737
<PropertyGroup>
3838
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
3939
</PropertyGroup>
40+
41+
<ItemGroup>
42+
<Compile Remove="Terminal\**" />
43+
<Content Remove="Terminal\**" />
44+
<EmbeddedResource Remove="Terminal\**" />
45+
<None Remove="Terminal\**" />
46+
<Page Remove="Terminal\**" />
47+
<PRIResource Remove="Terminal\**" />
48+
</ItemGroup>
4049

4150
<ItemGroup>
4251
<Manifest Include="app.manifest" />
@@ -60,10 +69,6 @@
6069
<Content Include="7zArm64.dll">
6170
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6271
</Content>
63-
<Content Include="Terminal\UI\bundle.js" />
64-
<Content Include="Terminal\UI\index.html" />
65-
<Content Include="Terminal\UI\style.css" />
66-
<Content Include="Terminal\UI\xterm.css" />
6772
</ItemGroup>
6873

6974
<ItemGroup>

src/Files.App/UserControls/StatusBar.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
Orientation="Horizontal"
315315
Spacing="4">
316316

317-
<!--<Button
317+
<Button
318318
x:Name="SyncFolderUp"
319319
Height="24"
320320
Padding="8,0,8,0"
@@ -340,7 +340,7 @@
340340
<Button.Content>
341341
<FontIcon FontSize="12" Glyph="&#xE74B;" />
342342
</Button.Content>
343-
</Button>-->
343+
</Button>
344344

345345
<SplitButton
346346
x:Name="ToggleTerminal"

src/Files.App/UserControls/StatusBar.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ public StatusBarViewModel? StatusBarViewModel
2222
public static readonly DependencyProperty StatusBarViewModelProperty =
2323
DependencyProperty.Register(nameof(StatusBarViewModel), typeof(StatusBarViewModel), typeof(StatusBar), new PropertyMetadata(null));
2424

25+
public MainPageViewModel? MainPageViewModel
26+
{
27+
get => (MainPageViewModel)GetValue(MainPageViewModelProperty);
28+
set => SetValue(MainPageViewModelProperty, value);
29+
}
30+
31+
// Using a DependencyProperty as the backing store for MainPageViewModel. This enables animation, styling, binding, etc...
32+
public static readonly DependencyProperty MainPageViewModelProperty =
33+
DependencyProperty.Register(nameof(MainPageViewModel), typeof(MainPageViewModel), typeof(StatusBar), new PropertyMetadata(null));
34+
2535
public SelectedItemsPropertiesViewModel? SelectedItemsPropertiesViewModel
2636
{
2737
get => (SelectedItemsPropertiesViewModel)GetValue(SelectedItemsPropertiesViewModelProperty);

src/Files.App/ViewModels/MainPageViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Files Community
22
// Licensed under the MIT License.
33

4-
using Files.App.Terminal;
4+
using Files.App.Utils.Terminal;
55
using Microsoft.UI.Xaml;
66
using Microsoft.UI.Xaml.Controls;
77
using Microsoft.UI.Xaml.Input;
@@ -27,7 +27,6 @@ public sealed partial class MainPageViewModel : ObservableObject
2727
private INetworkService NetworkService { get; } = Ioc.Default.GetRequiredService<INetworkService>();
2828
private IUserSettingsService UserSettingsService { get; } = Ioc.Default.GetRequiredService<IUserSettingsService>();
2929
private IResourcesService ResourcesService { get; } = Ioc.Default.GetRequiredService<IResourcesService>();
30-
private IGeneralSettingsService GeneralSettingsService { get; } = Ioc.Default.GetRequiredService<IGeneralSettingsService>();
3130
private DrivesViewModel DrivesViewModel { get; } = Ioc.Default.GetRequiredService<DrivesViewModel>();
3231
public ShelfViewModel ShelfViewModel { get; } = Ioc.Default.GetRequiredService<ShelfViewModel>();
3332

src/Files.App/Views/MainPage.xaml

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
MinHeight="100" />
201201
<RowDefinition Height="Auto" />
202202
<RowDefinition x:Name="InfoPaneRowDefinition" Height="Auto" />
203-
<RowDefinition x:Name="TerminalRow" Height="0" />
203+
<RowDefinition x:Name="TerminalRow" Height="0" />
204204
<RowDefinition Height="Auto" MinHeight="8" />
205205
</Grid.RowDefinitions>
206206
<Grid.ColumnDefinitions>
@@ -256,55 +256,56 @@
256256
Loaded="PreviewPane_Loaded"
257257
Unloaded="PreviewPane_Unloaded" />
258258

259-
<!-- Terminal -->
260-
<ContentPresenter
261-
x:Name="TerminalControl"
262-
Grid.Row="4"
263-
Grid.ColumnSpan="3"
264-
Margin="0,4,0,4"
265-
Content="{x:Bind ViewModel.ActiveTerminal, Mode=OneWay}"
266-
Visibility="{x:Bind ViewModel.IsTerminalViewOpen, Mode=OneWay}" />
267-
268-
<!-- Status Bar -->
269-
<uc:StatusBarControl
270-
x:Name="StatusBarControl"
271-
Grid.Row="5"
272-
Grid.ColumnSpan="3"
273-
x:Load="False"
274-
ShowInfoText="{x:Bind SidebarAdaptiveViewModel.PaneHolder.ActivePaneOrColumn.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}" />
275-
276-
<i:Interaction.Behaviors>
277-
<icore:DataTriggerBehavior
278-
Binding="{x:Bind ViewModel.IsTerminalViewOpen, Mode=OneWay}"
279-
ComparisonCondition="Equal"
280-
Value="True">
281-
<icore:ChangePropertyAction
282-
PropertyName="Height"
283-
TargetObject="{Binding ElementName=TerminalRow}"
284-
Value="0.5*" />
285-
</icore:DataTriggerBehavior>
286-
<icore:DataTriggerBehavior
287-
Binding="{x:Bind ViewModel.IsTerminalViewOpen, Mode=OneWay}"
288-
ComparisonCondition="Equal"
289-
Value="False">
290-
<icore:ChangePropertyAction
291-
PropertyName="Height"
292-
TargetObject="{Binding ElementName=TerminalRow}"
293-
Value="0" />
294-
</icore:DataTriggerBehavior>
295-
</i:Interaction.Behaviors>
296-
</Grid>
259+
<!-- Terminal -->
260+
<ContentPresenter
261+
x:Name="TerminalControl"
262+
Grid.Row="4"
263+
Grid.ColumnSpan="3"
264+
Margin="0,4,0,4"
265+
Content="{x:Bind ViewModel.ActiveTerminal, Mode=OneWay}"
266+
Visibility="{x:Bind ViewModel.IsTerminalViewOpen, Mode=OneWay}" />
267+
268+
<!-- Status Bar -->
269+
<uc:StatusBar
270+
x:Name="StatusBar"
271+
Grid.Row="5"
272+
Grid.ColumnSpan="3"
273+
x:Load="False"
274+
ShowInfoText="{x:Bind ViewModel.ShowStatusBar, Mode=OneWay}"
275+
Visibility="{x:Bind ViewModel.ShowStatusBar, Mode=OneWay}" />
297276

298-
<Button.ContextFlyout>
299-
<MenuFlyout>
300-
<MenuFlyoutItem
301-
Command="{x:Bind Commands.OpenSettingsFile, Mode=OneWay}"
302-
Icon="{x:Bind Commands.OpenSettingsFile.FontIcon, Mode=OneWay}"
303-
Text="{x:Bind Commands.OpenSettingsFile.Label, Mode=OneWay}" />
277+
<!-- Shelf Pane -->
278+
<uc:ShelfPane
279+
x:Name="ShelfPane"
280+
Grid.Row="0"
281+
Grid.RowSpan="5"
282+
Grid.Column="3"
283+
Margin="4,0,0,8"
304284
x:Load="{x:Bind ViewModel.ShowShelfPane, Mode=OneWay}"
305285
ClearCommand="{x:Bind ViewModel.ShelfViewModel.ClearItemsCommand}"
306286
ItemFocusedCommand="{x:Bind Commands.ClearSelection, Mode=OneWay}"
307287
ItemsSource="{x:Bind ViewModel.ShelfViewModel.Items}" />
288+
289+
<i:Interaction.Behaviors>
290+
<i:DataTriggerBehavior
291+
Binding="{x:Bind ViewModel.IsTerminalViewOpen, Mode=OneWay}"
292+
ComparisonCondition="Equal"
293+
Value="True">
294+
<i:ChangePropertyAction
295+
PropertyName="Height"
296+
TargetObject="{Binding ElementName=TerminalRow}"
297+
Value="0.5*" />
298+
</i:DataTriggerBehavior>
299+
<i:DataTriggerBehavior
300+
Binding="{x:Bind ViewModel.IsTerminalViewOpen, Mode=OneWay}"
301+
ComparisonCondition="Equal"
302+
Value="False">
303+
<i:ChangePropertyAction
304+
PropertyName="Height"
305+
TargetObject="{Binding ElementName=TerminalRow}"
306+
Value="0" />
307+
</i:DataTriggerBehavior>
308+
</i:Interaction.Behaviors>
308309
</Grid>
309310
</controls:SidebarView.InnerContent>
310311

@@ -398,7 +399,7 @@
398399

399400
<!-- Review Files Prompt -->
400401
<TeachingTip
401-
ActionButtonCommand="{x:Bind ViewModel.ReviewAppCommand}"
402+
Title="{helpers:ResourceString Name=Hello}"
402403
Grid.RowSpan="3"
403404
HorizontalAlignment="Center"
404405
VerticalAlignment="Bottom"

src/Files.App/Views/Settings/AdvancedPage.xaml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,16 @@
169169
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowFlattenOptions}" IsOn="{x:Bind ViewModel.ShowFlattenOptions, Mode=TwoWay}" />
170170
</wctcontrols:SettingsCard>
171171

172-
<!-- Enable terminal integration -->
173-
<local:SettingsBlockControl
174-
x:Name="TerminalIntegrationSettingsBlockControl"
175-
Title="{helpers:ResourceString Name=SettingsTerminalIntegration}"
176-
HorizontalAlignment="Stretch">
177-
<local:SettingsBlockControl.Icon>
178-
<FontIcon Glyph="&#xE756;" />
179-
</local:SettingsBlockControl.Icon>
180-
<ToggleSwitch
181-
AutomationProperties.Name="{helpers:ResourceString Name=SettingsTerminalIntegration}"
182-
IsOn="{x:Bind ViewModel.IsTerminalIntegrationEnabled, Mode=TwoWay}"
183-
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
184-
</local:SettingsBlockControl>
185-
</StackPanel>
186-
</StackPanel>
172+
<!-- Enable terminal integration -->
173+
<wctcontrols:SettingsCard HorizontalAlignment="Stretch" Header="{helpers:ResourceString Name=SettingsTerminalIntegration}">
174+
<wctcontrols:SettingsCard.HeaderIcon>
175+
<FontIcon Glyph="&#xE756;" />
176+
</wctcontrols:SettingsCard.HeaderIcon>
177+
<ToggleSwitch
178+
AutomationProperties.Name="{helpers:ResourceString Name=SettingsTerminalIntegration}"
179+
IsOn="{x:Bind ViewModel.IsTerminalIntegrationEnabled, Mode=TwoWay}"
180+
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
181+
</wctcontrols:SettingsCard>
182+
</StackPanel>
187183
</Grid>
188184
</Page>

0 commit comments

Comments
 (0)