Add VST always-on-top config option
This commit is contained in:
committed by
Hyunjin Song
parent
295b899df2
commit
17f6235500
@@ -138,7 +138,9 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
|
||||
"displaywaveform").toInt() ),
|
||||
m_disableAutoQuit(ConfigManager::inst()->value( "ui",
|
||||
"disableautoquit", "1" ).toInt() ),
|
||||
m_vstEmbedMethod( ConfigManager::inst()->vstEmbedMethod() )
|
||||
m_vstEmbedMethod( ConfigManager::inst()->vstEmbedMethod() ),
|
||||
m_vstAlwaysOnTop( ConfigManager::inst()->value( "ui",
|
||||
"vstalwaysontop" ).toInt() )
|
||||
{
|
||||
setWindowIcon( embed::getIconPixmap( "setup_general" ) );
|
||||
setWindowTitle( tr( "Setup LMMS" ) );
|
||||
@@ -346,7 +348,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
|
||||
}
|
||||
|
||||
TabWidget* embed_tw = new TabWidget( tr( "PLUGIN EMBEDDING" ), general);
|
||||
embed_tw->setFixedHeight( 48 );
|
||||
embed_tw->setFixedHeight( 66 );
|
||||
m_vstEmbedComboBox = new QComboBox( embed_tw );
|
||||
m_vstEmbedComboBox->move( XDelta, YDelta );
|
||||
|
||||
@@ -365,6 +367,17 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
|
||||
m_vstEmbedComboBox->addItem( tr( "Embed using XEmbed protocol" ), "xembed" );
|
||||
}
|
||||
m_vstEmbedComboBox->setCurrentIndex( m_vstEmbedComboBox->findData( m_vstEmbedMethod ) );
|
||||
connect( m_vstEmbedComboBox, SIGNAL( currentIndexChanged( int ) ),
|
||||
this, SLOT( vstEmbedMethodChanged() ) );
|
||||
|
||||
m_vstAlwaysOnTopCheckBox = new LedCheckBox(
|
||||
tr( "Keep plugin windows on top when not embedded" ),
|
||||
embed_tw );
|
||||
m_vstAlwaysOnTopCheckBox->move( 20, 44 );
|
||||
m_vstAlwaysOnTopCheckBox->setChecked( m_vstAlwaysOnTop );
|
||||
m_vstAlwaysOnTopCheckBox->setVisible( m_vstEmbedMethod == "none" );
|
||||
connect( m_vstAlwaysOnTopCheckBox, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( toggleVSTAlwaysOnTop( bool ) ) );
|
||||
|
||||
TabWidget * lang_tw = new TabWidget( tr( "LANGUAGE" ), general );
|
||||
lang_tw->setFixedHeight( 48 );
|
||||
@@ -1094,11 +1107,9 @@ void SetupDialog::accept()
|
||||
QString::number( m_disableAutoQuit ) );
|
||||
ConfigManager::inst()->setValue( "app", "language", m_lang );
|
||||
ConfigManager::inst()->setValue( "ui", "vstembedmethod",
|
||||
#if QT_VERSION >= 0x050000
|
||||
m_vstEmbedComboBox->currentData().toString() );
|
||||
#else
|
||||
m_vstEmbedComboBox->itemData(m_vstEmbedComboBox->currentIndex()).toString() );
|
||||
#endif
|
||||
m_vstEmbedMethod );
|
||||
ConfigManager::inst()->setValue( "ui", "vstalwaysontop",
|
||||
QString::number( m_vstAlwaysOnTop ) );
|
||||
|
||||
|
||||
ConfigManager::inst()->setWorkingDir(QDir::fromNativeSeparators(m_workingDir));
|
||||
@@ -1316,6 +1327,25 @@ void SetupDialog::toggleOneInstrumentTrackWindow( bool _enabled )
|
||||
m_oneInstrumentTrackWindow = _enabled;
|
||||
}
|
||||
|
||||
|
||||
void SetupDialog::vstEmbedMethodChanged()
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
m_vstEmbedMethod = m_vstEmbedComboBox->currentData().toString();
|
||||
#else
|
||||
m_vstEmbedMethod = m_vstEmbedComboBox->itemData(
|
||||
m_vstEmbedComboBox->currentIndex()).toString();
|
||||
#endif
|
||||
m_vstAlwaysOnTopCheckBox->setVisible( m_vstEmbedMethod == "none" );
|
||||
}
|
||||
|
||||
|
||||
void SetupDialog::toggleVSTAlwaysOnTop( bool en )
|
||||
{
|
||||
m_vstAlwaysOnTop = en;
|
||||
}
|
||||
|
||||
|
||||
void SetupDialog::setLanguage( int lang )
|
||||
{
|
||||
m_lang = m_languages[lang];
|
||||
|
||||
Reference in New Issue
Block a user