1 /* 2 * Copyright 2003-2010, Haiku. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Atsushi Takamatsu 7 * Jérôme Duval 8 * Oliver Ruiz Dorantes 9 */ 10 11 12 #include "HApp.h" 13 #include "HWindow.h" 14 15 #include <Alert.h> 16 #include <Catalog.h> 17 #include <Locale.h> 18 19 20 #undef B_TRANSLATION_CONTEXT 21 #define B_TRANSLATION_CONTEXT "SoundsHApp" 22 23 24 HApp::HApp() 25 : 26 BApplication("application/x-vnd.Haiku-Sounds") 27 { 28 BRect rect; 29 rect.Set(200, 150, 590, 570); 30 31 HWindow* window = new HWindow(rect, B_TRANSLATE_SYSTEM_NAME("Sounds")); 32 window->Show(); 33 } 34 35 36 HApp::~HApp() 37 { 38 } 39 40 41 void 42 HApp::AboutRequested() 43 { 44 BAlert* alert = new BAlert(B_TRANSLATE("About Sounds"), 45 B_TRANSLATE("Sounds\n" 46 " Brought to you by :\n" 47 "\tOliver Ruiz Dorantes\n" 48 "\tJérôme DUVAL.\n" 49 " Original work from Atsushi Takamatsu.\n" 50 "Copyright ©2003-2006 Haiku"), 51 B_TRANSLATE("OK")); 52 alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); 53 alert->Go(); 54 } 55 56 57 // #pragma mark - 58 59 60 int 61 main() 62 { 63 HApp app; 64 app.Run(); 65 66 return 0; 67 } 68 69