Commit 0b26a91f authored by Pino Toscano's avatar Pino Toscano

use the standard action names

svn path=/trunk/KDE/kdegraphics/okular/; revision=722687
parent a5803784
......@@ -277,13 +277,11 @@ m_cliPresentation(false), m_generatorGuiClient(0)
// Page Traversal actions
m_gotoPage = KStandardAction::gotoPage( this, SLOT( slotGoToPage() ), ac );
ac->addAction("goto_page", m_gotoPage);
m_gotoPage->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_G) );
// dirty way to activate gotopage when pressing miniBar's button
connect( m_miniBar, SIGNAL( gotoPage() ), m_gotoPage, SLOT( trigger() ) );
m_prevPage = KStandardAction::prior(this, SLOT(slotPreviousPage()), ac);
ac->addAction("previous_page", m_prevPage);
m_prevPage->setIconText( i18nc( "Previous page", "Previous" ) );
m_prevPage->setToolTip( i18n( "Go back to the Previous Page" ) );
m_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
......@@ -295,7 +293,6 @@ m_cliPresentation(false), m_generatorGuiClient(0)
#endif
m_nextPage = KStandardAction::next(this, SLOT(slotNextPage()), ac );
ac->addAction("next_page", m_nextPage);
m_nextPage->setIconText( i18nc( "Next page", "Next" ) );
m_nextPage->setToolTip( i18n( "Advance to the Next Page" ) );
m_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
......@@ -335,20 +332,17 @@ m_cliPresentation(false), m_generatorGuiClient(0)
connect( m_nextBookmark, SIGNAL( triggered() ), this, SLOT( slotNextBookmark() ) );
m_copy = KStandardAction::create( KStandardAction::Copy, m_pageView, SLOT( copyTextSelection() ), ac );
ac->addAction("edit_copy",m_copy);
m_selectAll = KStandardAction::selectAll( m_pageView, SLOT( selectAll() ), ac );
// Find and other actions
m_find = KStandardAction::find( this, SLOT( slotShowFindBar() ), ac );
ac->addAction("find", m_find);
QList<QKeySequence> s = m_find->shortcuts();
s.append( QKeySequence( Qt::Key_Slash ) );
m_find->setShortcuts( s );
m_find->setEnabled( false );
m_findNext = KStandardAction::findNext( this, SLOT( slotFindNext() ), ac);
ac->addAction("find_next",m_findNext);
m_findNext->setEnabled( false );
m_saveAs = KStandardAction::saveAs( this, SLOT( slotSaveFileAs() ), ac );
......
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="okular_part" version="22">
<kpartgui name="okular_part" version="23">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Action name="get_new_stuff" group="file_open"/>
......@@ -17,16 +17,16 @@
<Separator/>
<Action name="edit_select_all"/>
<Separator/>
<Action name="find"/>
<Action name="find_next"/>
<Action name="edit_find"/>
<Action name="edit_find_next"/>
</Menu>
<Menu name="view"><text>&amp;View</text>
<Action name="presentation"/>
<Separator/>
<Action name="zoom_in"/>
<Action name="zoom_out"/>
<Action name="zoom_fit_width"/>
<Action name="zoom_fit_page"/>
<Action name="view_zoom_in"/>
<Action name="view_zoom_out"/>
<Action name="view_fit_to_width"/>
<Action name="view_fit_to_page"/>
<Action name="zoom_fit_rect"/>
<Separator/>
<Action name="view_continuous"/>
......@@ -42,8 +42,8 @@
<Action name="view_toggle_forms"/>
</Menu>
<Menu name="go"><text>&amp;Go</text>
<Action name="previous_page"/>
<Action name="next_page"/>
<Action name="go_previous"/>
<Action name="go_next"/>
<Separator/>
<Action name="first_page"/>
<Action name="last_page"/>
......@@ -51,9 +51,9 @@
<Action name="history_back"/>
<Action name="history_forward" />
<Separator/>
<Action name="goto_page"/>
<Action name="go_goto_page"/>
</Menu>
<Menu name="okular_bookmarks"><text>&amp;Bookmarks</text>
<Menu name="bookmarks"><text>&amp;Bookmarks</text>
<Action name="bookmark_add"/>
<Action name="previous_bookmark"/>
<Action name="next_bookmark" />
......@@ -78,12 +78,12 @@
</Menu>
</MenuBar>
<ToolBar name="mainToolBar"><text>Main Toolbar</text>
<Action name="previous_page"/>
<Action name="next_page"/>
<Action name="go_previous"/>
<Action name="go_next"/>
<Separator/>
<Action name="zoom_to" />
<Action name="zoom_out"/>
<Action name="zoom_in"/>
<Action name="view_zoom_out"/>
<Action name="view_zoom_in"/>
<Separator/>
<Action name="mouse_drag"/>
<Action name="mouse_zoom"/>
......
......@@ -346,9 +346,9 @@ void PageView::setupBaseActions( KActionCollection * ac )
connect( d->aZoom, SIGNAL( triggered(QAction *) ), this, SLOT( slotZoom() ) );
updateZoomText();
d->aZoomIn = ac->addAction( KStandardAction::ZoomIn, "zoom_in", this, SLOT( slotZoomIn() ) );
d->aZoomIn = ac->addAction( KStandardAction::ZoomIn, "view_zoom_in", this, SLOT( slotZoomIn() ) );
d->aZoomOut = ac->addAction( KStandardAction::ZoomOut, "zoom_out", this, SLOT( slotZoomOut() ) );
d->aZoomOut = ac->addAction( KStandardAction::ZoomOut, "view_zoom_out", this, SLOT( slotZoomOut() ) );
}
void PageView::setupActions( KActionCollection * ac )
......@@ -377,11 +377,11 @@ void PageView::setupActions( KActionCollection * ac )
this, SLOT( slotPageSizes( int ) ) );
d->aZoomFitWidth = new KToggleAction(KIcon( "view_fit_width" ), i18n("Fit &Width"), this);
ac->addAction("zoom_fit_width", d->aZoomFitWidth );
ac->addAction("view_fit_to_width", d->aZoomFitWidth );
connect( d->aZoomFitWidth, SIGNAL( toggled( bool ) ), SLOT( slotFitToWidthToggled( bool ) ) );
d->aZoomFitPage = new KToggleAction(KIcon( "view_fit_window" ), i18n("Fit &Page"), this);
ac->addAction("zoom_fit_page", d->aZoomFitPage );
ac->addAction("view_fit_to_page", d->aZoomFitPage );
connect( d->aZoomFitPage, SIGNAL( toggled( bool ) ), SLOT( slotFitToPageToggled( bool ) ) );
d->aZoomFitText = new KToggleAction(KIcon( "zoom-best-fit" ), i18n("Fit &Text"), this);
......
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