YATISH
Yet Another TIme SHeet
/home/nicolas/sources/yatish/yatishApp.cpp
Go to the documentation of this file.
1 
25 #include "wx_pch.h"
26 #include "yatishApp.h"
27 
28 //(*AppHeaders
29 #include "yatishFrame.h"
30 #include <wx/image.h>
31 //*)
32 
34 
36  if ( !wxApp::OnInit() ) return false;
37  wxConfig::Set ( new wxConfig ("yatish", "EIF-services",
38  wxEmptyString, wxEmptyString,
39  wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_SUBDIR) );
40 #ifdef __WXGTK__
41  wxStandardPaths::Get().SetInstallPrefix ("/usr/local"); // should be already there according to the wxwidgets doc...
42 #endif
43  yatishLocale = new wxLocale ( wxLANGUAGE_DEFAULT );
44  yatishLocale->AddCatalog ("yatish");
45 #ifdef NDEBUG
46  if ( checker.IsAnotherRunning() ) {
47  wxLogError(_("Another program instance is already running, aborting.") );
48  return false;
49  }
50 #endif
51  wxFileSystem::AddHandler(new wxZipFSHandler);
52  //(*AppInitialize
53  bool wxsOK = true;
54  wxInitAllImageHandlers();
55  if ( wxsOK )
56  {
57  yatishFrame* Frame = new yatishFrame(0);
58  Frame->Show();
59  SetTopWindow(Frame);
60  }
61  //*)
62  return wxsOK;
63 }
64 
66  delete yatishLocale;
67  delete wxConfig::Set (nullptr);
68  return wxApp::OnExit();
69 }
int OnExit()
Definition: yatishApp.cpp:65
wxIMPLEMENT_APP(yatishApp)
wxLocale * yatishLocale
Definition: yatishApp.h:27
bool OnInit()
Definition: yatishApp.cpp:35