From kde-commits Thu Jun 19 03:49:40 2008 From: Thorsten Zachmann Date: Thu, 19 Jun 2008 03:49:40 +0000 To: kde-commits Subject: koffice/kpresenter Message-Id: <1213847380.926602.1025.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121384771431614 SVN commit 822087 by zachmann: o Fix: save the sound into the file o Finish the sound before restarting M +5 -0 part/KPrSoundData.cpp M +5 -0 part/KPrSoundData.h M +3 -1 plugins/eventactions/sound/KPrSoundEventAction.cpp M +2 -1 plugins/eventactions/sound/KPrSoundEventActionWidget.cpp --- trunk/koffice/kpresenter/part/KPrSoundData.cpp #822086:822087 @@ -181,3 +181,8 @@ d->tempFile->close(); return true; } + +KPrSoundCollection * KPrSoundData::soundCollection() +{ + return d->collection; +} --- trunk/koffice/kpresenter/part/KPrSoundData.h #822086:822087 @@ -99,6 +99,11 @@ return other.d == d; } + /** + * Get the collection used + */ + KPrSoundCollection * soundCollection(); + private: class Private; Private * const d; --- trunk/koffice/kpresenter/plugins/eventactions/sound/KPrSoundEventAction.cpp #822086:822087 @@ -81,12 +81,14 @@ context.xmlWriter().endElement(); context.xmlWriter().endElement(); + + context.addDataCenter( m_soundData->soundCollection() ); } void KPrSoundEventAction::execute( KoTool * tool ) { - Q_UNUSED( tool ); if ( m_soundData ) { + finish( tool ); m_media = Phonon::createPlayer( Phonon::MusicCategory, Phonon::MediaSource( m_soundData->nameOfTempFile() ) ); connect( m_media, SIGNAL( finished() ), this, SLOT( finished() ) ); --- trunk/koffice/kpresenter/plugins/eventactions/sound/KPrSoundEventActionWidget.cpp #822086:822087 @@ -44,6 +44,7 @@ connect( m_soundCombo, SIGNAL( currentIndexChanged( int ) ), this, SLOT( soundComboChanged() ) ); + setEnabled( false ); updateCombo( "" ); } @@ -70,7 +71,7 @@ m_eventAction = 0; m_soundCollection = 0; } - m_soundCombo->setEnabled( m_shape && m_soundCollection ); + setEnabled( m_shape && m_soundCollection ); updateCombo( title ); }