* Changed directory structure as suggested on the mailing list.

* Made the TimeZoneView less error prone, and also actually use Haiku code (the
  previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
  to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
  though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
  so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
  update them yet, as we'll probably do so anyway at some point. Also, I think
  we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-04-03 09:02:44 +00:00
parent 7a517c04b0
commit 317bd7dda3
38 changed files with 919 additions and 911 deletions
+54 -31
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2008, Haiku, Inc.
* Copyright (c) 2005-2009, Haiku, Inc.
* Distributed under the terms of the MIT license.
*
* Authors:
@@ -67,50 +67,54 @@ static const rgb_color kLinkBlue = { 80, 80, 200, 255 };
class AboutApp : public BApplication {
public:
AboutApp(void);
AboutApp();
};
class AboutWindow : public BWindow {
public:
AboutWindow(void);
bool QuitRequested(void);
AboutWindow();
virtual bool QuitRequested();
};
class AboutView : public BView {
public:
AboutView(const BRect &r);
~AboutView(void);
AboutView(const BRect& frame);
~AboutView();
virtual void AttachedToWindow();
virtual void Pulse();
virtual void AttachedToWindow();
virtual void Pulse();
virtual void FrameResized(float width, float height);
virtual void Draw(BRect update);
virtual void MessageReceived(BMessage *msg);
virtual void MouseDown(BPoint pt);
virtual void FrameResized(float width, float height);
virtual void Draw(BRect updateRect);
virtual void MessageReceived(BMessage* msg);
virtual void MouseDown(BPoint point);
void AddCopyrightEntry(const char *name, const char *text,
const Licenses& licenses, const char *url);
void AddCopyrightEntry(const char *name, const char *text,
const char *url = NULL);
void AddCopyrightEntry(const BMessage& packageDescription);
void PickRandomHaiku();
void AddCopyrightEntry(const char* name,
const char* text, const Licenses& licenses,
const char* url);
void AddCopyrightEntry(const char* name,
const char* text, const char* url = NULL);
void AddCopyrightEntry(
const BMessage& packageDescription);
void PickRandomHaiku();
private:
void _AddCopyrightsFromAttribute();
status_t _GetLicensesPath(BPath& path);
void _AddCopyrightsFromAttribute();
BStringView *fMemView;
BTextView *fUptimeView;
BView *fInfoView;
HyperTextView *fCreditsView;
BStringView* fMemView;
BTextView* fUptimeView;
BView* fInfoView;
HyperTextView* fCreditsView;
BBitmap *fLogo;
BBitmap* fLogo;
BPoint fDrawPoint;
BPoint fDrawPoint;
bigtime_t fLastActionTime;
BMessageRunner *fScrollRunner;
BQuery fAppsQuery;
bigtime_t fLastActionTime;
BMessageRunner* fScrollRunner;
BQuery fAppsQuery;
};
@@ -548,7 +552,6 @@ AboutView::AboutView(const BRect &rect)
"(sorry!)"
"\n\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Special Thanks To:\n");
@@ -558,6 +561,12 @@ AboutView::AboutView(const BRect &rect)
// copyrights for various projects we use
BPath licensesPath;
_GetLicensesPath(licensesPath);
BPath mitPath(licensesPath);
mitPath.Append("MIT license");
font.SetSize(be_bold_font->Size() + 4);
font.SetFace(B_BOLD_FACE);
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
@@ -572,7 +581,7 @@ AboutView::AboutView(const BRect &rect)
"kernel and all code that applications may link against, is "
"distributed under the terms of the ");
fCreditsView->InsertHyperText("MIT license",
new OpenFileAction("/etc/licenses/MIT"));
new OpenFileAction(mitPath.Path()));
fCreditsView->Insert(". Some system libraries contain third party code "
"distributed under the LGPL license. You can find the copyrights "
"to third party code below.\n\n");
@@ -997,6 +1006,9 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
fCreditsView->Insert(text);
fCreditsView->Insert("\n");
BPath licensesPath;
_GetLicensesPath(licensesPath);
if (licenses.CountLicenses() > 0) {
if (licenses.CountLicenses() > 1)
fCreditsView->Insert("Licenses: ");
@@ -1005,7 +1017,7 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
for (int32 i = 0; i < licenses.CountLicenses(); i++) {
const char* license = licenses.LicenseAt(i);
BString licensePath("/etc/licenses/");
BString licensePath(licensesPath.Path());
licensePath += license;
if (i > 0)
@@ -1102,6 +1114,17 @@ AboutView::PickRandomHaiku()
}
status_t
AboutView::_GetLicensesPath(BPath& path)
{
status_t status = find_directory(B_SYSTEM_DATA_DIRECTORY, &path);
if (status != B_OK)
return status;
return path.Append("licenses");
}
void
AboutView::_AddCopyrightsFromAttribute()
{