Fixing javascript animation mapping.
svn path=/trunk/KDE/kdelibs/; revision=1123281
This commit is contained in:
parent
f0ea5031fb
commit
e6e20afd70
@ -186,7 +186,7 @@ Plasma::Animation *Animator::create(const QString &anim, QObject *parent)
|
|||||||
if (!AnimationScriptEngine::isAnimationRegistered(anim)) {
|
if (!AnimationScriptEngine::isAnimationRegistered(anim)) {
|
||||||
const QString path = Theme::defaultTheme()->animationPath(anim);
|
const QString path = Theme::defaultTheme()->animationPath(anim);
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
kError() << "failed to find script file for animation" << anim;
|
kError() << "************ failed to find script file for animation" << anim;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
theme.cpp
13
theme.cpp
@ -397,12 +397,21 @@ void ThemePrivate::processAnimationSettings(const QString &theme, KConfigBase *m
|
|||||||
const QString animDir = "desktoptheme/" + theme + "/animations/";
|
const QString animDir = "desktoptheme/" + theme + "/animations/";
|
||||||
foreach (const QString &path, cg.keyList()) {
|
foreach (const QString &path, cg.keyList()) {
|
||||||
QStringList anims = cg.readEntry(path, QStringList());
|
QStringList anims = cg.readEntry(path, QStringList());
|
||||||
|
|
||||||
foreach (const QString &anim, anims) {
|
foreach (const QString &anim, anims) {
|
||||||
if (!animationMapping.contains(anim)) {
|
if (!animationMapping.contains(anim)) {
|
||||||
animationMapping.insert(animDir + anim, path);
|
kDebug() << "Registering animation. animDir: " << animDir
|
||||||
|
<< "\tanim: " << anim
|
||||||
|
<< "\tpath: " << path << "\t*******\n\n\n";
|
||||||
|
//key: desktoptheme/default/animations/+ all.js
|
||||||
|
//value: ZoomAnimation
|
||||||
|
animationMapping.insert(anim, animDir + path);
|
||||||
|
} else {
|
||||||
|
kDebug() << "************Animation already registered!\n\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings)
|
void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings)
|
||||||
@ -575,6 +584,8 @@ QString Theme::animationPath(const QString &name) const
|
|||||||
{
|
{
|
||||||
const QString path = d->animationMapping.value(name);
|
const QString path = d->animationMapping.value(name);
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
|
|
||||||
|
kError() << "****** FAILED TO FIND IN MAPPING!";
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user