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 17 18 #include <unistd.h> 19 20 21 const char* kAppSignature = "application/x-vnd.Be-TIME"; 22 23 24 TimeApplication::TimeApplication() 25 : BApplication(kAppSignature), 26 fWindow(NULL) 27 { 28 fWindow = new TTimeWindow(BRect(100, 100, 570, 327)); 29 } 30 31 32 TimeApplication::~TimeApplication() 33 { 34 } 35 36 37 void 38 TimeApplication::ReadyToRun() 39 { 40 fWindow->Show(); 41 } 42 43 44 void 45 TimeApplication::AboutRequested() 46 { 47 BAlert *alert = new BAlert("about", 48 "Time & Date, writen by:\n\n\tAndrew Edward McCall\n\tMike Berg\n\t" 49 "Julun\n\nCopyright 2004-2007, Haiku.", "OK"); 50 alert->Go(); 51 } 52 53 54 // #pragma mark - 55 56 57 int 58 main(int argc, char** argv) 59 { 60 TimeApplication app; 61 setuid(0); 62 app.Run(); 63 64 return 0; 65 } 66 67