Patch level :4.0 790
Files correlati : Ricompilazione Demo : [ ] Commento :nuovo skeylink.h delle eutron aggiunto nella OnInit delle nostre applicazioni la possibilita' di dire chi e' l'applicazione stessa (per ora serve al setup per scoprire se benetti non ha spento il server di chiavi o la barbarella ha campo acceso) git-svn-id: svn://10.65.10.50/trunk@15644 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3283e4b731
commit
d77551ab78
@ -1,13 +1,17 @@
|
||||
#include "../xvaga/wxinc.h"
|
||||
|
||||
#include <wx/snglinst.h>
|
||||
|
||||
extern int xvt_main(int argc, char** argv);
|
||||
|
||||
class TMainApp : public wxApp
|
||||
{
|
||||
wxLocale m_Locale;
|
||||
wxSingleInstanceChecker* m_sic;
|
||||
|
||||
protected:
|
||||
virtual bool OnInit();
|
||||
virtual int OnExit();
|
||||
|
||||
#if wxCHECK_VERSION(2,6,1)
|
||||
virtual void OnTimer(wxTimerEvent& event);
|
||||
@ -40,6 +44,11 @@ void TMainApp::OnTimer(wxTimerEvent& event)
|
||||
|
||||
bool TMainApp::OnInit()
|
||||
{
|
||||
wxString strApp = argv[0];
|
||||
const wxString strWrk = strApp.BeforeLast('.');
|
||||
strApp = strWrk.Right(3);
|
||||
strApp.MakeLower();
|
||||
m_sic = new wxSingleInstanceChecker(strApp);
|
||||
m_Locale.Init(wxLocale::GetSystemLanguage()); // wxLANGUAGE_ITALIAN
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
@ -56,3 +65,9 @@ bool TMainApp::OnInit()
|
||||
#endif
|
||||
}
|
||||
|
||||
int TMainApp::OnExit()
|
||||
{
|
||||
delete m_sic;
|
||||
m_sic = NULL;
|
||||
return wxApp::OnExit();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user