aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/options/optw_sound.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-07-31 10:22:57 +0000
committerGravatar Fabio Bas2010-07-31 10:22:57 +0000
commitda3ea1c1b9f65f9138f3aaa027058a3bf1b72516 (patch)
tree5eae37ec4c91af2e2e1650486a8b822ca693b03a /src/modules/options/optw_sound.cpp
parentreverted r4690; unfortunately, there's no way to quick fix #862 without rewri... (diff)
downloadKVIrc-da3ea1c1b9f65f9138f3aaa027058a3bf1b72516.tar.gz
KVIrc-da3ea1c1b9f65f9138f3aaa027058a3bf1b72516.tar.bz2
KVIrc-da3ea1c1b9f65f9138f3aaa027058a3bf1b72516.zip
fix for #867
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4717 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/options/optw_sound.cpp')
-rw-r--r--src/modules/options/optw_sound.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/options/optw_sound.cpp b/src/modules/options/optw_sound.cpp
index f47179a88..e23ad4b51 100644
--- a/src/modules/options/optw_sound.cpp
+++ b/src/modules/options/optw_sound.cpp
@@ -149,9 +149,10 @@ KviSoundGeneralOptionsWidget::~KviSoundGeneralOptionsWidget()
void KviSoundGeneralOptionsWidget::showEvent(QShowEvent *)
{
+qDebug("showEvent");
if(!m_bFirstShow)
return;
-
+qDebug("m_bFirstShow");
// We fill these boxes only before the first show since the soundFillBox()
// is likely to trigger sound system-detection which may take time...
@@ -222,6 +223,7 @@ void KviSoundGeneralOptionsWidget::mediaAutoDetect()
void KviSoundGeneralOptionsWidget::soundFillBox()
{
+ qDebug("soundFillBox");
QStringList l;
QStringList::Iterator it;
int cnt;
@@ -235,10 +237,11 @@ void KviSoundGeneralOptionsWidget::soundFillBox()
goto disable;
m_pSoundSystemBox->clear();
-
+qDebug("soundFillBox clear");
for ( it = l.begin(); it != l.end(); ++it )
{
m_pSoundSystemBox->addItem(*it);
+ qDebug("soundFillBox add %s",it->toUtf8().data());
}
cnt = m_pSoundSystemBox->count();
@@ -246,9 +249,11 @@ void KviSoundGeneralOptionsWidget::soundFillBox()
for(i=0;i<cnt;i++)
{
QString t = m_pSoundSystemBox->itemText(i);
+ qDebug("soundFillBox check %s==%s",t.toUtf8().data(),KVI_OPTION_STRING(KviOption_stringSoundSystem).toUtf8().data());
if(KviQString::equalCI(t,KVI_OPTION_STRING(KviOption_stringSoundSystem)))
{
m_pSoundSystemBox->setCurrentIndex(i);
+qDebug("soundFillBox check ok setCurrentIndex %i",i);
break;
}
}
@@ -298,6 +303,10 @@ disable:
void KviSoundGeneralOptionsWidget::commit()
{
+ // avoid to commit if we've never been shown (and initialized)
+ if(m_bFirstShow)
+ return;
+
KviOptionsWidget::commit();
KVI_OPTION_STRING(KviOption_stringSoundSystem) = m_pSoundSystemBox->currentText();
KVI_OPTION_STRING(KviOption_stringPreferredMediaPlayer) = m_pMediaPlayerBox->currentText();