mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 07:59:27 +02:00
Modifications to the easy installation of .ny files
This commit is contained in:
commit
c070800e89
@ -201,6 +201,18 @@
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ny</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>AudacityProject.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Nyquist Plug-in File</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Shell</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AUDACITY_EXECUTABLE</string>
|
||||
|
@ -1847,6 +1847,8 @@ bool PluginManager::DropFile(const wxString &fileName)
|
||||
) );
|
||||
for (const auto &id : ids)
|
||||
mPlugins[id].SetEnabled(enable);
|
||||
// Make changes to enabled status persist:
|
||||
this->Save();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -461,16 +461,6 @@ public:
|
||||
|
||||
for (const auto &name : sortednames) {
|
||||
|
||||
#ifdef EXPERIMENTAL_DRAG_DROP_PLUG_INS
|
||||
// Is it a plug-in?
|
||||
if (PluginManager::Get().DropFile(name)) {
|
||||
mProject->RebuildAllMenuBars();
|
||||
continue;
|
||||
}
|
||||
|
||||
// No, so import.
|
||||
#endif
|
||||
|
||||
if (Importer::IsMidi(name))
|
||||
AudacityProject::DoImportMIDI(mProject, name);
|
||||
else
|
||||
@ -3043,12 +3033,24 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
||||
// FIXME: //v Surely we could be smarter about this, like checking much earlier that this is a .aup file.
|
||||
if (temp.Mid(0, 6) != wxT("<?xml ")) {
|
||||
// If it's not XML, try opening it as any other form of audio
|
||||
if (Importer::IsMidi(fileName))
|
||||
DoImportMIDI(this, fileName);
|
||||
else
|
||||
Import(fileName);
|
||||
|
||||
ZoomAfterImport(nullptr);
|
||||
#ifdef EXPERIMENTAL_DRAG_DROP_PLUG_INS
|
||||
// Is it a plug-in?
|
||||
if (PluginManager::Get().DropFile(fileName)) {
|
||||
this->RebuildAllMenuBars();
|
||||
}
|
||||
else
|
||||
// No, so import.
|
||||
#endif
|
||||
|
||||
{
|
||||
if (Importer::IsMidi(fileName))
|
||||
DoImportMIDI(this, fileName);
|
||||
else
|
||||
Import(fileName);
|
||||
|
||||
ZoomAfterImport(nullptr);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user