Files
haiku-beta6/src/preferences/screen/ScreenApplication.cpp
T
Axel Dörfler c5d80d47d8 * Changed the signature of "Backgrounds" to follow how those signatures
are supposed to look like.
* Fixed Screen to have the correct signature for Backgrounds (had the
  one from Be before).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-23 15:11:07 +00:00

70 lines
1.2 KiB
C++

/*
* Copyright 2001-2006, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Rafael Romo
* Stefano Ceccherini ([email protected])
* Andrew Bachmann
* Sergei Panteleev
*/
#include "ScreenApplication.h"
#include "ScreenWindow.h"
#include "ScreenSettings.h"
#include "Constants.h"
#include <Alert.h>
static const char* kAppSignature = "application/x-vnd.Be-SCRN";
ScreenApplication::ScreenApplication()
: BApplication(kAppSignature),
fScreenWindow(new ScreenWindow(new ScreenSettings()))
{
fScreenWindow->Show();
}
void
ScreenApplication::AboutRequested()
{
BAlert *aboutAlert = new BAlert("About", "Screen preferences by the Haiku team",
"Ok", NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT);
aboutAlert->SetShortcut(0, B_OK);
aboutAlert->Go();
}
void
ScreenApplication::MessageReceived(BMessage* message)
{
switch (message->what) {
case SET_INITIAL_MODE_MSG:
case SET_CUSTOM_REFRESH_MSG:
case MAKE_INITIAL_MSG:
fScreenWindow->PostMessage(message);
break;
default:
BApplication::MessageReceived(message);
break;
}
}
// #pragma mark -
int
main()
{
ScreenApplication app;
app.Run();
return 0;
}