xref: /haiku/src/preferences/time/Time.cpp (revision b46615c55ad2c8fe6de54412055a0713da3d610a)
1 /*
2  * Copyright 2002-2007, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Andrew McCall <mccall@digitalparadise.co.uk>
7  *		Mike Berg <mike@berg-net.us>
8  *		Julun <host.haiku@gmx.de>
9  */
10 
11 #include "Time.h"
12 #include "TimeWindow.h"
13 
14 
15 #include <Alert.h>
16 #include <Catalog.h>
17 
18 #include <unistd.h>
19 
20 #undef B_TRANSLATE_CONTEXT
21 #define B_TRANSLATE_CONTEXT "Time"
22 
23 const char* kAppSignature = "application/x-vnd.Haiku-Time";
24 
25 
26 TimeApplication::TimeApplication()
27 	: BApplication(kAppSignature),
28 	  fWindow(NULL)
29 {
30 	fWindow = new TTimeWindow(BRect(100, 100, 570, 327));
31 }
32 
33 
34 TimeApplication::~TimeApplication()
35 {
36 }
37 
38 
39 void
40 TimeApplication::ReadyToRun()
41 {
42 	fWindow->Show();
43 }
44 
45 
46 void
47 TimeApplication::AboutRequested()
48 {
49 	BAlert* alert = new BAlert(B_TRANSLATE("about"),
50 		B_TRANSLATE("Time & Date, writen by:\n\n\tAndrew Edward McCall\n\tMike Berg\n\t"
51 					"Julun\n\tPhilippe Saint-Pierre\n\nCopyright 2004-2008, Haiku."),
52 		B_TRANSLATE("OK"));
53 	alert->Go();
54 }
55 
56 
57 //	#pragma mark -
58 
59 
60 int
61 main(int argc, char** argv)
62 {
63 	TimeApplication app;
64 	setuid(0);
65 	app.Run();
66 
67 	return 0;
68 }
69 
70