Commit 8ff3d1d7 authored by Pino Toscano's avatar Pino Toscano

more use of standard actions

svn path=/trunk/KDE/kdegraphics/okular/; revision=722702
parent 0b26a91f
......@@ -348,8 +348,8 @@ m_cliPresentation(false), m_generatorGuiClient(0)
m_saveAs = KStandardAction::saveAs( this, SLOT( slotSaveFileAs() ), ac );
ac->addAction("save",m_saveAs);
m_saveAs->setEnabled( false );
QAction * prefs = KStandardAction::preferences( this, SLOT( slotPreferences() ), ac);
ac->addAction("preferences", prefs);
if ( parent && ( parent->objectName() == QLatin1String( "okular::Shell" ) ) )
{
prefs->setText( i18n( "Configure okular..." ) );
......@@ -360,10 +360,12 @@ m_cliPresentation(false), m_generatorGuiClient(0)
prefs->setText( i18n( "Configure Viewer..." ) );
}
QAction * genPrefs = KStandardAction::preferences( this, SLOT( slotGeneratorPreferences() ), ac );
ac->addAction("generator_prefs", genPrefs);
KAction * genPrefs = new KAction( ac );
ac->addAction("options_configure_generators", genPrefs);
genPrefs->setText( i18n( "Configure Backends..." ) );
genPrefs->setIcon( KIcon( "configure" ) );
genPrefs->setEnabled( m_document->configurableGenerators() > 0 );
connect( genPrefs, SIGNAL( triggered( bool ) ), this, SLOT( slotGeneratorPreferences() ) );
m_printPreview = KStandardAction::printPreview( this, SLOT( slotPrintPreview() ), ac );
m_printPreview->setEnabled( false );
......
......@@ -70,8 +70,8 @@
</Menu>
<Menu name="settings"><text>&amp;Settings</text>
<Action name="show_leftpanel" group="show_merge"/>
<Action name="generator_prefs" group="configure_merge"/>
<Action name="preferences"/>
<Action name="options_configure_generators" group="configure_merge"/>
<Action name="options_configure"/>
</Menu>
<Menu name="help"><text>&amp;Help</text>
<Action name="help_about_backend" group="about_merge"/>
......
......@@ -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, "view_zoom_in", this, SLOT( slotZoomIn() ) );
d->aZoomIn = KStandardAction::zoomIn( this, SLOT( slotZoomIn() ), ac );
d->aZoomOut = ac->addAction( KStandardAction::ZoomOut, "view_zoom_out", this, SLOT( slotZoomOut() ) );
d->aZoomOut = KStandardAction::zoomOut( this, SLOT( slotZoomOut() ), ac );
}
void PageView::setupActions( KActionCollection * ac )
......
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