Commit f75e92de authored by Pino Toscano's avatar Pino Toscano

borders -> margins, except in UI (todo added for kde 4.2)

svn path=/trunk/KDE/kdegraphics/okular/; revision=813364
parent 9a9553bb
......@@ -224,7 +224,7 @@
<min>1</min>
<max>5</max>
</entry>
<entry key="TrimBorders" type="Bool" >
<entry key="TrimMargins" type="Bool" >
<default>false</default>
</entry>
<entry key="ViewContinuous" type="Bool" >
......
......@@ -39,7 +39,7 @@
<Action name="view_orientation_original"/>
</Menu>
<Action name="view_pagesizes"/>
<Action name="view_trim_borders"/>
<Action name="view_trim_margins"/>
<Separator/>
<Action name="view_toggle_forms"/>
</Menu>
......
......@@ -138,7 +138,7 @@ public:
KAction * aRotateCounterClockwise;
KAction * aRotateOriginal;
KSelectAction * aPageSizes;
KToggleAction * aTrimBorders;
KToggleAction * aTrimMargins;
QAction * aMouseNormal;
QAction * aMouseSelect;
QAction * aMouseTextSelect;
......@@ -323,7 +323,7 @@ PageView::PageView( QWidget *parent, Okular::Document *document )
d->aRotateCounterClockwise = 0;
d->aRotateOriginal = 0;
d->aPageSizes = 0;
d->aTrimBorders = 0;
d->aTrimMargins = 0;
d->aMouseNormal = 0;
d->aMouseSelect = 0;
d->aMouseTextSelect = 0;
......@@ -435,10 +435,10 @@ void PageView::setupActions( KActionCollection * ac )
connect( d->aPageSizes , SIGNAL( triggered( int ) ),
this, SLOT( slotPageSizes( int ) ) );
d->aTrimBorders = new KToggleAction( i18n( "&Trim Borders" ), this );
ac->addAction("view_trim_borders", d->aTrimBorders );
connect( d->aTrimBorders, SIGNAL( toggled( bool ) ), SLOT( slotTrimBordersToggled( bool ) ) );
d->aTrimBorders->setChecked( Okular::Settings::trimBorders() );
d->aTrimMargins = new KToggleAction( i18n( "&Trim Borders" ), this ); // ### TODO KDE 4.2: rename to "margins"
ac->addAction("view_trim_margins", d->aTrimMargins );
connect( d->aTrimMargins, SIGNAL( toggled( bool ) ), SLOT( slotTrimMarginsToggled( bool ) ) );
d->aTrimMargins->setChecked( Okular::Settings::trimMargins() );
d->aZoomFitWidth = new KToggleAction(KIcon( "zoom-fit-width" ), i18n("Fit &Width"), this);
ac->addAction("view_fit_to_width", d->aZoomFitWidth );
......@@ -2299,7 +2299,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight
Okular::NormalizedRect crop( 0., 0., 1., 1. );
// Handle cropping
if ( Okular::Settings::trimBorders() && okularPage->isBoundingBoxKnown()
if ( Okular::Settings::trimMargins() && okularPage->isBoundingBoxKnown()
&& !okularPage->boundingBox().isNull() )
{
crop = okularPage->boundingBox();
......@@ -3295,11 +3295,11 @@ void PageView::slotPageSizes( int newsize )
d->document->setPageSize( d->document->pageSizes().at( newsize ) );
}
void PageView::slotTrimBordersToggled( bool on )
void PageView::slotTrimMarginsToggled( bool on )
{
if ( Okular::Settings::trimBorders() != on )
if ( Okular::Settings::trimMargins() != on )
{
Okular::Settings::setTrimBorders( on );
Okular::Settings::setTrimMargins( on );
Okular::Settings::self()->writeConfig();
if ( d->document->pages() > 0 )
{
......
......@@ -203,7 +203,7 @@ Q_OBJECT
void slotRotateCounterClockwise();
void slotRotateOriginal();
void slotPageSizes( int );
void slotTrimBordersToggled( bool );
void slotTrimMarginsToggled( bool );
void slotToggleForms();
void slotFormWidgetChanged( FormWidgetIface *w );
void slotRefreshPage();
......
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