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