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:
@@ -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
|
||||
} ;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user