Commit 92f4ade0 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Mark items with name in toolsQuick as default

This way we know we must translate their names when showing it to the
parent 81344f8a
Pipeline #63812 passed with stage
in 26 minutes and 6 seconds
......@@ -2,4 +2,6 @@
$EXTRACTRC *.rc */*.rc >> rc.cpp || exit 11
$EXTRACTRC $(find conf/ -name "*.ui") $(find core/ -name "*.ui") $(find part/ -name "*.ui") $(ls . | grep -E '\.ui') >> rc.cpp || exit 12
$EXTRACTATTR --attr=tool,name part/data/drawingtools.xml >> rc.cpp || exit 13
$EXTRACTATTR --attr=tool,name part/data/tools.xml >> rc.cpp || exit 14
$EXTRACTATTR --attr=tool,name part/data/toolsQuick.xml >> rc.cpp || exit 15
$XGETTEXT $(find conf/ -name "*.cpp" -o -name "*.h") $(find core/ -name "*.cpp" -o -name "*.h") $(find part/ -name "*.cpp" -o -name "*.h") $(find shell/ -name "*.cpp" -o -name "*.h") $(ls . | grep -E '\.cpp$') $(ls . | grep -E '\.h$') -o $podir/okular.pot
......@@ -348,6 +348,9 @@ void AnnotationActionHandlerPrivate::populateQuickAnnotations()
QDomElement favToolElement = annotator->quickTool(favToolId);
while (!favToolElement.isNull()) {
QString itemText = favToolElement.attribute(QStringLiteral("name"));
if (favToolElement.attribute(QStringLiteral("default"), QStringLiteral("false")) == QLatin1String("true")) {
itemText = i18n(itemText.toLatin1().constData());
if (itemText.isEmpty()) {
itemText = PageViewAnnotator::defaultToolName(favToolElement);
......@@ -6,12 +6,12 @@ Tool
[id] {int = unique id identifying the quick tool}
<tool id="1" type="highlight" name="Yellow Highlighter">
<tool id="1" type="highlight" name="Yellow Highlighter" default="true">
<engine type="TextSelector" color="#ffff00">
<annotation type="Highlight" color="#ffffff00"/>
<tool id="2" type="highlight" name="Green Highlighter">
<tool id="2" type="highlight" name="Green Highlighter" default="true">
<engine type="TextSelector" color="#00ff00">
<annotation type="Highlight" color="#ff00ff00"/>
......@@ -21,7 +21,7 @@ Tool
<annotation type="Underline" color="#ffff0000"/>
<tool id="4" type="typewriter" name="Insert Text">
<tool id="4" type="typewriter" name="Insert Text" default="true">
<engine type="PickPoint" block="true">
<annotation type="Typewriter" color="#00ffffff" textColor="#000000" width="0"/>
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