Commit 27bcf885 authored by David Jarvie's avatar David Jarvie
Browse files

Show correct list of sound options if text-to-speech not available

parent 352e4cf7
Pipeline #38349 canceled with stage
......@@ -64,14 +64,15 @@ SoundPicker::SoundPicker(QWidget* parent)
mTypeCombo->addItem(i18n_combo_None(), Preferences::Sound_None); // index None
mTypeCombo->addItem(i18n_combo_Beep(), Preferences::Sound_Beep); // index Beep
mTypeCombo->addItem(i18n_combo_File(), Preferences::Sound_File); // index PlayFile
mTypeCombo->addItem(i18n_combo_Speak(), Preferences::Sound_Speak); // index Speak (only displayed if appropriate)
mFileShowing = true;
mSpeakShowing = !KPIMTextEdit::TextToSpeech::self()->isReady();
showSpeak(!mSpeakShowing); // index Speak (only displayed if appropriate)
mSpeakShowing = true;
connect(mTypeCombo, &ComboBox::activated, this, &SoundPicker::slotTypeSelected);
connect(mTypeCombo, static_cast<void (ComboBox::*)(int)>(&ComboBox::currentIndexChanged), this, &SoundPicker::changed);
mTypeBox->setWhatsThis(xi18nc("@info:whatsthis Combination of multiple whatsthis items",
"<para>Choose a sound to play when the message is displayed."
"<list><item><interface>%1</interface>: the message is displayed silently.</item>"
"<item><interface>%2</interface>: a simple beep is sounded.</item>"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment