Make effect groups translatable

svn path=/trunk/kdenlive/; revision=4329
parent 07f908f3
......@@ -14,7 +14,8 @@ else
kde_inc=""
fi
$EXTRACTRC --tag=name --tag=description --tag=label effects/*.xml >> rc.cpp || exit 11
$EXTRACTRC --tag=name --tag=description --tag=label effects/*.xml data/*.rc >> rc.cpp || exit 11
$EXTRACTRC `find $kdenlive_subdirs -name \*.ui` >> rc.cpp || exit 11
$EXTRACTRC `find $kdenlive_subdirs -name \*.rc` >> rc.cpp || exit 11
......
install(FILES banner.png timeline_nothumbs.png timeline_athumbs.png timeline_vthumbs.png timeline_avthumbs.png transition.png metadata.properties blacklisted_effects.txt blacklisted_transitions.txt DESTINATION ${DATA_INSTALL_DIR}/kdenlive )
install( FILES kdenliveeffectscategoryrc DESTINATION ${CONFIG_INSTALL_DIR} )
install( FILES kdenliveeffectscategory.rc DESTINATION ${CONFIG_INSTALL_DIR} )
install (FILES kdenlive.xpm DESTINATION share/pixmaps)
install (FILES kdenlive.menu DESTINATION share/menu RENAME kdenlive)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<data name="effects" version="0">
<group list="brightness,gamma,frei0r.balanc0r,frei0r.brightness,frei0r.levels,frei0r.three_point_balance,frei0r.curves">
<text>Colour correction</text>
</group>
<group list="invert,sepia,tcolor,greyscale,frei0r.B,frei0r.G,frei0r.R,frei0r.contrast0r,frei0r.saturat0r,frei0r.tint0r,frei0r.primaries,frei0r.rgbparade,chroma_hold,frei0r.hueshift0r">
<text>Colour</text>
</group>
<group list="frei0r.letterb0xed,pan_zoom,frei0r.scale0tilt,crop">
<text>Crop &amp; scale</text>
</group>
<group list="volume">
<text>Audio correction</text>
</group>
<group list="fade_from_black,fade_to_black,fadein,fadeout">
<text>Fade</text>
</group>
<group list="charcoal,oldfilm,dust,lines,grain,vignette,burningtv">
<text>Fun</text>
</group>
<group list="boxblur,obscure,autotrack_rectangle,frei0r.squareblur">
<text>Blur &amp; hide</text>
</group>
<group list="speed,freeze">
<text>Motion</text>
</group>
<group list="wave,mirror,frei0r.distort0r,frei0r.lenscorrection">
<text>Distort</text>
</group>
</data>
......@@ -23,6 +23,7 @@
#include "mainwindow.h"
#include "KDebug"
#include "KStandardDirs"
#include "QApplication"
#include "QMouseEvent"
......@@ -68,20 +69,21 @@ void EffectsListWidget::initList()
KIcon customIcon("kdenlive-custom-effect");
KIcon folderIcon("folder");
KSharedConfigPtr config = KSharedConfig::openConfig("kdenliveeffectscategoryrc");
KConfigGroup transConfig(config, "Category");
// read the entries
QMap< QString, QString > profiles = transConfig.entryMap();
QMapIterator<QString, QString> i(profiles);
QString effectCategory = KStandardDirs::locate("config", "kdenliveeffectscategory.rc");
QDomDocument doc;
QFile file(effectCategory);
doc.setContent(&file, false);
file.close();
QList <QTreeWidgetItem *> folders;
while (i.hasNext()) {
i.next();
item = new QTreeWidgetItem((QTreeWidget*)0, QStringList(i18n(i.key().toUtf8().data())));
QDomNodeList groups = doc.documentElement().elementsByTagName("group");
for (int i = 0; i < groups.count(); i++) {
item = new QTreeWidgetItem((QTreeWidget*)0, QStringList(groups.at(i).firstChild().firstChild().nodeValue()));
item->setIcon(0, folderIcon);
item->setData(0, TypeRole, QString::number((int) EFFECT_FOLDER));
item->setData(0, IdRole, i.value());
item->setData(0, IdRole, groups.at(i).toElement().attribute("list"));
folders.append(item);
}
QTreeWidgetItem *misc = new QTreeWidgetItem((QTreeWidget*)0, QStringList(i18n("Misc")));
misc->setIcon(0, folderIcon);
misc->setData(0, TypeRole, QString::number((int) EFFECT_FOLDER));
......
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