Skip to content

Commit

Permalink
Issues with RibbonRecentItems
Browse files Browse the repository at this point in the history
  • Loading branch information
harborsiem committed Nov 27, 2024
1 parent 64c402e commit 3c905ec
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

### Ribbon V2.16.0, RibbonTools V1.8.1
### Ribbon V2.16.1, RibbonTools V1.8.1

#### Changed (Ribbon)

- Remove deprecated .NET6
- Issue NullReferenceException with RibbonItemsEventArgs.Create when pinning is not set for RecentItems
- Issue RibbonRecentItems.RecentItems can not cleared

#### Changed (RibbonTools)

- No Error message for Command Name with only 1 character, solves Issue#36.
Expand Down
8 changes: 6 additions & 2 deletions Ribbon/Controls/Events/RecentItemsEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ internal static RecentItemsPropertySet GetRecentItemProperties(RibbonRecentItems
//PropVariant.UnsafeNativeMethods.PropVariantClear(ref propLabelDescription);

// get item pinned value
commandExecutionProperties.GetValue(ref RibbonProperties.Pinned, out PropVariant propPinned);
propSet.Pinned = (bool)propPinned.Value;
// If Pinning is not set then output is null and HRESULT is not S_OK
HRESULT hr = commandExecutionProperties.GetValue(ref RibbonProperties.Pinned, out PropVariant propPinned);
if (hr == HRESULT.S_OK)
{
propSet.Pinned = (bool)propPinned.Value;
}
return propSet;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected override HRESULT UpdatePropertyImpl(ref PropertyKey key, PropVariantRe
}
}
}
if (_recentItems != null && _recentItems.Count > 0)
if (_recentItems != null)
{
RecentItemsPropertySet[] array = _recentItems.ToArray();
if (array.Length > MaxCount)
Expand Down
2 changes: 1 addition & 1 deletion Ribbon/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
#else
[assembly: AssemblyVersion("1.0.0.0")]
#endif
[assembly: AssemblyFileVersion("2.16.0.0")]
[assembly: AssemblyFileVersion("2.16.1.0")]

4 changes: 2 additions & 2 deletions Ribbon/RibbonCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net8.0-windows;net6.0-windows;net40</TargetFrameworks>
<TargetFrameworks>net8.0-windows;net40</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon />
Expand All @@ -20,7 +20,7 @@

<PackageId>WindowsRibbon</PackageId>
<Product>Windows Ribbon Control</Product>
<Version>2.16.0</Version>
<Version>2.16.1</Version>
<Authors>Hartmut Borkenhagen</Authors>
<Company>RibbonLib</Company>
<PackageIcon>Ribbon64.png</PackageIcon>
Expand Down
2 changes: 1 addition & 1 deletion Setup/Ribbon.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:WixUI="http://schemas.microsoft.com/wix/UIExtension">
<Product Id="{A32A0C01-184F-431F-9633-F58295F3E834}" Name="Ribbon" Language="1033" Version="2.16.0.0" Manufacturer="RibbonLib" UpgradeCode="FA403F70-F169-497E-8DC2-CCA0609A1E30">
<Product Id="{A3CF0CDB-FD82-4ED1-9115-201C22941EDC}" Name="Ribbon" Language="1033" Version="2.16.1.0" Manufacturer="RibbonLib" UpgradeCode="FA403F70-F169-497E-8DC2-CCA0609A1E30">
<Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform="x86" Description="Windows Ribbon Framework Library for .NET" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
Expand Down

0 comments on commit 3c905ec

Please sign in to comment.