diff --git a/data/themes/default/soundfont_file.png b/data/themes/default/soundfont_file.png new file mode 100644 index 000000000..e5fb2a2cc Binary files /dev/null and b/data/themes/default/soundfont_file.png differ diff --git a/data/themes/default/vst_plugin_file.png b/data/themes/default/vst_plugin_file.png new file mode 100644 index 000000000..3a9804d23 Binary files /dev/null and b/data/themes/default/vst_plugin_file.png differ diff --git a/include/file_browser.h b/include/file_browser.h index d3aa501bf..3679b45a5 100644 --- a/include/file_browser.h +++ b/include/file_browser.h @@ -224,6 +224,8 @@ private: static QPixmap * s_projectFilePixmap; static QPixmap * s_presetFilePixmap; static QPixmap * s_sampleFilePixmap; + static QPixmap * s_soundfontFilePixmap; + static QPixmap * s_vstPluginFilePixmap; static QPixmap * s_midiFilePixmap; static QPixmap * s_flpFilePixmap; static QPixmap * s_unknownFilePixmap; diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index a55ca4b50..8590d9585 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -312,7 +312,8 @@ void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee ) { stringPairDrag::processDragEnterEvent( _dee, QString( "presetfile,pluginpresetfile,samplefile,instrument," - "importedproject,track_%1,track_%2" ). + "importedproject,soundfontfile,vstpluginfile," + "track_%1,track_%2" ). arg( track::InstrumentTrack ). arg( track::SampleTrack ) ); } @@ -334,7 +335,8 @@ void TrackContainerView::dropEvent( QDropEvent * _de ) //it->toggledInstrumentTrackButton( true ); _de->accept(); } - else if( type == "samplefile" || type == "pluginpresetfile" ) + else if( type == "samplefile" || type == "pluginpresetfile" + || type == "soundfontfile" || type == "vstpluginfile") { InstrumentTrack * it = dynamic_cast( track::create( track::InstrumentTrack, diff --git a/src/gui/file_browser.cpp b/src/gui/file_browser.cpp index d49d4c04f..87714ea89 100644 --- a/src/gui/file_browser.cpp +++ b/src/gui/file_browser.cpp @@ -484,7 +484,14 @@ void fileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * _me ) new stringPairDrag( "samplefile", f->fullName(), embed::getIconPixmap( "sample_file" ), this ); break; - + case fileItem::SoundFontFile: + new stringPairDrag( "soundfontfile", f->fullName(), + embed::getIconPixmap( "soundfont_file" ), this ); + break; + case fileItem::VstPluginFile: + new stringPairDrag( "vstpluginfile", f->fullName(), + embed::getIconPixmap( "vst_plugin_file" ), this ); + break; case fileItem::MidiFile: // don't allow dragging FLP-files as FLP import filter clears project // without asking @@ -493,11 +500,6 @@ void fileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * _me ) embed::getIconPixmap( "midi_file" ), this ); break; - case fileItem::VstPluginFile: - new stringPairDrag( "vstplugin", f->fullName(), - embed::getIconPixmap( "sample_file" ), this ); - break; - default: break; } @@ -857,6 +859,8 @@ bool directory::addItems( const QString & _path ) QPixmap * fileItem::s_projectFilePixmap = NULL; QPixmap * fileItem::s_presetFilePixmap = NULL; QPixmap * fileItem::s_sampleFilePixmap = NULL; +QPixmap * fileItem::s_soundfontFilePixmap = NULL; +QPixmap * fileItem::s_vstPluginFilePixmap = NULL; QPixmap * fileItem::s_midiFilePixmap = NULL; QPixmap * fileItem::s_flpFilePixmap = NULL; QPixmap * fileItem::s_unknownFilePixmap = NULL; @@ -905,6 +909,18 @@ void fileItem::initPixmaps( void ) "sample_file", 16, 16 ) ); } + if ( s_soundfontFilePixmap == NULL ) + { + s_soundfontFilePixmap = new QPixmap( embed::getIconPixmap( + "soundfont_file", 16, 16 ) ); + } + + if ( s_vstPluginFilePixmap == NULL ) + { + s_vstPluginFilePixmap = new QPixmap( embed::getIconPixmap( + "vst_plugin_file", 16, 16 ) ); + } + if( s_midiFilePixmap == NULL ) { s_midiFilePixmap = new QPixmap( embed::getIconPixmap( @@ -931,8 +947,13 @@ void fileItem::initPixmaps( void ) case PresetFile: setIcon( 0, *s_presetFilePixmap ); break; + case SoundFontFile: + setIcon( 0, *s_soundfontFilePixmap ); + break; + case VstPluginFile: + setIcon( 0, *s_vstPluginFilePixmap ); + break; case SampleFile: - case SoundFontFile: // TODO case PatchFile: // TODO setIcon( 0, *s_sampleFilePixmap ); break;