about summary refs log blame commit diff stats
path: root/src/main.cpp
blob: 1d7cc9e9a47a833d4544ac5ca768408344825930 (plain) (tree)
1
2
3
4
5
6
7
8




                      
                   
                           

                                 
        
                         
                              


                                             








                                         

                            
#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include "global.h"
#include "tracker_config.h"
#include "tracker_frame.h"

class TrackerApp : public wxApp {
 public:
  virtual bool OnInit() {
    GetTrackerConfig().Load();

    TrackerFrame *frame = new TrackerFrame();
    frame->Show(true);
    return true;
  }

  bool OnExceptionInMainLoop() override {
    try {
      throw;
    } catch (const std::exception& ex) {
      wxLogError(ex.what());
    }

    return false;
  }
};

wxIMPLEMENT_APP(TrackerApp);