OverlayImage: Use BAboutWindow
Fixes #18677 Change-Id: Ia1469527ce9dd4e7c217182e3751357aa5305f18 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7113 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
916c6d9492
commit
2283561d60
@ -1,5 +1,7 @@
|
||||
SubDir HAIKU_TOP src apps overlayimage ;
|
||||
|
||||
UsePrivateHeaders interface shared ;
|
||||
|
||||
Application OverlayImage :
|
||||
OverlayApp.cpp
|
||||
OverlayView.cpp
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
OverlayApp::OverlayApp()
|
||||
: BApplication("application/x-vnd.Haiku-OverlayImage")
|
||||
: BApplication(kAppSignature)
|
||||
{
|
||||
OverlayWindow *theWindow = new OverlayWindow();
|
||||
theWindow->Show();
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
|
||||
const char* kAppSignature = "application/x-vnd.Haiku-OverlayImage";
|
||||
|
||||
|
||||
class OverlayApp : public BApplication {
|
||||
public:
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "OverlayView.h"
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Catalog.h>
|
||||
#include <InterfaceDefs.h>
|
||||
#include <Locale.h>
|
||||
@ -148,7 +149,7 @@ OverlayView::Archive(BMessage *archive, bool deep) const
|
||||
{
|
||||
BView::Archive(archive, deep);
|
||||
|
||||
archive->AddString("add_on", "application/x-vnd.Haiku-OverlayImage");
|
||||
archive->AddString("add_on", kAppSignature);
|
||||
archive->AddString("class", "OverlayImage");
|
||||
|
||||
if (fBitmap) {
|
||||
@ -165,20 +166,18 @@ OverlayView::Archive(BMessage *archive, bool deep) const
|
||||
void
|
||||
OverlayView::OverlayAboutRequested()
|
||||
{
|
||||
BAlert *alert = new BAlert("about",
|
||||
B_TRANSLATE("OverlayImage\n"
|
||||
"Copyright 1999-2010\n\n\t"
|
||||
"originally by Seth Flaxman\n\t"
|
||||
"modified by Hartmuth Reh\n\t"
|
||||
"further modified by Humdinger\n"),
|
||||
"OK");
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
view->SetStylable(true);
|
||||
view->GetFont(&font);
|
||||
font.SetSize(font.Size() + 7.0f);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
view->SetFontAndColor(0, 12, &font);
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->Go();
|
||||
BAboutWindow* aboutwindow
|
||||
= new BAboutWindow(B_TRANSLATE_SYSTEM_NAME("OverlayImage"), kAppSignature);
|
||||
|
||||
const char* authors[] = {
|
||||
"Seth Flaxman",
|
||||
"Hartmuth Reh",
|
||||
"Humdinger",
|
||||
NULL
|
||||
};
|
||||
|
||||
aboutwindow->AddCopyright(1999, "Seth Flaxman");
|
||||
aboutwindow->AddCopyright(2010, "Haiku, Inc.");
|
||||
aboutwindow->AddAuthors(authors);
|
||||
aboutwindow->Show();
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Bitmap.h>
|
||||
#include <Dragger.h>
|
||||
#include <Entry.h>
|
||||
@ -25,6 +24,8 @@
|
||||
#include <View.h>
|
||||
#include <Window.h>
|
||||
|
||||
extern const char *kAppSignature;
|
||||
|
||||
|
||||
class _EXPORT OverlayView;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user