Commit 2845db76 authored by Katarina Behrens's avatar Katarina Behrens Committed by Albert Astals Cid
Browse files

Add 'Sign' menu entry

parent 35590a27
......@@ -232,6 +232,7 @@ public:
QAction *aMouseTableSelect;
QAction *aMouseMagnifier;
KToggleAction *aTrimToSelection;
KToggleAction * aToggleSignature;
KSelectAction *aZoom;
QAction *aZoomIn;
QAction *aZoomOut;
......@@ -363,6 +364,7 @@ PageView::PageView(QWidget *parent, Okular::Document *document)
d->aMouseNormal = nullptr;
d->aMouseSelect = nullptr;
d->aMouseTextSelect = nullptr;
d->aToggleSignature = nullptr;
d->aZoomFitWidth = nullptr;
d->aZoomFitPage = nullptr;
d->aZoomAutoFit = nullptr;
......@@ -715,6 +717,10 @@ void PageView::setupActions(KActionCollection *ac)
d->aMouseModeMenu->setText(i18nc("@action", "Selection Tools"));
ac->addAction(QStringLiteral("mouse_selecttools"), d->aMouseModeMenu);
d->aToggleSignature = new KToggleAction(QIcon::fromTheme( QStringLiteral("application-pkcs7-signature") ), i18n("&Sign"), this);
ac->addAction(QStringLiteral("mouse_toggle_sign"), d->aToggleSignature );
d->aToggleSignature->setCheckable( true );
// speak actions
#ifdef HAVE_SPEECH
d->aSpeakDoc = new QAction(QIcon::fromTheme(QStringLiteral("text-speak")), i18n("Speak Whole Document"), this);
......@@ -1210,6 +1216,10 @@ void PageView::updateActionState(bool haspages, bool hasformwidgets)
d->annotator->setToolsEnabled(allowTools);
d->annotator->setTextToolsEnabled(allowTools && d->document->supportsSearching());
}
if ( d->aToggleSignature )
d->aToggleSignature->setEnabled( haspages );
#ifdef HAVE_SPEECH
if (d->aSpeakDoc) {
const bool enablettsactions = haspages ? Okular::Settings::useTTS() : false;
......
......@@ -79,6 +79,7 @@
<Action name="mouse_magnifier"/>
<Separator/>
<Action name="mouse_toggle_annotate"/>
<Action name="mouse_toggle_sign"/>
<Separator/>
<Action name="speak_document"/>
<Action name="speak_current_page"/>
......
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