added "Recently opened files"-menu, fixed several bugs & crashes, removed obsolete plugins from build

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@529 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2007-08-19 23:31:01 +00:00
parent 69dcd6bbfc
commit 4648b0e21f
21 changed files with 899 additions and 243 deletions

View File

@@ -26,8 +26,6 @@ SUBDIRS = \
midi_import \
organic \
patman \
plucked_string_synth \
polyb302 \
$(SINGERBOT_DIR) \
$(STK_DIR) \
triple_oscillator \

View File

@@ -372,7 +372,15 @@ void patmanSynth::openFile( void )
if( m_patchFile == "" )
{
ofd.setDirectory( configManager::inst()->userSamplesDir() );
if( QDir( "/usr/share/midi/freepats" ).exists() )
{
ofd.setDirectory( "/usr/share/midi/freepats" );
}
else
{
ofd.setDirectory(
configManager::inst()->userSamplesDir() );
}
}
else if( QFileInfo( m_patchFile ).isRelative() )
{

View File

@@ -32,6 +32,8 @@
#else
#include <qdom.h>
#include <qmessagebox.h>
#include <qdir.h>
#endif
@@ -70,24 +72,40 @@ plugin::descriptor malletsstk_plugin_descriptor =
}
mallets::mallets( instrumentTrack * _channel_track ) :
instrument( _channel_track, &malletsstk_plugin_descriptor )
mallets::mallets( instrumentTrack * _instrument_track ) :
instrument( _instrument_track, &malletsstk_plugin_descriptor ),
m_filesMissing( TRUE )
{
m_modalBarWidget = setupModalBarControls( this, _channel_track );
m_filesMissing =
!QDir( configManager::inst()->stkDir() ).exists() ||
!QFileInfo( configManager::inst()->stkDir()+QDir::separator()
+ "sinewave.raw" ).exists();
#if 0
// for some reason this crashes...???
if( m_filesMissing )
{
QMessageBox::information( 0, tr( "Missing files" ),
tr( "Your Stk-installation seems to be "
"incomplete. Please make sure "
"the full Stk-package is installed!" ),
QMessageBox::Ok );
}
#endif
m_modalBarWidget = setupModalBarControls( this, _instrument_track );
setWidgetBackground( m_modalBarWidget, "artwork" );
m_tubeBellWidget = setupTubeBellControls( this, _channel_track );
m_tubeBellWidget = setupTubeBellControls( this, _instrument_track );
setWidgetBackground( m_tubeBellWidget, "artwork" );
m_tubeBellWidget->hide();
m_bandedWGWidget = setupBandedWGControls( this, _channel_track );
m_bandedWGWidget = setupBandedWGControls( this, _instrument_track );
setWidgetBackground( m_bandedWGWidget, "artwork" );
m_bandedWGWidget->hide();
m_presets = setupPresets( this, _channel_track );
m_presets = setupPresets( this, _instrument_track );
m_spread = new knob( knobBright_26, this, tr( "Spread" ),
_channel_track );
_instrument_track );
m_spread->setLabel( tr( "Spread" ) );
m_spread->setRange( 0, 255, 1 );
m_spread->setInitValue( 0 );
@@ -390,6 +408,11 @@ QString mallets::nodeName( void ) const
void mallets::playNote( notePlayHandle * _n, bool )
{
if( m_filesMissing )
{
return;
}
int p = m_presets->value();
const float freq = _n->frequency();

View File

@@ -172,7 +172,9 @@ private:
vvector<sample_t> m_scalers;
sampleFrame * m_buffer;
};
bool m_filesMissing;
} ;
#endif

View File

@@ -480,7 +480,8 @@ void vibed::loadSettings( const QDomElement & _this )
name = "active" + QString::number( i );
m_editors[i]->setOn( _this.attribute( name ).toInt() );
if( m_editors[i]->isOn() )
if( m_editors[i]->isOn() &&
_this.hasAttribute( "volume" + QString::number( i ) ) )
{
name = "volume" + QString::number( i );
m_volumeKnobs[i]->loadSettings( _this, name );