Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pm-publishpackage…
Browse files Browse the repository at this point in the history
…-packagecontents
  • Loading branch information
dnenov committed Nov 15, 2023
2 parents a9be281 + 723cef6 commit 40a0336
Show file tree
Hide file tree
Showing 32 changed files with 261 additions and 824 deletions.
10 changes: 5 additions & 5 deletions src/DynamoCore/DynamoCore.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config\CS_SDK.props" />
</ImportGroup>
Expand Down Expand Up @@ -27,11 +27,11 @@
</ItemGroup>
<ItemGroup Label="Common dependencies">
<PackageReference Include="Autodesk.IDSDK" Version="1.1.6" />
<PackageReference Include="Greg" Version="3.0.0.2955" />
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="3.0.0.2916" GeneratePathProperty="true" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.2965" GeneratePathProperty="true" />
<PackageReference Include="Greg" Version="3.0.0.3175" />
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="3.0.0.3171" GeneratePathProperty="true" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.3171" GeneratePathProperty="true" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" CopyXML="true" />
<PackageReference Include="RestSharp" Version="109.0.1" CopyXML="true" />
<PackageReference Include="RestSharp" Version="108.0.1" CopyXML="true" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00016" />
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCore/Graph/Nodes/NodeInputData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public NodeInputTypes Type
/// The index of the selected item.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int SelectedIndex { get; set; }
public int? SelectedIndex { get; set; }

private static Dictionary<Type, NodeInputTypes> dotNetTypeToNodeInputType = new Dictionary<Type, NodeInputTypes>
{
Expand Down
54 changes: 31 additions & 23 deletions src/DynamoCoreWpf/Controls/InstalledPackagesControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
ItemsSource="{Binding Path=Filters}"
Background="Transparent"
KeyboardNavigation.IsTabStop="False"
VerticalContentAlignment="Center"
Padding="0,5,0,5">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
Expand All @@ -53,17 +54,21 @@
Style="{StaticResource {x:Type ToggleButton}}"
FontSize="10"
FontFamily="Artifakt Element"
FontWeight="Medium"
HorizontalAlignment="Center"
BorderThickness="1,1,1,1"
Background="{StaticResource PrimaryCharcoal300Brush}"
BorderThickness="1"
BorderBrush="Transparent"
UseLayoutRounding="True"
SnapsToDevicePixels="True"
Background="#CCCCCC"
Checked="ToggleButton_OnChecked"
Foreground="{StaticResource ExpanderCaretToggleButtonBackground}">
Foreground="{StaticResource PackageManagerTabBackgroundColor}">
<RadioButton.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Margin" Value="5,0,0,5"/>
<Setter Property="Padding" Value="5,0,5,0"/>
<Setter Property="Margin" Value="5,3,0,0"/>
<Setter Property="Padding" Value="5,1,5,0"/>
</Style>
</RadioButton.Resources>
</RadioButton>
Expand Down Expand Up @@ -92,21 +97,20 @@
ItemsPresenter can't be wider then visible part of the window.-->
<Border BorderBrush="{StaticResource PreferencesWindowBackgroundColor}"
BorderThickness="0,0,0,1"
Background="{StaticResource PreferencesWindowBackgroundColor}"
Background="{StaticResource PackageManagerTabBackgroundColor}"
Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type ItemsPresenter}}}">
<Expander Name="PackageHeader"
IsExpanded="{Binding Path=Model.TypesVisibleInManager}"
Style="{StaticResource InstalledPackagesExpanderStyle}">
IsExpanded="{Binding Path=Model.TypesVisibleInManager}"
Style="{StaticResource InstalledPackagesExpanderStyle}">
<Expander.Header>
<Grid x:Name="PackageGrid" >
<DockPanel HorizontalAlignment="Stretch"
>
<DockPanel HorizontalAlignment="Stretch">
<StackPanel HorizontalAlignment="Left"
Orientation="Horizontal"
Margin="10,5,5,7">
<TextBlock Text="{Binding Path=Model.Name}"
FontSize="11"
FontSize="12"
Width="150"
TextTrimming="CharacterEllipsis"
Margin="15,0,10,0"
Expand All @@ -118,29 +122,33 @@
<TextBlock Text="{Binding Path=Model.VersionName}"
MinWidth="70"
FontSize="11"
VerticalAlignment="Center"
Foreground="{StaticResource PreferencesWindowFontColor}"></TextBlock>

</StackPanel>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Width="Auto">
<Grid Height="18"
MaxWidth="150">
<Border Background="DimGray"
HorizontalAlignment="Stretch"
CornerRadius="5"
Margin="5,0,0,0"
Padding="5,0,5,0">
MaxWidth="150"
Margin="10 0">
<Border Background="#CCCCCC"
HorizontalAlignment="Stretch"
CornerRadius="8"
Margin="5,0,0,0"
Padding="5,0,5,0">
<Border.ToolTip>
<ToolTip Content="{Binding Path=PackageLoadStateTooltip}" Style="{StaticResource GenericToolTipLight}"/>
</Border.ToolTip>
<TextBlock Name="PackageStateLabel" Text="{Binding Path=PackageLoadStateText}"
TextTrimming="CharacterEllipsis"
FontSize="10"
FontFamily="Artifakt Element"
FontWeight="Medium"
TextAlignment="Left"
HorizontalAlignment="Center"
Margin="0,3,0,0"
Foreground="{StaticResource PrimaryCharcoal100Brush}"/>
Margin="0,2,0,0"
Foreground="{StaticResource PackageManagerTabBackgroundColor}"/>
</Border>
</Grid>
</StackPanel>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Width="Auto">
<Button Name="MoreButton"
Click="MoreButton_OnClick"
Width="16"
Expand Down Expand Up @@ -195,7 +203,7 @@
</MenuItem.ToolTip>
</MenuItem>
<MenuItem Name="MakeNewVersionButton"
Visibility="{Binding Path=CanPublish, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"
Visibility="{Binding Path=CanPublishNewVersion, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"
Command="{Binding Path=PublishNewPackageVersionCommand}"
Header="{x:Static p:Resources.InstalledPackageViewContextMenuPublishVersion}">
<MenuItem.ToolTip>
Expand Down
6 changes: 3 additions & 3 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@
<PackageReference Include="HelixToolkit.Core.Wpf" Version="2.24.0" />
<PackageReference Include="HelixToolkit.SharpDX.Core.Wpf" Version="2.24.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.2965" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.3171" />
<PackageReference Include="FontAwesome5" Version="2.1.11" />
<PackageReference Include="AvalonEdit" Version="6.3.0.90" CopyXML="true" />
<PackageReference Include="Greg" Version="3.0.0.2955" />
<PackageReference Include="Greg" Version="3.0.0.3175" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2045.28" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="109.0.1" />
<PackageReference Include="RestSharp" Version="108.0.1" />
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="2.0.0" />
<PackageReference Include="SharpDX" Version="4.2.0" />
<PackageReference Include="SharpDX.D3DCompiler" Version="4.2.0">
Expand Down
6 changes: 4 additions & 2 deletions src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3683,8 +3683,8 @@
</Setter>
</Style>

<SolidColorBrush x:Key="ExpanderCaretToggleButtonBackground" Color="#4d4d4d" />
<SolidColorBrush x:Key="ExpanderCaretToggleButtonSelectedBackground" Color="#3c3c3c" />
<SolidColorBrush x:Key="ExpanderCaretToggleButtonBackground" Color="#2A2A2A" />
<SolidColorBrush x:Key="ExpanderCaretToggleButtonSelectedBackground" Color="#2F2E30" />

<ControlTemplate x:Key="ExpanderCaretToggleButton" TargetType="{x:Type ToggleButton}">
<Border Name="Border"
Expand Down Expand Up @@ -3775,6 +3775,8 @@


<Style x:Key="InstalledPackagesExpanderStyle" TargetType="Expander">
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<!-- Control template for expander -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ internal void PackageManagerViewClose()
internal void Dispose()
{
nonHostFilter?.ForEach(f => f.PropertyChanged -= filter_PropertyChanged);
aTimer.Elapsed -= OnTimedEvent;
if (aTimer != null) aTimer.Elapsed -= OnTimedEvent;

TimedOut = false; // reset the timedout screen
InitialResultsLoaded = false; // reset the loading screen settings
Expand Down
10 changes: 5 additions & 5 deletions src/DynamoCoreWpf/ViewModels/PackageManager/PackageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
using Dynamo.PackageManager;
using Dynamo.Wpf.Properties;
using Dynamo.Wpf.Utilities;
using NotificationObject = Dynamo.Core.NotificationObject;
using Prism.Commands;
using NotificationObject = Dynamo.Core.NotificationObject;

namespace Dynamo.ViewModels
{
Expand Down Expand Up @@ -149,7 +149,7 @@ public bool HasNodeLibraries

public bool HasCustomNodes
{
get { return Model.LoadedCustomNodes.Any(); }
get { return Model.LoadedCustomNodes.Any(); }
}

public bool HasAssemblies
Expand Down Expand Up @@ -183,12 +183,12 @@ public PackageViewModel(DynamoViewModel dynamoViewModel, Package model)

ToggleTypesVisibleInManagerCommand = new DelegateCommand(() => { }, () => true);
GetLatestVersionCommand = new DelegateCommand(() => { }, () => false);
PublishNewPackageVersionCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackageVersion), () => CanPublish);
PublishNewPackageVersionCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackageVersion), IsOwner);
PublishNewPackageCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackage), () => CanPublish);
UninstallCommand = new DelegateCommand(Uninstall, CanUninstall);
UnmarkForUninstallationCommand = new DelegateCommand(UnmarkForUninstallation, CanUnmarkForUninstallation);
LoadCommand = new DelegateCommand(Load, CanLoad);
DeprecateCommand = new DelegateCommand(Deprecate, CanDeprecate);
DeprecateCommand = new DelegateCommand(Deprecate, IsOwner);
UndeprecateCommand = new DelegateCommand(Undeprecate, CanUndeprecate);
GoToRootDirectoryCommand = new DelegateCommand(GoToRootDirectory, () => true);

Expand Down Expand Up @@ -408,7 +408,7 @@ private void Deprecate()
packageManagerClient.Deprecate(Model.Name);
}

private bool CanDeprecate()
private bool IsOwner()
{
if (!CanPublish) return false;
return packageManagerClient.DoesCurrentUserOwnPackage(Model, dynamoModel.AuthenticationManager.Username);
Expand Down
Loading

0 comments on commit 40a0336

Please sign in to comment.