Moved AnnotationTools config option under the Reviews group

remotes/origin/epub-qtextdoc
Fabio D'Urso 13 years ago
parent 14703512b6
commit 6be4155a98
  1. 60
      conf/okular.kcfg

@ -33,6 +33,36 @@
<entry key="ReviewsSearchRegularExpression" type="Bool">
<default>false</default>
</entry>
<entry key="AnnotationTools" type="StringList">
<code>
QStringList annotationTools;
// load the default tool list from the 'xml tools definition' file
QFile infoFile( KStandardDirs::locate("data", "okular/tools.xml") );
if ( infoFile.exists() &amp;&amp; infoFile.open( QIODevice::ReadOnly ) )
{
QDomDocument doc;
if ( doc.setContent( &amp;infoFile ) )
{
QDomElement toolsDefinition = doc.elementsByTagName("annotatingTools").item( 0 ).toElement();
// create the annotationTools list from the XML dom tree
QDomNode toolDescription = toolsDefinition.firstChild();
while ( toolDescription.isElement() )
{
QDomElement toolElement = toolDescription.toElement();
if ( toolElement.tagName() == "tool" )
{
QDomDocument temp;
temp.appendChild( temp.importNode( toolElement, true) );
// add each &lt;tool&gt;...&lt;/tool&gt; as XML string
annotationTools &lt;&lt; temp.toString(-1);
}
toolDescription = toolDescription.nextSibling();
}
}
}
</code>
<default code="true">annotationTools</default>
</entry>
</group>
<group name="Zoom">
<entry key="ZoomMode" type="UInt" >
@ -237,35 +267,5 @@
</code>
<default code="true">userString</default>
</entry>
<entry key="AnnotationTools" type="StringList">
<code>
QStringList annotationTools;
// load the default tool list from the 'xml tools definition' file
QFile infoFile( KStandardDirs::locate("data", "okular/tools.xml") );
if ( infoFile.exists() &amp;&amp; infoFile.open( QIODevice::ReadOnly ) )
{
QDomDocument doc;
if ( doc.setContent( &amp;infoFile ) )
{
QDomElement toolsDefinition = doc.elementsByTagName("annotatingTools").item( 0 ).toElement();
// create the annotationTools list from the XML dom tree
QDomNode toolDescription = toolsDefinition.firstChild();
while ( toolDescription.isElement() )
{
QDomElement toolElement = toolDescription.toElement();
if ( toolElement.tagName() == "tool" )
{
QDomDocument temp;
temp.appendChild( temp.importNode( toolElement, true) );
// add each &lt;tool&gt;...&lt;/tool&gt; as XML string
annotationTools &lt;&lt; temp.toString(-1);
}
toolDescription = toolDescription.nextSibling();
}
}
}
</code>
<default code="true">annotationTools</default>
</entry>
</group>
</kcfg>

Loading…
Cancel
Save