mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-15 15:50:54 +02:00
Ability to enable/disable loading of modules. Resized Prefs. Same-machine flag set when scripting (used by vista and later).
This commit is contained in:
parent
584e712eab
commit
2bf327fec7
@ -20,7 +20,7 @@ void PipeServer()
|
|||||||
hPipeToSrv = CreateNamedPipe(
|
hPipeToSrv = CreateNamedPipe(
|
||||||
pipeNameToSrv ,
|
pipeNameToSrv ,
|
||||||
PIPE_ACCESS_DUPLEX,
|
PIPE_ACCESS_DUPLEX,
|
||||||
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT ,//| PIPE_REJECT_REMOTE_CLIENTS,
|
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS,
|
||||||
PIPE_UNLIMITED_INSTANCES,
|
PIPE_UNLIMITED_INSTANCES,
|
||||||
nBuff,
|
nBuff,
|
||||||
nBuff,
|
nBuff,
|
||||||
@ -34,7 +34,7 @@ void PipeServer()
|
|||||||
hPipeFromSrv = CreateNamedPipe(
|
hPipeFromSrv = CreateNamedPipe(
|
||||||
pipeNameFromSrv ,
|
pipeNameFromSrv ,
|
||||||
PIPE_ACCESS_DUPLEX,
|
PIPE_ACCESS_DUPLEX,
|
||||||
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT ,//| PIPE_REJECT_REMOTE_CLIENTS,
|
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS,
|
||||||
PIPE_UNLIMITED_INSTANCES,
|
PIPE_UNLIMITED_INSTANCES,
|
||||||
nBuff,
|
nBuff,
|
||||||
nBuff,
|
nBuff,
|
||||||
|
@ -71,8 +71,30 @@ wxWindow * MakeHijackPanel()
|
|||||||
// starts a thread and reads script commands.
|
// starts a thread and reads script commands.
|
||||||
tpRegScriptServerFunc scriptFn;
|
tpRegScriptServerFunc scriptFn;
|
||||||
|
|
||||||
|
bool IsAllowedModule( wxString fname )
|
||||||
|
{
|
||||||
|
bool bLoad = false;
|
||||||
|
wxString ShortName = wxFileName( fname ).GetName();
|
||||||
|
if( (ShortName.CmpNoCase( wxT("mod-script-pipe")) == 0 ))
|
||||||
|
{
|
||||||
|
gPrefs->Read(wxT("/Module/mod-script-pipe"), &bLoad, false);
|
||||||
|
}
|
||||||
|
else if( (ShortName.CmpNoCase( wxT("mod-nyq-bench")) == 0 ))
|
||||||
|
{
|
||||||
|
gPrefs->Read(wxT("/Module/mod-nyq-bench"), &bLoad, false);
|
||||||
|
}
|
||||||
|
else if( (ShortName.CmpNoCase( wxT("mod-track-panel")) == 0 ))
|
||||||
|
{
|
||||||
|
gPrefs->Read(wxT("/Module/mod-track-panel"), &bLoad, false);
|
||||||
|
}
|
||||||
|
return bLoad;
|
||||||
|
}
|
||||||
|
|
||||||
void LoadModule(wxString fname)
|
void LoadModule(wxString fname)
|
||||||
{
|
{
|
||||||
|
if( !IsAllowedModule( fname ) )
|
||||||
|
return;
|
||||||
|
|
||||||
wxLogDebug(wxT("About to load module %s"), fname.c_str());
|
wxLogDebug(wxT("About to load module %s"), fname.c_str());
|
||||||
wxLogNull logNo; // Don't show wxWidgets Error if cannot load within this method. (Fix bug 544.)
|
wxLogNull logNo; // Don't show wxWidgets Error if cannot load within this method. (Fix bug 544.)
|
||||||
|
|
||||||
|
@ -195,7 +195,8 @@ PrefsDialog::PrefsDialog(wxWindow * parent)
|
|||||||
// The magic number 7 was determined by Ed's experimentation.
|
// The magic number 7 was determined by Ed's experimentation.
|
||||||
// Frankly, this is a hack to work around a bug in wxTreebook, and
|
// Frankly, this is a hack to work around a bug in wxTreebook, and
|
||||||
// will have to be revisited if we add another category to mCategories.
|
// will have to be revisited if we add another category to mCategories.
|
||||||
SetSizeHints(sz.x, sz.y + 7, 800, 600);
|
// JKC later added a category and 20 onto the 7.
|
||||||
|
SetSizeHints(sz.x, sz.y + 7 + 20, 800, 600);
|
||||||
|
|
||||||
// Center after all that resizing, but make sure it doesn't end up
|
// Center after all that resizing, but make sure it doesn't end up
|
||||||
// off-screen
|
// off-screen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user