Drop "kwin4_effect_" prefix for BuiltIn Effects
This removes all the hacks to add kwin4_effect_ to the name of the Effect and adjusts the desktop files of the effect configuration's parent component. Note: the scripted effects still start with kwin4_effect_ prefix. REVIEW: 117367
This commit is contained in:
parent
4a1bc2ec96
commit
7fcecc616c
55 changed files with 86 additions and 112 deletions
|
@ -65,7 +65,7 @@ void TestBuiltInEffectLoader::testHasEffect_data()
|
||||||
QTest::addColumn<bool>("expected");
|
QTest::addColumn<bool>("expected");
|
||||||
|
|
||||||
QTest::newRow("blur") << QStringLiteral("blur") << true;
|
QTest::newRow("blur") << QStringLiteral("blur") << true;
|
||||||
QTest::newRow("with kwin4_effect_ prefix") << QStringLiteral("kwin4_effect_blur") << true;
|
QTest::newRow("with kwin4_effect_ prefix") << QStringLiteral("kwin4_effect_blur") << false;
|
||||||
QTest::newRow("case sensitive") << QStringLiteral("BlUR") << true;
|
QTest::newRow("case sensitive") << QStringLiteral("BlUR") << true;
|
||||||
QTest::newRow("Contrast") << QStringLiteral("contrast") << true;
|
QTest::newRow("Contrast") << QStringLiteral("contrast") << true;
|
||||||
QTest::newRow("CoverSwitch") << QStringLiteral("coverswitch") << true;
|
QTest::newRow("CoverSwitch") << QStringLiteral("coverswitch") << true;
|
||||||
|
@ -318,7 +318,7 @@ void TestBuiltInEffectLoader::testLoadEffect_data()
|
||||||
// QTest::newRow("WindowGeometry") << QStringLiteral("windowgeometry") << true << xc;
|
// QTest::newRow("WindowGeometry") << QStringLiteral("windowgeometry") << true << xc;
|
||||||
QTest::newRow("WobblyWindows") << QStringLiteral("wobblywindows") << false << xc;
|
QTest::newRow("WobblyWindows") << QStringLiteral("wobblywindows") << false << xc;
|
||||||
QTest::newRow("WobblyWindows-GL") << QStringLiteral("wobblywindows") << true << oc;
|
QTest::newRow("WobblyWindows-GL") << QStringLiteral("wobblywindows") << true << oc;
|
||||||
QTest::newRow("Zoom") << QStringLiteral("kwin4_effect_zoom") << true << xc;
|
QTest::newRow("Zoom") << QStringLiteral("zoom") << true << xc;
|
||||||
QTest::newRow("Non Existing") << QStringLiteral("InvalidName") << false << xc;
|
QTest::newRow("Non Existing") << QStringLiteral("InvalidName") << false << xc;
|
||||||
QTest::newRow("Fade - Scripted") << QStringLiteral("fade") << false << xc;
|
QTest::newRow("Fade - Scripted") << QStringLiteral("fade") << false << xc;
|
||||||
QTest::newRow("Fade - Scripted + kwin4_effect") << QStringLiteral("kwin4_effect_fade") << false << xc;
|
QTest::newRow("Fade - Scripted + kwin4_effect") << QStringLiteral("kwin4_effect_fade") << false << xc;
|
||||||
|
@ -471,26 +471,23 @@ void TestBuiltInEffectLoader::testLoadAllEffects()
|
||||||
|
|
||||||
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
|
||||||
|
|
||||||
// TODO: remove once the KCM doesn't use this prefix
|
|
||||||
const QString kwin4 = QStringLiteral("kwin4_effect_");
|
|
||||||
|
|
||||||
// prepare the configuration to hard enable/disable the effects we want to load
|
// prepare the configuration to hard enable/disable the effects we want to load
|
||||||
KConfigGroup plugins = config->group("Plugins");
|
KConfigGroup plugins = config->group("Plugins");
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("dashboardEnabled"), false);
|
plugins.writeEntry(QStringLiteral("dashboardEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("desktopgridEnabled"), false);
|
plugins.writeEntry(QStringLiteral("desktopgridEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("highlightwindowEnabled"), false);
|
plugins.writeEntry(QStringLiteral("highlightwindowEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("kscreenEnabled"), false);
|
plugins.writeEntry(QStringLiteral("kscreenEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("logoutEnabled"), false);
|
plugins.writeEntry(QStringLiteral("logoutEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("minimizeanimationEnabled"), false);
|
plugins.writeEntry(QStringLiteral("minimizeanimationEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("presentwindowsEnabled"), false);
|
plugins.writeEntry(QStringLiteral("presentwindowsEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("screenedgeEnabled"), false);
|
plugins.writeEntry(QStringLiteral("screenedgeEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("screenshotEnabled"), false);
|
plugins.writeEntry(QStringLiteral("screenshotEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("slideEnabled"), false);
|
plugins.writeEntry(QStringLiteral("slideEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("slidingpopupsEnabled"), false);
|
plugins.writeEntry(QStringLiteral("slidingpopupsEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("startupfeedbackEnabled"), false);
|
plugins.writeEntry(QStringLiteral("startupfeedbackEnabled"), false);
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("zoomEnabled"), false);
|
plugins.writeEntry(QStringLiteral("zoomEnabled"), false);
|
||||||
// enable lookingglass as it's not supported
|
// enable lookingglass as it's not supported
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("lookingglassEnabled"), true);
|
plugins.writeEntry(QStringLiteral("lookingglassEnabled"), true);
|
||||||
plugins.sync();
|
plugins.sync();
|
||||||
|
|
||||||
loader.setConfig(config);
|
loader.setConfig(config);
|
||||||
|
@ -511,7 +508,7 @@ void TestBuiltInEffectLoader::testLoadAllEffects()
|
||||||
QVERIFY(!spy.wait(10));
|
QVERIFY(!spy.wait(10));
|
||||||
|
|
||||||
// now let's prepare a config which has one effect explicitly enabled
|
// now let's prepare a config which has one effect explicitly enabled
|
||||||
plugins.writeEntry(kwin4 + QStringLiteral("mouseclickEnabled"), true);
|
plugins.writeEntry(QStringLiteral("mouseclickEnabled"), true);
|
||||||
plugins.sync();
|
plugins.sync();
|
||||||
|
|
||||||
loader.queryAndLoadAll();
|
loader.queryAndLoadAll();
|
||||||
|
@ -528,7 +525,7 @@ void TestBuiltInEffectLoader::testLoadAllEffects()
|
||||||
spy.clear();
|
spy.clear();
|
||||||
|
|
||||||
// let's delete one of the default entries
|
// let's delete one of the default entries
|
||||||
plugins.deleteEntry(kwin4 + QStringLiteral("kscreenEnabled"));
|
plugins.deleteEntry(QStringLiteral("kscreenEnabled"));
|
||||||
plugins.sync();
|
plugins.sync();
|
||||||
|
|
||||||
QVERIFY(spy.isEmpty());
|
QVERIFY(spy.isEmpty());
|
||||||
|
|
|
@ -110,9 +110,7 @@ void BuiltInEffectLoader::queryAndLoadAll()
|
||||||
if (m_loadedEffects.contains(effect)) {
|
if (m_loadedEffects.contains(effect)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// as long as the KCM uses kwin4_effect_ we need to add it, TODO remove
|
const QString key = BuiltInEffects::nameForEffect(effect);
|
||||||
const QString key = QStringLiteral("kwin4_effect_") +
|
|
||||||
BuiltInEffects::nameForEffect(effect);
|
|
||||||
const LoadEffectFlags flags = readConfig(key, BuiltInEffects::enabledByDefault(effect));
|
const LoadEffectFlags flags = readConfig(key, BuiltInEffects::enabledByDefault(effect));
|
||||||
if (flags.testFlag(LoadEffectFlag::Load)) {
|
if (flags.testFlag(LoadEffectFlag::Load)) {
|
||||||
m_queue->enqueue(qMakePair(effect, flags));
|
m_queue->enqueue(qMakePair(effect, flags));
|
||||||
|
@ -175,12 +173,7 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
|
||||||
|
|
||||||
QString BuiltInEffectLoader::internalName(const QString& name) const
|
QString BuiltInEffectLoader::internalName(const QString& name) const
|
||||||
{
|
{
|
||||||
QString internalName = name.toLower();
|
return name.toLower();
|
||||||
// as long as the KCM uses kwin4_effect_ we need to add it, TODO remove
|
|
||||||
if (internalName.startsWith(QStringLiteral("kwin4_effect_"))) {
|
|
||||||
internalName = internalName.mid(13);
|
|
||||||
}
|
|
||||||
return internalName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QString s_nameProperty = QStringLiteral("X-KDE-PluginInfo-Name");
|
static const QString s_nameProperty = QStringLiteral("X-KDE-PluginInfo-Name");
|
||||||
|
|
|
@ -1484,7 +1484,7 @@ bool EffectsHandlerImpl::isScreenLocked() const
|
||||||
|
|
||||||
QString EffectsHandlerImpl::debug(const QString& name, const QString& parameter) const
|
QString EffectsHandlerImpl::debug(const QString& name, const QString& parameter) const
|
||||||
{
|
{
|
||||||
QString internalName = name.startsWith(QStringLiteral("kwin4_effect_")) ? name : QStringLiteral("kwin4_effect_") + name;
|
QString internalName = name.toLower();;
|
||||||
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
|
||||||
if ((*it).first == internalName) {
|
if ((*it).first == internalName) {
|
||||||
return it->second->debug(parameter);
|
return it->second->debug(parameter);
|
||||||
|
|
|
@ -52,7 +52,7 @@ void BlurEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_blur"));
|
interface.reconfigureEffect(QStringLiteral("blur"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_blur_config
|
X-KDE-Library=kwin_blur_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_blur
|
X-KDE-ParentComponents=blur
|
||||||
|
|
||||||
Name=Blur
|
Name=Blur
|
||||||
Name[uk]=Розмивання
|
Name[uk]=Розмивання
|
||||||
|
|
|
@ -57,7 +57,7 @@ void CoverSwitchEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_coverswitch"));
|
interface.reconfigureEffect(QStringLiteral("coverswitch"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_coverswitch_config
|
X-KDE-Library=kwin_coverswitch_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_coverswitch
|
X-KDE-ParentComponents=coverswitch
|
||||||
|
|
||||||
Name=Cover Switch
|
Name=Cover Switch
|
||||||
Name[uk]=Перемикач обкладинок
|
Name[uk]=Перемикач обкладинок
|
||||||
|
|
|
@ -94,7 +94,7 @@ void CubeEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_cube"));
|
interface.reconfigureEffect(QStringLiteral("cube"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CubeEffectConfig::capsSelectionChanged()
|
void CubeEffectConfig::capsSelectionChanged()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_cube_config
|
X-KDE-Library=kwin_cube_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_cube
|
X-KDE-ParentComponents=cube
|
||||||
|
|
||||||
Name=Desktop Cube
|
Name=Desktop Cube
|
||||||
Name[uk]=Куб стільниць
|
Name[uk]=Куб стільниць
|
||||||
|
|
|
@ -59,7 +59,7 @@ void CubeSlideEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_cubeslide"));
|
interface.reconfigureEffect(QStringLiteral("cubeslide"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_cubeslide_config
|
X-KDE-Library=kwin_cubeslide_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_cubeslide
|
X-KDE-ParentComponents=cubeslide
|
||||||
|
|
||||||
Name=Desktop Cube Animation
|
Name=Desktop Cube Animation
|
||||||
Name[uk]=Анімація куба стільниць
|
Name[uk]=Анімація куба стільниць
|
||||||
|
|
|
@ -53,7 +53,7 @@ void DashboardEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_dashboard"));
|
interface.reconfigureEffect(QStringLiteral("dashboard"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_dashboard_config
|
X-KDE-Library=kwin_dashboard_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_dashboard
|
X-KDE-ParentComponents=dashboard
|
||||||
|
|
||||||
Name=Dashboard
|
Name=Dashboard
|
||||||
Name[uk]=Панель приладів
|
Name[uk]=Панель приладів
|
||||||
|
|
|
@ -110,7 +110,7 @@ void DesktopGridEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_desktopgrid"));
|
interface.reconfigureEffect(QStringLiteral("desktopgrid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopGridEffectConfig::load()
|
void DesktopGridEffectConfig::load()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_desktopgrid_config
|
X-KDE-Library=kwin_desktopgrid_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_desktopgrid
|
X-KDE-ParentComponents=desktopgrid
|
||||||
|
|
||||||
Name=Desktop Grid
|
Name=Desktop Grid
|
||||||
Name[uk]=Таблиця стільниць
|
Name[uk]=Таблиця стільниць
|
||||||
|
|
|
@ -64,7 +64,7 @@ void DimInactiveEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_diminactive"));
|
interface.reconfigureEffect(QStringLiteral("diminactive"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_diminactive_config
|
X-KDE-Library=kwin_diminactive_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_diminactive
|
X-KDE-ParentComponents=diminactive
|
||||||
|
|
||||||
Name=Dim Inactive
|
Name=Dim Inactive
|
||||||
Name[uk]=Затемнення неактивних
|
Name[uk]=Затемнення неактивних
|
||||||
|
|
|
@ -85,7 +85,7 @@ void FlipSwitchEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_flipswitch"));
|
interface.reconfigureEffect(QStringLiteral("flipswitch"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_flipswitch_config
|
X-KDE-Library=kwin_flipswitch_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_flipswitch
|
X-KDE-ParentComponents=flipswitch
|
||||||
|
|
||||||
Name=Flip Switch
|
Name=Flip Switch
|
||||||
Name[uk]=Тасування карток
|
Name[uk]=Тасування карток
|
||||||
|
|
|
@ -51,7 +51,7 @@ void GlideEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_glide"));
|
interface.reconfigureEffect(QStringLiteral("glide"));
|
||||||
}
|
}
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
#include "glide_config.moc"
|
#include "glide_config.moc"
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_glide_config
|
X-KDE-Library=kwin_glide_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_glide
|
X-KDE-ParentComponents=glide
|
||||||
|
|
||||||
Name=Glide
|
Name=Glide
|
||||||
Name[uk]=Плин
|
Name[uk]=Плин
|
||||||
|
|
|
@ -90,7 +90,7 @@ void InvertEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_invert"));
|
interface.reconfigureEffect(QStringLiteral("invert"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InvertEffectConfig::defaults()
|
void InvertEffectConfig::defaults()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_invert_config
|
X-KDE-Library=kwin_invert_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_invert
|
X-KDE-ParentComponents=invert
|
||||||
|
|
||||||
Name=Invert
|
Name=Invert
|
||||||
Name[uk]=Інверсія
|
Name[uk]=Інверсія
|
||||||
|
|
|
@ -102,7 +102,7 @@ void LookingGlassEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_lookingglass"));
|
interface.reconfigureEffect(QStringLiteral("lookingglass"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LookingGlassEffectConfig::defaults()
|
void LookingGlassEffectConfig::defaults()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_lookingglass_config
|
X-KDE-Library=kwin_lookingglass_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_lookingglass
|
X-KDE-ParentComponents=lookingglass
|
||||||
|
|
||||||
Name=Looking Glass
|
Name=Looking Glass
|
||||||
Name[uk]=Збільшувальне скло
|
Name[uk]=Збільшувальне скло
|
||||||
|
|
|
@ -61,7 +61,7 @@ void MagicLampEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_magiclamp"));
|
interface.reconfigureEffect(QStringLiteral("magiclamp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_magiclamp_config
|
X-KDE-Library=kwin_magiclamp_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_magiclamp
|
X-KDE-ParentComponents=magiclamp
|
||||||
|
|
||||||
Name=Magic Lamp
|
Name=Magic Lamp
|
||||||
Name[uk]=Чарівна лампа
|
Name[uk]=Чарівна лампа
|
||||||
|
|
|
@ -103,7 +103,7 @@ void MagnifierEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_magnifier"));
|
interface.reconfigureEffect(QStringLiteral("magnifier"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MagnifierEffectConfig::defaults()
|
void MagnifierEffectConfig::defaults()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_magnifier_config
|
X-KDE-Library=kwin_magnifier_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_magnifier
|
X-KDE-ParentComponents=magnifier
|
||||||
|
|
||||||
Name=Magnifier
|
Name=Magnifier
|
||||||
Name[uk]=Лупа
|
Name[uk]=Лупа
|
||||||
|
|
|
@ -83,7 +83,7 @@ void MouseClickEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_mouseclick"));
|
interface.reconfigureEffect(QStringLiteral("mouseclick"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_mouseclick_config
|
X-KDE-Library=kwin_mouseclick_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_mouseclick
|
X-KDE-ParentComponents=mouseclick
|
||||||
|
|
||||||
Name=Mouse Click Animation
|
Name=Mouse Click Animation
|
||||||
Name[uk]=Анімація за клацанням миші
|
Name[uk]=Анімація за клацанням миші
|
||||||
|
|
|
@ -97,7 +97,7 @@ void MouseMarkEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_mousemark"));
|
interface.reconfigureEffect(QStringLiteral("mousemark"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_mousemark_config
|
X-KDE-Library=kwin_mousemark_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_mousemark
|
X-KDE-ParentComponents=mousemark
|
||||||
|
|
||||||
Name=Mouse Mark
|
Name=Mouse Mark
|
||||||
Name[uk]=Позначки мишкою
|
Name[uk]=Позначки мишкою
|
||||||
|
|
|
@ -101,7 +101,7 @@ void PresentWindowsEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_presentwindows"));
|
interface.reconfigureEffect(QStringLiteral("presentwindows"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresentWindowsEffectConfig::defaults()
|
void PresentWindowsEffectConfig::defaults()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_presentwindows_config
|
X-KDE-Library=kwin_presentwindows_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_presentwindows
|
X-KDE-ParentComponents=presentwindows
|
||||||
|
|
||||||
Name=Present Windows
|
Name=Present Windows
|
||||||
Name[uk]=Показ вікон
|
Name[uk]=Показ вікон
|
||||||
|
|
|
@ -60,7 +60,7 @@ void ResizeEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_resize"));
|
interface.reconfigureEffect(QStringLiteral("resize"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_resize_config
|
X-KDE-Library=kwin_resize_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_resize
|
X-KDE-ParentComponents=resize
|
||||||
|
|
||||||
Name=Resize Window
|
Name=Resize Window
|
||||||
Name[uk]=Зміна розмірів вікон
|
Name[uk]=Зміна розмірів вікон
|
||||||
|
|
|
@ -57,7 +57,7 @@ void ShowFpsEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_showfps"));
|
interface.reconfigureEffect(QStringLiteral("showfps"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_showfps_config
|
X-KDE-Library=kwin_showfps_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_showfps
|
X-KDE-ParentComponents=showfps
|
||||||
|
|
||||||
Name=Show FPS
|
Name=Show FPS
|
||||||
Name[uk]=Показ частоти кадрів
|
Name[uk]=Показ частоти кадрів
|
||||||
|
|
|
@ -89,7 +89,7 @@ void ThumbnailAsideEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_thumbnailaside"));
|
interface.reconfigureEffect(QStringLiteral("thumbnailaside"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_thumbnailaside_config
|
X-KDE-Library=kwin_thumbnailaside_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_thumbnailaside
|
X-KDE-ParentComponents=thumbnailaside
|
||||||
|
|
||||||
Name=Thumbnail Aside
|
Name=Thumbnail Aside
|
||||||
Name[uk]=Мініатюри збоку
|
Name[uk]=Мініатюри збоку
|
||||||
|
|
|
@ -102,7 +102,7 @@ void TrackMouseEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_trackmouse"));
|
interface.reconfigureEffect(QStringLiteral("trackmouse"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackMouseEffectConfig::defaults()
|
void TrackMouseEffectConfig::defaults()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_trackmouse_config
|
X-KDE-Library=kwin_trackmouse_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_trackmouse
|
X-KDE-ParentComponents=trackmouse
|
||||||
|
|
||||||
Name=Track Mouse
|
Name=Track Mouse
|
||||||
Name[uk]=Сліди мишки
|
Name[uk]=Сліди мишки
|
||||||
|
|
|
@ -79,7 +79,7 @@ void WindowGeometryConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_windowgeometry"));
|
interface.reconfigureEffect(QStringLiteral("windowgeometry"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowGeometryConfig::defaults()
|
void WindowGeometryConfig::defaults()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_windowgeometry_config
|
X-KDE-Library=kwin_windowgeometry_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_windowgeometry
|
X-KDE-ParentComponents=windowgeometry
|
||||||
|
|
||||||
Name=WindowGeometry
|
Name=WindowGeometry
|
||||||
Name[uk]=Розміри вікна
|
Name[uk]=Розміри вікна
|
||||||
|
|
|
@ -101,7 +101,7 @@ void WobblyWindowsEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_wobblywindows"));
|
interface.reconfigureEffect(QStringLiteral("wobblywindows"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WobblyWindowsEffectConfig::wobblinessChanged()
|
void WobblyWindowsEffectConfig::wobblinessChanged()
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_wobblywindows_config
|
X-KDE-Library=kwin_wobblywindows_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_wobblywindows
|
X-KDE-ParentComponents=wobblywindows
|
||||||
|
|
||||||
Name=Wobbly Windows
|
Name=Wobbly Windows
|
||||||
Name[uk]=Желейні вікна
|
Name[uk]=Желейні вікна
|
||||||
|
|
|
@ -139,7 +139,7 @@ void ZoomEffectConfig::save()
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
interface.reconfigureEffect(QStringLiteral("kwin4_effect_zoom"));
|
interface.reconfigureEffect(QStringLiteral("zoom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -3,7 +3,7 @@ Type=Service
|
||||||
X-KDE-ServiceTypes=KCModule
|
X-KDE-ServiceTypes=KCModule
|
||||||
|
|
||||||
X-KDE-Library=kwin_zoom_config
|
X-KDE-Library=kwin_zoom_config
|
||||||
X-KDE-ParentComponents=kwin4_effect_zoom
|
X-KDE-ParentComponents=zoom
|
||||||
|
|
||||||
Name=Zoom
|
Name=Zoom
|
||||||
Name[uk]=Масштабування
|
Name[uk]=Масштабування
|
||||||
|
|
|
@ -66,13 +66,6 @@ void EffectConfig::openConfig(const QString &serviceName, bool scripted)
|
||||||
kcm = KPluginTrader::createInstanceFromQuery<KCModule>(s_pluginDir, QString(),
|
kcm = KPluginTrader::createInstanceFromQuery<KCModule>(s_pluginDir, QString(),
|
||||||
QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(serviceName),
|
QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(serviceName),
|
||||||
&dialog);
|
&dialog);
|
||||||
if (!kcm) {
|
|
||||||
// HACK: try again with "kwin4_effect_"<serviceName>
|
|
||||||
const QString name = QStringLiteral("kwin4_effect_") + serviceName;
|
|
||||||
kcm = KPluginTrader::createInstanceFromQuery<KCModule>(s_pluginDir, QString(),
|
|
||||||
QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(name),
|
|
||||||
&dialog);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!kcm) {
|
if (!kcm) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -235,7 +235,7 @@ void EffectModel::loadEffects()
|
||||||
effect.category = translatedCategory(data.category);
|
effect.category = translatedCategory(data.category);
|
||||||
effect.serviceName = data.name;
|
effect.serviceName = data.name;
|
||||||
effect.enabledByDefault = data.enabled;
|
effect.enabledByDefault = data.enabled;
|
||||||
effect.effectStatus = kwinConfig.readEntry(QStringLiteral("kwin4_effect_") + effect.serviceName + "Enabled", effect.enabledByDefault);
|
effect.effectStatus = kwinConfig.readEntry(effect.serviceName + "Enabled", effect.enabledByDefault);
|
||||||
effect.video = data.video;
|
effect.video = data.video;
|
||||||
effect.supported = true;
|
effect.supported = true;
|
||||||
effect.exclusiveGroup = data.exclusiveCategory;
|
effect.exclusiveGroup = data.exclusiveCategory;
|
||||||
|
@ -243,7 +243,7 @@ void EffectModel::loadEffects()
|
||||||
effect.scripted = false;
|
effect.scripted = false;
|
||||||
|
|
||||||
auto it = std::find_if(configs.begin(), configs.end(), [data](const KPluginInfo &info) {
|
auto it = std::find_if(configs.begin(), configs.end(), [data](const KPluginInfo &info) {
|
||||||
return info.property(QStringLiteral("X-KDE-ParentComponents")).toString() == QStringLiteral("kwin4_effect_") + data.name;
|
return info.property(QStringLiteral("X-KDE-ParentComponents")).toString() == data.name;
|
||||||
});
|
});
|
||||||
effect.configurable = it != configs.end();
|
effect.configurable = it != configs.end();
|
||||||
|
|
||||||
|
@ -382,11 +382,6 @@ void EffectModel::syncConfig()
|
||||||
const EffectData &effect = *(it);
|
const EffectData &effect = *(it);
|
||||||
|
|
||||||
QString key = effect.serviceName + QStringLiteral("Enabled");
|
QString key = effect.serviceName + QStringLiteral("Enabled");
|
||||||
// HACK: workaround for built-in effects, needs to be removed once everything is transited to new names
|
|
||||||
if (!key.startsWith(QStringLiteral("kwin4_effect_"))) {
|
|
||||||
key = QStringLiteral("kwin4_effect_") + key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const bool effectConfigStatus = kwinConfig.readEntry(key, effect.enabledByDefault);
|
const bool effectConfigStatus = kwinConfig.readEntry(key, effect.enabledByDefault);
|
||||||
|
|
||||||
if (effect.effectStatus != effectConfigStatus) {
|
if (effect.effectStatus != effectConfigStatus) {
|
||||||
|
|
|
@ -266,7 +266,7 @@ void KWinDesktopConfig::load()
|
||||||
// Set current option to "none" if no plugin is activated.
|
// Set current option to "none" if no plugin is activated.
|
||||||
m_ui->effectComboBox->setCurrentIndex(0);
|
m_ui->effectComboBox->setCurrentIndex(0);
|
||||||
auto enableBuiltInEffect = [&effectconfig,this](BuiltInEffect effect, int index) {
|
auto enableBuiltInEffect = [&effectconfig,this](BuiltInEffect effect, int index) {
|
||||||
const QString key = QStringLiteral("kwin4_effect_") + BuiltInEffects::nameForEffect(effect) + QStringLiteral("Enabled");
|
const QString key = BuiltInEffects::nameForEffect(effect) + QStringLiteral("Enabled");
|
||||||
if (effectconfig.readEntry(key, BuiltInEffects::enabledByDefault(effect))) {
|
if (effectconfig.readEntry(key, BuiltInEffects::enabledByDefault(effect))) {
|
||||||
m_ui->effectComboBox->setCurrentIndex(index);
|
m_ui->effectComboBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
@ -339,26 +339,26 @@ void KWinDesktopConfig::save()
|
||||||
switch(desktopSwitcher) {
|
switch(desktopSwitcher) {
|
||||||
case 0:
|
case 0:
|
||||||
// no effect
|
// no effect
|
||||||
effectconfig.writeEntry("kwin4_effect_slideEnabled", false);
|
effectconfig.writeEntry("slideEnabled", false);
|
||||||
effectconfig.writeEntry("kwin4_effect_cubeslideEnabled", false);
|
effectconfig.writeEntry("cubeslideEnabled", false);
|
||||||
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", false);
|
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", false);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// slide
|
// slide
|
||||||
effectconfig.writeEntry("kwin4_effect_slideEnabled", true);
|
effectconfig.writeEntry("slideEnabled", true);
|
||||||
effectconfig.writeEntry("kwin4_effect_cubeslideEnabled", false);
|
effectconfig.writeEntry("cubeslideEnabled", false);
|
||||||
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", false);
|
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", false);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// cube
|
// cube
|
||||||
effectconfig.writeEntry("kwin4_effect_slideEnabled", false);
|
effectconfig.writeEntry("slideEnabled", false);
|
||||||
effectconfig.writeEntry("kwin4_effect_cubeslideEnabled", true);
|
effectconfig.writeEntry("cubeslideEnabled", true);
|
||||||
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", false);
|
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", false);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// fadedesktop
|
// fadedesktop
|
||||||
effectconfig.writeEntry("kwin4_effect_slideEnabled", false);
|
effectconfig.writeEntry("slideEnabled", false);
|
||||||
effectconfig.writeEntry("kwin4_effect_cubeslideEnabled", false);
|
effectconfig.writeEntry("cubeslideEnabled", false);
|
||||||
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", true);
|
effectconfig.writeEntry("kwin4_effect_fadedesktopEnabled", true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -584,8 +584,7 @@ void KWinDesktopConfig::slotConfigureEffectClicked()
|
||||||
QString effect;
|
QString effect;
|
||||||
switch(m_ui->effectComboBox->currentIndex()) {
|
switch(m_ui->effectComboBox->currentIndex()) {
|
||||||
case 2:
|
case 2:
|
||||||
// HACK: kwin4_effect_ needs to be removed
|
effect = BuiltInEffects::nameForEffect(BuiltInEffect::CubeSlide);
|
||||||
effect = QStringLiteral("kwin4_effect_") + BuiltInEffects::nameForEffect(BuiltInEffect::CubeSlide);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -585,7 +585,7 @@ void KMovingConfig::save(void)
|
||||||
cg.writeEntry(KWM_CNTR_SNAP_ZONE, getCenterSnapZone());
|
cg.writeEntry(KWM_CNTR_SNAP_ZONE, getCenterSnapZone());
|
||||||
cg.writeEntry("SnapOnlyWhenOverlapping", m_ui->OverlapSnap->isChecked());
|
cg.writeEntry("SnapOnlyWhenOverlapping", m_ui->OverlapSnap->isChecked());
|
||||||
|
|
||||||
KConfigGroup(config, "Plugins").writeEntry("kwin4_effect_windowgeometryEnabled", getGeometryTip());
|
KConfigGroup(config, "Plugins").writeEntry("windowgeometryEnabled", getGeometryTip());
|
||||||
|
|
||||||
if (standAlone) {
|
if (standAlone) {
|
||||||
config->sync();
|
config->sync();
|
||||||
|
|
|
@ -156,8 +156,7 @@ void KWinScreenEdgesConfig::sanitizeCooldown()
|
||||||
// Copied from kcmkwin/kwincompositing/main.cpp
|
// Copied from kcmkwin/kwincompositing/main.cpp
|
||||||
bool KWinScreenEdgesConfig::effectEnabled(const BuiltInEffect& effect, const KConfigGroup& cfg) const
|
bool KWinScreenEdgesConfig::effectEnabled(const BuiltInEffect& effect, const KConfigGroup& cfg) const
|
||||||
{
|
{
|
||||||
// HACK: remove kwin4_effect_
|
return cfg.readEntry(BuiltInEffects::nameForEffect(effect) + "Enabled", BuiltInEffects::enabledByDefault(effect));
|
||||||
return cfg.readEntry("kwin4_effect_" + BuiltInEffects::nameForEffect(effect) + "Enabled", BuiltInEffects::enabledByDefault(effect));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -313,11 +313,11 @@ void KWinTabBoxConfig::save()
|
||||||
// activate effects if not active
|
// activate effects if not active
|
||||||
KConfigGroup effectconfig(m_config, "Plugins");
|
KConfigGroup effectconfig(m_config, "Plugins");
|
||||||
if (coverSwitch || coverSwitchAlternative)
|
if (coverSwitch || coverSwitchAlternative)
|
||||||
effectconfig.writeEntry("kwin4_effect_coverswitchEnabled", true);
|
effectconfig.writeEntry("coverswitchEnabled", true);
|
||||||
if (flipSwitch || flipSwitchAlternative)
|
if (flipSwitch || flipSwitchAlternative)
|
||||||
effectconfig.writeEntry("kwin4_effect_flipswitchEnabled", true);
|
effectconfig.writeEntry("flipswitchEnabled", true);
|
||||||
if (highlightWindows)
|
if (highlightWindows)
|
||||||
effectconfig.writeEntry("kwin4_effect_highlightwindowEnabled", true);
|
effectconfig.writeEntry("highlightwindowEnabled", true);
|
||||||
effectconfig.sync();
|
effectconfig.sync();
|
||||||
KConfigGroup coverswitchconfig(m_config, "Effect-CoverSwitch");
|
KConfigGroup coverswitchconfig(m_config, "Effect-CoverSwitch");
|
||||||
coverswitchconfig.writeEntry("TabBox", coverSwitch);
|
coverswitchconfig.writeEntry("TabBox", coverSwitch);
|
||||||
|
@ -387,8 +387,7 @@ void KWinTabBoxConfig::defaults()
|
||||||
|
|
||||||
bool KWinTabBoxConfig::effectEnabled(const BuiltInEffect& effect, const KConfigGroup& cfg) const
|
bool KWinTabBoxConfig::effectEnabled(const BuiltInEffect& effect, const KConfigGroup& cfg) const
|
||||||
{
|
{
|
||||||
// HACK: remove kwin4_effect_
|
return cfg.readEntry(BuiltInEffects::nameForEffect(effect) + "Enabled", BuiltInEffects::enabledByDefault(effect));
|
||||||
return cfg.readEntry("kwin4_effect_" + BuiltInEffects::nameForEffect(effect) + "Enabled", BuiltInEffects::enabledByDefault(effect));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfig::updateUiFromConfig(KWinTabBoxConfigForm* ui, const KWin::TabBox::TabBoxConfig& config)
|
void KWinTabBoxConfig::updateUiFromConfig(KWinTabBoxConfigForm* ui, const KWin::TabBox::TabBoxConfig& config)
|
||||||
|
@ -488,8 +487,7 @@ void KWinTabBoxConfig::configureEffectClicked()
|
||||||
connect(buttonBox, SIGNAL(accepted()), configDialog, SLOT(accept()));
|
connect(buttonBox, SIGNAL(accepted()), configDialog, SLOT(accept()));
|
||||||
connect(buttonBox, SIGNAL(rejected()), configDialog, SLOT(reject()));
|
connect(buttonBox, SIGNAL(rejected()), configDialog, SLOT(reject()));
|
||||||
|
|
||||||
// HACK: kwin4_effect_ needs to be removed
|
const QString name = BuiltInEffects::nameForEffect(effect == CoverSwitch ? BuiltInEffect::CoverSwitch : BuiltInEffect::FlipSwitch);
|
||||||
const QString name = QStringLiteral("kwin4_effect_") + BuiltInEffects::nameForEffect(effect == CoverSwitch ? BuiltInEffect::CoverSwitch : BuiltInEffect::FlipSwitch);
|
|
||||||
|
|
||||||
KCModule *kcm = KPluginTrader::createInstanceFromQuery<KCModule>(QStringLiteral("kf5/kwin/effects/configs/"), QString(),
|
KCModule *kcm = KPluginTrader::createInstanceFromQuery<KCModule>(QStringLiteral("kf5/kwin/effects/configs/"), QString(),
|
||||||
QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(name),
|
QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(name),
|
||||||
|
|
Loading…
Reference in a new issue