Commit d89eb2ae authored by Pino Toscano's avatar Pino Toscano

Add a "Find Previous" action.

BUG: 184230

svn path=/trunk/KDE/kdegraphics/okular/; revision=926106
parent 048e7dad
......@@ -434,6 +434,9 @@ m_cliPresentation(false), m_generatorGuiClient(0), m_keeper( 0 )
m_findNext = KStandardAction::findNext( this, SLOT( slotFindNext() ), ac);
m_findNext->setEnabled( false );
m_findPrev = KStandardAction::findPrev( this, SLOT( slotFindPrev() ), ac );
m_findPrev->setEnabled( false );
m_saveCopyAs = KStandardAction::saveAs( this, SLOT( slotSaveCopyAs() ), ac );
m_saveCopyAs->setText( i18n( "Save &Copy As..." ) );
ac->addAction( "file_save_copy", m_saveCopyAs );
......@@ -878,6 +881,7 @@ bool Part::openFile()
// update one-time actions
m_find->setEnabled( ok && canSearch );
m_findNext->setEnabled( ok && canSearch );
m_findPrev->setEnabled( ok && canSearch );
m_saveAs->setEnabled( ok && m_document->canSaveChanges() );
m_saveCopyAs->setEnabled( ok );
emit enablePrintAction( ok && m_document->printingSupport() != Okular::Document::NoPrinting );
......@@ -991,6 +995,7 @@ bool Part::closeUrl()
slotHidePresentation();
m_find->setEnabled( false );
m_findNext->setEnabled( false );
m_findPrev->setEnabled( false );
m_saveAs->setEnabled( false );
m_saveCopyAs->setEnabled( false );
m_printPreview->setEnabled( false );
......@@ -1394,6 +1399,15 @@ void Part::slotFindNext()
}
void Part::slotFindPrev()
{
if (m_findBar->isHidden())
slotShowFindBar();
else
m_findBar->findPrev();
}
void Part::slotSaveFileAs()
{
if (m_dummyMode) return;
......
......@@ -133,6 +133,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
void slotPreviousBookmark();
void slotNextBookmark();
void slotFindNext();
void slotFindPrev();
void slotSaveFileAs();
void slotSaveCopyAs();
void slotGetNewStuff();
......@@ -227,6 +228,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
KAction *m_selectAll;
KAction *m_find;
KAction *m_findNext;
KAction *m_findPrev;
KAction *m_saveAs;
KAction *m_saveCopyAs;
KAction *m_printPreview;
......
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="okular_part" version="28">
<kpartgui name="okular_part" version="29">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Action name="get_new_stuff" group="file_open"/>
......@@ -20,6 +20,7 @@
<Separator/>
<Action name="edit_find"/>
<Action name="edit_find_next"/>
<Action name="edit_find_prev"/>
</Menu>
<Menu name="view"><text>&amp;View</text>
<Action name="presentation"/>
......
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