Files
haiku-beta6/src/preferences/touchpad/main.cpp
T
Oliver Tappe 546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00

64 lines
1.2 KiB
C++

/*
* Copyright 2008-2009, Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Clemens Zeidler ([email protected])
*/
#include <Application.h>
#include <Window.h>
#include <Catalog.h>
#include <GroupLayout.h>
#include <GroupLayoutBuilder.h>
#include <Locale.h>
#include "TouchpadPrefView.h"
class TouchpadPrefWindow : public BWindow {
public:
TouchpadPrefWindow(BRect frame, const char* title, window_type type,
uint32 flags)
:
BWindow(frame, title, type, flags)
{
}
virtual bool QuitRequested()
{
be_app->PostMessage(B_QUIT_REQUESTED);
return true;
}
};
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "TouchpadMain"
int
main(int argc, char* argv[])
{
BApplication* app = new BApplication("application/x-vnd.Haiku-Touchpad");
TouchpadPrefWindow* window = new TouchpadPrefWindow(BRect(50, 50, 450, 350),
B_TRANSLATE_SYSTEM_NAME("Touchpad"), B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE
| B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS);
window->SetLayout(new BGroupLayout(B_HORIZONTAL));
window->AddChild(BGroupLayoutBuilder(B_VERTICAL, 10)
.Add(new TouchpadPrefView())
.End()
.SetInsets(5, 5, 5, 5)
);
window->Show();
app->Run();
delete app;
return 0;
}