Modify about window to take an app signature.

* Grabs the app icon and version from the resource file.
* Allow you to specify the copyright holder instead of hardcoding
  "Haiku, Inc."
* Support multiple extra copyright fields.
* Modify BAlert to take a custom icon.
* Set the custom icon of the BAlert to the app icon.
* Also set the app version.

* Convert BAboutWindow to derive from BWindow
* Place a 128x128 icon and fill out a scrolling BTextView
  with options such as authors, version history, copyright,
  license, etc. Still needs some work but is coming along.

* Add the word Version to the version line, i8n'ed of course,
  and tweak the info box and default sizes.
This commit is contained in:
John Scipione
2012-11-12 23:57:24 -05:00
parent 1a5df674c1
commit 0046f44436
8 changed files with 439 additions and 72 deletions
+11 -7
View File
@@ -712,15 +712,14 @@ CalcView::FrameResized(float width, float height)
void
CalcView::AboutRequested()
{
const char* authors[] = {
"Timothy Wayper",
"Stephan Aßmus",
"Ingo Weinhold",
const char* extraCopyrights[] = {
"1997, 1998 R3 Software Ltd.",
NULL
};
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("DeskCalc"), 2006, authors,
B_UTF8_COPYRIGHT "1997, 1998 R3 Software Ltd.");
about.Show();
BAboutWindow* about = new BAboutWindow(kAppName, kAppSig);
about->AddCopyright(2006, "Haiku, Inc.", extraCopyrights);
about->Show();
}
@@ -1289,6 +1288,9 @@ CalcView::_CreatePopUpMenu(bool addKeypadModeMenuItems)
fKeypadModeScientificItem = new BMenuItem(B_TRANSLATE("Scientific"),
new BMessage(MSG_OPTIONS_KEYPAD_MODE_SCIENTIFIC), '2');
}
BMenuItem* aboutItem
= new BMenuItem(B_TRANSLATE("About DeskCalc" B_UTF8_ELLIPSIS),
new BMessage(B_ABOUT_REQUESTED));
// apply current settings
fAutoNumlockItem->SetMarked(fOptions->auto_num_lock);
@@ -1313,6 +1315,8 @@ CalcView::_CreatePopUpMenu(bool addKeypadModeMenuItems)
fPopUpMenu->AddItem(fKeypadModeScientificItem);
_MarkKeypadItems(fOptions->keypad_mode);
}
fPopUpMenu->AddSeparatorItem();
fPopUpMenu->AddItem(aboutItem);
}