r18815 by jghali - #12066: Duplicate entries in the expanded German version of the "Save as Template" dialog

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 15 21:05:05 UTC 2014


Author: jghali
Date: Sat Feb 15 21:05:05 2014
New Revision: 18815

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18815
Log:
#12066: Duplicate entries in the expanded German version of the "Save as Template" dialog

Modified:
    branches/Version14x/Scribus/resources/templates/template.de.xml
    branches/Version14x/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp

Modified: branches/Version14x/Scribus/resources/templates/template.de.xml
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18815&path=/branches/Version14x/Scribus/resources/templates/template.de.xml
==============================================================================
--- branches/Version14x/Scribus/resources/templates/template.de.xml (original)
+++ branches/Version14x/Scribus/resources/templates/template.de.xml Sat Feb 15 21:05:05 2014
@@ -56,7 +56,7 @@
 		<author>Petr Vaněk</author>
 		<email>petr at yarpen.cz</email>
 	</template>
-	<template category="PDF Präsentationen">
+	<template category="PDF-Präsentationen">
 		<name>Blau_Orange</name>
 		<file>pres_backgr_1/blue_orange_vector.sla.gz</file>
 		<tnail>pres_backgr_1/blue_orange_vectortn.png</tnail>
@@ -70,7 +70,7 @@
 		<author>Dhananjay Garg</author>
 		<email></email>
 	</template>
-	<template category="PDF Präsentationen">
+	<template category="PDF-Präsentationen">
 		<name>Flutlicht</name>
 		<file>pres_backgr_2/flood_light.sla.gz</file>
 		<tnail>pres_backgr_2/flood_lighttn.png</tnail>
@@ -84,7 +84,7 @@
 		<author>Dhananjay Garg</author>
 		<email></email>
 	</template>
-	<template category="PDF Präsentationen">
+	<template category="PDF-Präsentationen">
 		<name>Glaswellen</name>
 		<file>pres_backgr_3/glass_ripples.sla.gz</file>
 		<tnail>pres_backgr_3/glass_ripplestn.png</tnail>
@@ -98,7 +98,7 @@
 		<author>Dhananjay Garg</author>
 		<email></email>
 	</template>
-	<template category="PDF Präsentationen">
+	<template category="PDF-Präsentationen">
 		<name>Bokeh</name>
 		<file>pres_backgr_4/bokeh.sla.gz</file>
 		<tnail>pres_backgr_4/Bokehtn.png</tnail>

Modified: branches/Version14x/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18815&path=/branches/Version14x/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp Sat Feb 15 21:05:05 2014
@@ -179,13 +179,11 @@
 	addCategories(scribusHome + "/templates");
 	addCategories(scribusShare); 
 	QString userTemplateDir(PrefsManager::instance()->appPrefs.documentTemplatesDir);
-	if ((!userTemplateDir.isNull()) && (!userTemplateDir.isEmpty()))
+	if (!userTemplateDir.isEmpty())
 		addCategories(userTemplateDir);
 
-	QStringList list;
-	QMap<QString, QString>::ConstIterator it;
-	for (it = cats.constBegin(); it != cats.constEnd(); ++it)
-		list.append(it.value());
+	QStringList list = cats.values();
+	list.removeDuplicates();
 	list.sort();
 	catsCombo->addItem("");
 	catsCombo->addItems(list);




More information about the scribus-commit mailing list