haiku-dumber/App.cpp

41 lines
992 B
C++
Raw Normal View History

2024-09-29 17:58:05 -03:00
/*
* Copyright 2024, Santiago Lema <santiago@lema.org>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "App.h"
#include "MainWindow.h"
#include <AboutWindow.h>
#include <Catalog.h>
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "Application"
2025-05-07 03:31:59 -03:00
const char *kApplicationSignature = "application/x-vnd.SLema-DumBer";
2024-09-29 17:58:05 -03:00
2025-05-07 03:31:59 -03:00
App::App() : BApplication(kApplicationSignature) {
MainWindow *mainWindow = new MainWindow();
mainWindow->Show();
2024-09-29 17:58:05 -03:00
}
2025-05-07 03:31:59 -03:00
App::~App() {}
2024-09-29 17:58:05 -03:00
2025-05-07 03:31:59 -03:00
void App::AboutRequested() {
BAboutWindow *about = new BAboutWindow(B_TRANSLATE_SYSTEM_NAME("DumBer"),
kApplicationSignature);
about->AddDescription(B_TRANSLATE("about_body"));
about->AddCopyright(2024, "Santiago Lema");
about->AddText("e-mail me at haiku@lema.org");
about->AddText("or ping me on the fediverse on @santi@go.lema.org");
2024-09-29 17:58:05 -03:00
2025-05-07 03:31:59 -03:00
about->Show();
2024-09-29 17:58:05 -03:00
}
2025-05-07 03:31:59 -03:00
int main() {
App *app = new App();
app->Run();
delete app;
return 0;
2024-09-29 17:58:05 -03:00
}