Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Aggiunto supporto per evitare l'esecuzione di multiple copie dei programmi di manutenzione git-svn-id: svn://10.65.10.50/branches/R_10_00@21934 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
74a0998760
commit
700b85cae9
@ -53,6 +53,7 @@ wxString _startup_dir;
|
||||
wxString _strDefaultStatbarText;
|
||||
wxString _appl_name;
|
||||
wxString _appl_version;
|
||||
BOOLEAN _appl_already_running;
|
||||
wxLocale* _locale = NULL;
|
||||
|
||||
static XVT_ERRMSG_HANDLER _error_handler = NULL;
|
||||
@ -3940,6 +3941,9 @@ long xvt_vobj_get_attr(WINDOW win, long data)
|
||||
case ATTR_APPL_VERSION_STRING:
|
||||
ret = (long)(const char*)_appl_version;
|
||||
break;
|
||||
case ATTR_APPL_ALREADY_RUNNING:
|
||||
ret = _appl_already_running;
|
||||
break;
|
||||
case ATTR_DOCFRAME_WIDTH:
|
||||
case ATTR_FRAME_WIDTH:
|
||||
ret = xvt_vobj_get_metric(win, wxSYS_FRAMESIZE_X);
|
||||
@ -4218,6 +4222,7 @@ void xvt_vobj_set_attr(WINDOW win, long data, long value)
|
||||
}
|
||||
break;
|
||||
case ATTR_APPL_VERSION_STRING: _appl_version = (const char*)value; break;
|
||||
case ATTR_APPL_ALREADY_RUNNING: _appl_already_running = value != 0; break;
|
||||
case ATTR_BACK_COLOR: SetArtistColor(win, wxAUI_DOCKART_BACKGROUND_COLOUR, value); break;
|
||||
case ATTR_ERRMSG_HANDLER: _error_handler = (XVT_ERRMSG_HANDLER)value; break;
|
||||
case ATTR_EVENT_HOOK: SORRY_BOX(); break; // TBI?: Native events hook!
|
||||
|
@ -41,6 +41,7 @@ bool TMainApp::OnInit()
|
||||
const wxFileName strWrk = argv[0];
|
||||
const wxString strApp = strWrk.GetName().Lower();
|
||||
m_sic = new wxSingleInstanceChecker(strApp);
|
||||
xvt_vobj_set_attr(NULL_WIN, ATTR_APPL_ALREADY_RUNNING, m_sic->IsAnotherRunning());
|
||||
|
||||
// Non eseguo direttamente xvt_main per dar modo al main event loop di partire
|
||||
wxTimerEvent evt(TIMER_ID);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Agreement with XVT Software.
|
||||
*
|
||||
* $RCSfile: xvt_defs.h,v $
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.11.2.1 $
|
||||
*
|
||||
* Purpose: Global XVT macro definitions.
|
||||
*
|
||||
@ -492,6 +492,7 @@
|
||||
#define ATTR_APP_CTL_FONT_RID (ATTR_BASE + 719)
|
||||
#define ATTR_SPEECH_MODE (ATTR_BASE + 720) /* Added by Guy */
|
||||
#define ATTR_APPL_VERSION_STRING (ATTR_BASE + 721) /* Added by Guy */
|
||||
#define ATTR_APPL_ALREADY_RUNNING (ATTR_BASE + 722) /* Added by Guy */
|
||||
|
||||
/* Font attributes */
|
||||
#define ATTR_FONT_MAPPER (ATTR_BASE + 800)
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "wxinc.h"
|
||||
#include <wx/print.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/print.h>
|
||||
#include <wx/snglinst.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
#include "xvt.h"
|
||||
#include "xvtart.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user