detect incomplete Stk-installation in model rather than view for not crashing when playing without opening the GUI before

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1413 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-07-30 20:39:32 +00:00
parent 5efa20d772
commit 85017844bf
2 changed files with 20 additions and 19 deletions

View File

@@ -1,5 +1,9 @@
2008-07-30 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/stk/mallets/mallets.cpp:
detect incomplete Stk-installation in model rather than view for not
crashing when playing without opening the GUI before
* src/core/main.cpp:
- added --dump parameter for easily uncompressing mmpz-files
- try to set realtime priority after command-line parsing as the
@@ -903,7 +907,7 @@
* src/gui/controller_connection_dialog.cpp:
Fix MIDI AutoDetect
* src/gui/widgets/knob.cpp:
Fix occationally missing line after instantiation
@@ -911,10 +915,10 @@
* src/gui/controller_connection_dialog.cpp:
Show name instead of type in connection dialog
* src/gui/widgets/controller_view.cpp:
Remove bypass
* plugins/lb302/lb302.cpp:
* plugins/lb302/lb302.h:
- Initial support for pitch-bend, doesn't work during slide.

View File

@@ -76,8 +76,20 @@ malletsInstrument::malletsInstrument( instrumentTrack * _instrument_track ):
m_strikeModel( FALSE, this, tr( "Bowed" ) ),
m_presetsModel(this),
m_spreadModel(0, 0, 255, 1, this, tr( "Spread" )),
m_filesMissing( FALSE )
m_filesMissing( !QDir( configManager::inst()->stkDir() ).exists() ||
!QFileInfo( configManager::inst()->stkDir() + QDir::separator()
+ "sinewave.raw" ).exists() )
{
// try to inform user about missing Stk-installation
if( m_filesMissing && engine::hasGUI() )
{
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 );
}
// ModalBar
m_presetsModel.addItem( tr( "Marimba" ) );
m_scalers.append( 4.0 );
@@ -293,21 +305,6 @@ malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument,
QWidget * _parent ) :
instrumentView( _instrument, _parent )
{
_instrument->m_filesMissing =
!QDir( configManager::inst()->stkDir() ).exists() ||
!QFileInfo( configManager::inst()->stkDir() + QDir::separator()
+ "sinewave.raw" ).exists();
// for some reason this crashes...???
if( _instrument->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 );
}
m_modalBarWidget = setupModalBarControls( this );
setWidgetBackground( m_modalBarWidget, "artwork" );