re-organized directory-structure of source-tree
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@93 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -166,8 +166,9 @@ configManager::configManager( void ) :
|
||||
// hardcode since qt < 3.2 doesn't know something like
|
||||
// applicationDirPath and implementing own function would be senseless
|
||||
// since real support for qt < 3.2 is senseless too ;-)
|
||||
m_dataDir( "/usr/share/lmms" ),
|
||||
m_dataDir( "/usr/share/lmms/" ),
|
||||
#endif
|
||||
m_artworkDir( m_dataDir + DEFAULT_THEME_PATH ),
|
||||
#if QT_VERSION >= 0x030200
|
||||
m_pluginDir( qApp->applicationDirPath().section( '/', 0, -2 ) +
|
||||
"/lib/lmms/" ),
|
||||
@@ -547,6 +548,14 @@ void configManager::setVSTDir( const QString & _vd )
|
||||
|
||||
|
||||
|
||||
void configManager::setArtworkDir( const QString & _ad )
|
||||
{
|
||||
m_artworkDir = _ad;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void configManager::accept( void )
|
||||
{
|
||||
if( m_workingDir.right( 1 ) != "/" )
|
||||
@@ -797,6 +806,10 @@ bool configManager::loadConfigFile( void )
|
||||
node = node.nextSibling();
|
||||
}
|
||||
|
||||
if( value( "paths", "artwork" ) != "" )
|
||||
{
|
||||
m_artworkDir = value( "paths", "artwork" );
|
||||
}
|
||||
m_workingDir = value( "paths", "workingdir" );
|
||||
m_vstDir = value( "paths", "vstdir" );
|
||||
|
||||
@@ -847,6 +860,7 @@ bool configManager::loadConfigFile( void )
|
||||
|
||||
void configManager::saveConfigFile( void )
|
||||
{
|
||||
setValue( "paths", "artwork", m_artworkDir );
|
||||
setValue( "paths", "workingdir", m_workingDir );
|
||||
setValue( "paths", "vstdir", m_vstDir );
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
|
||||
"nomsgaftersetup" ).toInt() ),
|
||||
m_workingDir( configManager::inst()->workingDir() ),
|
||||
m_vstDir( configManager::inst()->vstDir() ),
|
||||
m_artworkDir( configManager::inst()->artworkDir() ),
|
||||
m_disableChActInd( configManager::inst()->value( "ui",
|
||||
"disablechannelactivityindicators" ).toInt() ),
|
||||
m_manualChPiano( configManager::inst()->value( "ui",
|
||||
@@ -288,14 +289,39 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
|
||||
connect( vstdir_select_btn, SIGNAL( clicked() ), this,
|
||||
SLOT( openVSTDir() ) );
|
||||
|
||||
|
||||
// artwork-dir
|
||||
tabWidget * artwork_tw = new tabWidget( tr(
|
||||
"Artwork directory" ).toUpper(),
|
||||
directories );
|
||||
artwork_tw->setFixedHeight( 56 );
|
||||
|
||||
m_adLineEdit = new QLineEdit( m_artworkDir, artwork_tw );
|
||||
m_adLineEdit->setGeometry( 10, 20, 300, 16 );
|
||||
connect( m_adLineEdit, SIGNAL( textChanged( const QString & ) ), this,
|
||||
SLOT( setArtworkDir( const QString & ) ) );
|
||||
|
||||
QPushButton * artworkdir_select_btn = new QPushButton(
|
||||
embed::getIconPixmap( "project_open", 16, 16 ),
|
||||
"", artwork_tw );
|
||||
artworkdir_select_btn->setFixedSize( 24, 24 );
|
||||
artworkdir_select_btn->move( 320, 20 );
|
||||
connect( artworkdir_select_btn, SIGNAL( clicked() ), this,
|
||||
SLOT( openArtworkDir() ) );
|
||||
|
||||
|
||||
dir_layout->addWidget( lmms_wd_tw );
|
||||
dir_layout->addSpacing( 10 );
|
||||
dir_layout->addWidget( vst_tw );
|
||||
dir_layout->addSpacing( 10 );
|
||||
dir_layout->addWidget( artwork_tw );
|
||||
dir_layout->addStretch();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QWidget * performance = new QWidget( ws );
|
||||
performance->setFixedSize( 360, 200 );
|
||||
QVBoxLayout * perf_layout = new QVBoxLayout( performance );
|
||||
@@ -596,6 +622,7 @@ void setupDialog::accept( void )
|
||||
|
||||
configManager::inst()->setWorkingDir( m_workingDir );
|
||||
configManager::inst()->setVSTDir( m_vstDir );
|
||||
configManager::inst()->setArtworkDir( m_artworkDir );
|
||||
|
||||
// tell all audio-settings-widget to save their settings
|
||||
for( aswMap::iterator it = m_audioIfaceSetupWidgets.begin();
|
||||
@@ -771,8 +798,7 @@ void setupDialog::openVSTDir( void )
|
||||
tr( "Choose your VST-plugin directory" ),
|
||||
m_vstDir );
|
||||
#else
|
||||
QString new_dir = QFileDialog::getExistingDirectory( m_vstDir,
|
||||
0, 0,
|
||||
QString new_dir = QFileDialog::getExistingDirectory( m_vstDir, 0, 0,
|
||||
tr( "Choose your VST-plugin directory" ),
|
||||
TRUE );
|
||||
#endif
|
||||
@@ -793,6 +819,34 @@ void setupDialog::setVSTDir( const QString & _vd )
|
||||
|
||||
|
||||
|
||||
void setupDialog::openArtworkDir( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
QString new_dir = QFileDialog::getExistingDirectory( this,
|
||||
tr( "Choose artwork-theme directory" ),
|
||||
m_artworkDir );
|
||||
#else
|
||||
QString new_dir = QFileDialog::getExistingDirectory( m_artworkDir,
|
||||
0, 0,
|
||||
tr( "Choose artwork-theme directory" ), TRUE );
|
||||
#endif
|
||||
if( new_dir != QString::null )
|
||||
{
|
||||
m_adLineEdit->setText( new_dir );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::setArtworkDir( const QString & _ad )
|
||||
{
|
||||
m_artworkDir = _ad;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void setupDialog::audioInterfaceChanged( const QString & _iface )
|
||||
{
|
||||
for( aswMap::iterator it = m_audioIfaceSetupWidgets.begin();
|
||||
|
||||
@@ -896,9 +896,12 @@ void songEditor::processNextBuffer( void )
|
||||
break;
|
||||
|
||||
case PLAY_PATTERN:
|
||||
tco_num = m_patternToPlay->getTrack()->getTCONum(
|
||||
if( m_patternToPlay != NULL )
|
||||
{
|
||||
tco_num = m_patternToPlay->getTrack()->getTCONum(
|
||||
m_patternToPlay );
|
||||
tv.push_back( m_patternToPlay->getTrack() );
|
||||
tv.push_back( m_patternToPlay->getTrack() );
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1023,7 +1026,8 @@ void songEditor::processNextBuffer( void )
|
||||
bool songEditor::realTimeTask( void ) const
|
||||
{
|
||||
return( !( m_exporting == TRUE || ( m_playMode == PLAY_PATTERN &&
|
||||
m_patternToPlay->freezing() == TRUE ) ) );
|
||||
m_patternToPlay != NULL &&
|
||||
m_patternToPlay->freezing() == TRUE ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1090,7 +1094,10 @@ void songEditor::playPattern( pattern * _patternToPlay, bool _loop )
|
||||
}
|
||||
m_patternToPlay = _patternToPlay;
|
||||
m_loopPattern = _loop;
|
||||
m_actions.push_back( ACT_PLAY_PATTERN );
|
||||
if( m_patternToPlay != NULL )
|
||||
{
|
||||
m_actions.push_back( ACT_PLAY_PATTERN );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -190,7 +190,9 @@ void trackContainer::loadSettings( const QDomElement & _this )
|
||||
|
||||
void trackContainer::cloneTrack( track * _track )
|
||||
{
|
||||
eng()->getMixer()->pause();
|
||||
track::clone( _track );
|
||||
eng()->getMixer()->play();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -129,7 +129,16 @@ pattern::~pattern()
|
||||
if( eng()->getPianoRoll()->currentPattern() == this )
|
||||
{
|
||||
eng()->getPianoRoll()->setCurrentPattern( NULL );
|
||||
// we have to have the song-editor to stop playing if it played
|
||||
// us before
|
||||
if( eng()->getSongEditor()->playing() &&
|
||||
eng()->getSongEditor()->playMode() ==
|
||||
songEditor::PLAY_PATTERN )
|
||||
{
|
||||
eng()->getSongEditor()->playPattern( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
for( noteVector::iterator it = m_notes.begin();
|
||||
it != m_notes.end(); ++it )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user