From 2a3ed81cf659bbbcf53f971b5c5d7595c7ed6247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 5 Jan 2007 20:27:20 +0000 Subject: [PATCH] Our copyright string now says 2007 - I also updated it so that we don't have to do this every year, just in case ;-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19715 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/abouthaiku/AboutHaiku.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/apps/abouthaiku/AboutHaiku.cpp b/src/apps/abouthaiku/AboutHaiku.cpp index 393b0bcc44..a5e5163908 100644 --- a/src/apps/abouthaiku/AboutHaiku.cpp +++ b/src/apps/abouthaiku/AboutHaiku.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2006, Haiku, Inc. + * Copyright (c) 2005-2007, Haiku, Inc. * Distributed under the terms of the MIT license. * * Author: @@ -30,6 +30,7 @@ #include #include +#include #define SCROLL_CREDITS_VIEW 'mviv' @@ -261,7 +262,8 @@ AboutView::AboutView(const BRect &rect) r.OffsetBy(0, labelHeight); r.bottom = r.top + textHeight; - sprintf(string, "%s %s", systemInfo.kernel_build_date, systemInfo.kernel_build_time); + snprintf(string, sizeof(string), "%s %s", + systemInfo.kernel_build_date, systemInfo.kernel_build_time); stringView = new BStringView(r, "kerneltext", string); fInfoView->AddChild(stringView); @@ -315,8 +317,16 @@ AboutView::AboutView(const BRect &rect) font.SetSize(be_bold_font->Size()); font.SetFace(B_BOLD_FACE | B_ITALIC_FACE); + time_t time = ::time(NULL); + struct tm* tm = localtime(&time); + int32 year = tm->tm_year + 1900; + if (year < 2007) + year = 2007; + snprintf(string, sizeof(string), + "Copyright " B_UTF8_COPYRIGHT "2001-%ld Haiku, Inc.\n\n", year); + fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &darkgrey); - fCreditsView->Insert("Copyright " B_UTF8_COPYRIGHT "2001-2006 Haiku, Inc.\n\n"); + fCreditsView->Insert(string); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &haikuOrange); fCreditsView->Insert("Team Leads:\n");