summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2015-03-06 13:00:02 (GMT)
committerMontel Laurent <montel@kde.org>2015-03-06 13:00:02 (GMT)
commit8fad6ebe09048cbcfe2bec3d365d026ab1a1ddf8 (patch)
tree7770e005e5e8a6336adecd45e203d1ab10096ac1
parent587e25fa8f3c2bad3c1b76b596d82d9e24f839e1 (diff)
Don't create action when we don't have qtspeech
-rw-r--r--ui/pageview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 87f8d36..9951dac 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -627,11 +627,12 @@ void PageView::setupActions( KActionCollection * ac )
ta->addAction( d->aMouseTableSelect );
// speak actions
+#ifdef HAVE_SPEECH
d->aSpeakDoc = new QAction( QIcon::fromTheme( "text-speak" ), i18n( "Speak Whole Document" ), this );
ac->addAction( "speak_document", d->aSpeakDoc );
d->aSpeakDoc->setEnabled( false );
connect( d->aSpeakDoc, SIGNAL(triggered()), SLOT(slotSpeakDocument()) );
-
+
d->aSpeakPage = new QAction( QIcon::fromTheme( "text-speak" ), i18n( "Speak Current Page" ), this );
ac->addAction( "speak_current_page", d->aSpeakPage );
d->aSpeakPage->setEnabled( false );
@@ -641,6 +642,11 @@ void PageView::setupActions( KActionCollection * ac )
ac->addAction( "speak_stop_all", d->aSpeakStop );
d->aSpeakStop->setEnabled( false );
connect( d->aSpeakStop, SIGNAL(triggered()), SLOT(slotStopSpeaks()) );
+#else
+ d->aSpeakDoc = 0;
+ d->aSpeakPage = 0;
+ d->aSpeakStop = 0;
+#endif
// Other actions
QAction * su = new QAction(i18n("Scroll Up"), this);