Add GUI check box control whether to retainn kpdf metadata.

This resolves bug report 1215.
pull/1/head
Darrell Anderson 12 years ago
parent d2151830b9
commit 194cf519e4

@ -45,6 +45,11 @@
<label>Watch File</label> <label>Watch File</label>
<whatsthis>If this is on, then the file will be reloaded whenever it changes on disk</whatsthis> <whatsthis>If this is on, then the file will be reloaded whenever it changes on disk</whatsthis>
<default>false</default> <default>false</default>
</entry>
<entry name="RetainDocumentData" type="Bool">
<label>Retain document viewing data</label>
<whatsthis>If this is on, then document viewing options are retained</whatsthis>
<default>true</default>
</entry> </entry>
</group> </group>
<group name="Ghostscript"> <group name="Ghostscript">

@ -92,6 +92,14 @@
<string>&amp;Watch file</string> <string>&amp;Watch file</string>
</property> </property>
</widget> </widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RetainDocumentData</cstring>
</property>
<property name="text">
<string>&amp;Retain document viewing data</string>
</property>
</widget>
</vbox> </vbox>
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">

@ -56,6 +56,9 @@
<entry key="ObeyDRM" type="Bool" > <entry key="ObeyDRM" type="Bool" >
<default>true</default> <default>true</default>
</entry> </entry>
<entry key="RetainDocumentData" type="Bool" >
<default>true</default>
</entry>
</group> </group>
<group name="MainView" > <group name="MainView" >
<entry key="ShowLeftPanel" type="Bool" > <entry key="ShowLeftPanel" type="Bool" >

@ -1404,6 +1404,8 @@ void KPDFDocument::saveDocumentInfo() const
if ( d->docFileName.isNull() ) if ( d->docFileName.isNull() )
return; return;
if ( KpdfSettings::retainDocumentData() )
{
TQFile infoFile( d->xmlFileName ); TQFile infoFile( d->xmlFileName );
if (infoFile.open( IO_WriteOnly | IO_Truncate) ) if (infoFile.open( IO_WriteOnly | IO_Truncate) )
{ {
@ -1464,6 +1466,7 @@ void KPDFDocument::saveDocumentInfo() const
} }
infoFile.close(); infoFile.close();
} }
}
void KPDFDocument::slotTimedMemoryCheck() void KPDFDocument::slotTimedMemoryCheck()
{ {

@ -11,6 +11,9 @@
<entry key="WatchFile" type="Bool"> <entry key="WatchFile" type="Bool">
<default>true</default> <default>true</default>
</entry> </entry>
<entry key="RetainDocumentData" type="Bool">
<default>true</default>
</entry>
<entry key="Zoom" type="Double"> <entry key="Zoom" type="Double">
<default>1.0</default> <default>1.0</default>
</entry> </entry>

Loading…
Cancel
Save