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