Commit 624f0bed authored by Enrico Ros's avatar Enrico Ros
Browse files

option to disable 'useful' messages on screen. (pageview's osd)

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=358845
parent a4cccdb4
......@@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>266</width>
<height>83</height>
<height>109</height>
</rect>
</property>
<property name="caption">
......@@ -85,6 +85,17 @@
</widget>
</hbox>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_HideOSD</cstring>
</property>
<property name="text">
<string>Hide &amp;hints and info messages</string>
</property>
<property name="accel">
<string>Alt+H</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer3</cstring>
......@@ -98,7 +109,7 @@
<property name="sizeHint">
<size>
<width>20</width>
<height>60</height>
<height>50</height>
</size>
</property>
</spacer>
......
......@@ -42,6 +42,9 @@
<entry key="ShowSearchBar" type="Bool" >
<default>true</default>
</entry>
<entry key="HideOSD" type="Bool" >
<default>false</default>
</entry>
</group>
<group name="MainView" >
<entry key="SplitterSizes" type="IntList" />
......
......@@ -177,11 +177,10 @@ void PageView::setupActions( KActionCollection * ac )
KToggleAction *ms = new KRadioAction( i18n("Select"), "frame_edit", 0, this, SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
ms->setExclusiveGroup("MouseType");
//ms->setEnabled( false ); // implement feature before removing this line
md = new KRadioAction( i18n("Draw"), "edit", 0, this, SLOT( slotSetMouseDraw() ), ac, "mouse_draw" );
md->setExclusiveGroup("MouseType");
//md->setEnabled( false ); // implement feature before removing this line
md->setEnabled( false ); // implement feature before removing this line
// Other actions
KAction * su = new KAction( i18n("Scroll Up"), 0, this, SLOT( slotScrollUp() ), ac, "view_scroll_up" );
......@@ -225,6 +224,12 @@ void PageView::pageSetup( const QValueVector<KPDFPage*> & pageSet, bool document
// invalidate layout
d->dirtyLayout = true;
// OSD to display pages
if ( documentChanged && !Settings::hideOSD() )
d->messageWindow->display(
i18n(" Loaded a %1 pages document." ).arg( pageSet.count() ),
PageViewMessage::Info, 4000 );
}
void PageView::pageSetCurrent( int pageNumber, const QRect & /*viewport*/ )
......@@ -942,7 +947,8 @@ void PageView::updateZoom( ZoomMode newZoomMode )
d->aZoomFitWidth->setChecked( false );
d->aZoomFitPage->setChecked( false );
d->aZoomFitText->setChecked( false );
d->messageWindow->display( i18n( "Select Zooming Area. Right-Click to zoom out." ), PageViewMessage::Info );
if ( !Settings::hideOSD() )
d->messageWindow->display( i18n( "Select Zooming Area. Right-Click to zoom out." ), PageViewMessage::Info );
return;
}
// if zoomMode is changing from ZoomRect, hide info popup
......
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