From 80b9d458bc722fc6133cf162bd454dfdae659d9c Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 7 Jan 2010 18:26:30 +0000 Subject: [PATCH] It's 2010. Don't hard-code copyright years in StartPageControl, read them from GlobalAssemblyInfo instead. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5381 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml | 2 +- .../Misc/StartPage/Project/Src/StartPageControl.xaml.cs | 4 ++++ src/Main/GlobalAssemblyInfo.template | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml b/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml index 6772a5b67d..2b655560ed 100644 --- a/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml +++ b/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml @@ -74,7 +74,7 @@ Grid.Row="2" Padding="4,0,4,0" TextWrapping="WrapWithOverflow"> - Copyright ©2000-2009 + Copyright © IC#SharpCode diff --git a/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml.cs b/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml.cs index 7130860c1b..39d0e800fa 100644 --- a/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml.cs +++ b/src/AddIns/Misc/StartPage/Project/Src/StartPageControl.xaml.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Windows.Controls; using ICSharpCode.Core; @@ -25,6 +26,9 @@ namespace ICSharpCode.StartPage // WPF does not use DataTemplates if the item already is a UIElement; so we 'box' it. List entries = items.ConvertAll(control => new BoxEntry { Control = control } ); startPageItems.ItemsSource = entries; + + var aca = (AssemblyCopyrightAttribute)typeof(StartPageControl).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]; + copyrightYearRange.Text = aca.Copyright.Substring(0, 9); } sealed class BoxEntry diff --git a/src/Main/GlobalAssemblyInfo.template b/src/Main/GlobalAssemblyInfo.template index 10cb4f10af..d75b703800 100644 --- a/src/Main/GlobalAssemblyInfo.template +++ b/src/Main/GlobalAssemblyInfo.template @@ -20,7 +20,7 @@ using System.Reflection; [assembly: System.Runtime.InteropServices.ComVisible(false)] [assembly: AssemblyCompany("ic#code")] [assembly: AssemblyProduct("SharpDevelop")] -[assembly: AssemblyCopyright("2000-2009 AlphaSierraPapa")] +[assembly: AssemblyCopyright("2000-2010 AlphaSierraPapa")] [assembly: AssemblyVersion(RevisionClass.FullVersion)] [assembly: NeutralResourcesLanguage("en-US")]