summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2015-08-18 13:28:38 (GMT)
committerMontel Laurent <montel@kde.org>2015-08-18 13:28:38 (GMT)
commitad333314bce6b54acdcb1e813d52243fbccc36b1 (patch)
tree76b3ee221f69ebdab83008c6fdac43c112b7a382
parent014b712359db87d37d5061de56a3aaf93825d0cf (diff)
Don't add "Speak Text" when we don't have support
-rw-r--r--ui/pageview.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 7cf8adb..ce75644 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -2620,7 +2620,12 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
// popup that ask to copy:text and copy/save:image
QMenu menu( this );
- QAction *textToClipboard = 0, *speakText = 0, *imageToClipboard = 0, *imageToFile = 0;
+ QAction *textToClipboard = 0;
+#ifdef HAVE_SPEECH
+ QAction *speakText = 0;
+#endif
+ QAction *imageToClipboard = 0;
+ QAction *imageToFile = 0;
if ( d->document->supportsSearching() && !selectedText.isEmpty() )
{
menu.setTitle( i18np( "Text (1 character)", "Text (%1 characters)", selectedText.length() ) );
@@ -2631,8 +2636,10 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
textToClipboard->setEnabled( false );
textToClipboard->setText( i18n("Copy forbidden by DRM") );
}
+#ifdef HAVE_SPEECH
if ( Okular::Settings::useTTS() )
speakText = menu.addAction( QIcon::fromTheme("text-speak"), i18n( "Speak Text" ) );
+#endif
if ( copyAllowed )
{
addWebShortcutsMenu( &menu, selectedText );