FileBrowser: added file type VstPluginFile

Added file type VstPluginFile in order to allow loading DLL files by
an according plugin directly from file browser.
This commit is contained in:
Tobias Doerffel
2009-04-13 23:58:30 +02:00
parent 9a4b4f3cfe
commit e0d352dc2c
2 changed files with 18 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
/*
* file_browser.h - include file for fileBrowser
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -178,6 +178,7 @@ public:
PatchFile,
MidiFile,
FlpFile,
VstPluginFile,
UnknownFile,
NumFileTypes
} ;

View File

@@ -435,8 +435,9 @@ void fileBrowserTreeWidget::mousePressEvent( QMouseEvent * _me )
m_previewPlayHandle = s;
delete tf;
}
else if( f->handling() == fileItem::LoadAsPreset ||
f->handling() == fileItem::LoadByPlugin )
else if( f->type() != fileItem::VstPluginFile &&
( f->handling() == fileItem::LoadAsPreset ||
f->handling() == fileItem::LoadByPlugin ) )
{
m_previewPlayHandle =
new presetPreviewPlayHandle( f->fullName(),
@@ -499,6 +500,14 @@ void fileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * _me )
this );
break;
case fileItem::VstPluginFile:
new stringPairDrag( "vstplugin",
f->fullName(),
embed::getIconPixmap(
"sample_file" ),
this );
break;
default:
break;
}
@@ -992,6 +1001,11 @@ void fileItem::determineFileType( void )
m_type = FlpFile;
m_handling = ImportAsProject;
}
else if( ext == "dll" )
{
m_type = VstPluginFile;
m_handling = LoadByPlugin;
}
else
{
m_type = UnknownFile;