1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +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:
james.k.crook@gmail.com 2012-07-14 22:45:12 +00:00
parent 584e712eab
commit 2bf327fec7
3 changed files with 26 additions and 3 deletions

View File

@ -20,7 +20,7 @@ void PipeServer()
hPipeToSrv = CreateNamedPipe(
pipeNameToSrv ,
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,
nBuff,
nBuff,
@ -34,7 +34,7 @@ void PipeServer()
hPipeFromSrv = CreateNamedPipe(
pipeNameFromSrv ,
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,
nBuff,
nBuff,

View File

@ -71,8 +71,30 @@ wxWindow * MakeHijackPanel()
// starts a thread and reads script commands.
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)
{
if( !IsAllowedModule( fname ) )
return;
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.)

View File

@ -195,7 +195,8 @@ PrefsDialog::PrefsDialog(wxWindow * parent)
// The magic number 7 was determined by Ed's experimentation.
// 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.
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
// off-screen