From fb68e162b0c3d5c88ddf83477ade541957c0580f Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Mon, 12 Nov 2018 21:25:05 +0200 Subject: [PATCH] [effects] Move Fade, Glide, and Scale effect into exclusive group Summary: Fade, glide, and scale effect are mutually exclusive effects so they have to be put into an exclusive group in the desktop effects kcm. Test Plan: {F6418669} Reviewers: #kwin, #plasma, #vdg, ngraham, graesslin Reviewed By: #kwin, #plasma, #vdg, ngraham, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16858 --- effects/effect_builtins.cpp | 4 ++-- effects/fade/package/metadata.desktop | 3 ++- effects/scale/package/metadata.desktop | 3 ++- kcmkwin/kwincompositing/model.cpp | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/effects/effect_builtins.cpp b/effects/effect_builtins.cpp index 6306bece9d..b0e1ef6f86 100644 --- a/effects/effect_builtins.cpp +++ b/effects/effect_builtins.cpp @@ -267,8 +267,8 @@ EFFECT_FALLBACK QStringLiteral("glide"), i18ndc("kwin_effects", "Name of a KWin Effect", "Glide"), i18ndc("kwin_effects", "Comment describing the KWin Effect", "Glide windows as they appear or disappear"), - QStringLiteral("Appearance"), - QString(), + QStringLiteral("Window Open/Close Animation"), + QStringLiteral("toplevel-open-close-animation"), QUrl(), false, false, diff --git a/effects/fade/package/metadata.desktop b/effects/fade/package/metadata.desktop index 3368f09f07..223ef131e7 100644 --- a/effects/fade/package/metadata.desktop +++ b/effects/fade/package/metadata.desktop @@ -155,8 +155,9 @@ X-KDE-PluginInfo-Author=Philip Falkner, Martin Gräßlin X-KDE-PluginInfo-Email=philip.falkner@gmail.com, mgraesslin@kde.org X-KDE-PluginInfo-Name=kwin4_effect_fade X-KDE-PluginInfo-Version=0.2.0 -X-KDE-PluginInfo-Category=Appearance +X-KDE-PluginInfo-Category=Window Open/Close Animation X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-EnabledByDefault=true X-KDE-Ordering=60 +X-KWin-Exclusive-Category=toplevel-open-close-animation diff --git a/effects/scale/package/metadata.desktop b/effects/scale/package/metadata.desktop index a16d1d5947..ac0d8e39f0 100644 --- a/effects/scale/package/metadata.desktop +++ b/effects/scale/package/metadata.desktop @@ -50,7 +50,7 @@ X-KDE-PluginInfo-Author=Vlad Zagorodniy X-KDE-PluginInfo-Email=vladzzag@gmail.com X-KDE-PluginInfo-Name=kwin4_effect_scale X-KDE-PluginInfo-Version=1 -X-KDE-PluginInfo-Category=Appearance +X-KDE-PluginInfo-Category=Window Open/Close Animation X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-EnabledByDefault=false @@ -61,3 +61,4 @@ X-KDE-PluginKeyword=kwin4_effect_scale X-KDE-Library=kcm_kwin4_genericscripted X-KDE-ParentComponents=kwin4_effect_scale X-KWin-Config-TranslationDomain=kwin_effects +X-KWin-Exclusive-Category=toplevel-open-close-animation diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp index 9ce0873c9b..5d9afc9b35 100644 --- a/kcmkwin/kwincompositing/model.cpp +++ b/kcmkwin/kwincompositing/model.cpp @@ -62,7 +62,8 @@ static QString translatedCategory(const QString &category) QStringLiteral("Show Desktop Animation"), QStringLiteral("Tools"), QStringLiteral("Virtual Desktop Switching Animation"), - QStringLiteral("Window Management") + QStringLiteral("Window Management"), + QStringLiteral("Window Open/Close Animation") }; static const QVector translatedCategories = { @@ -73,7 +74,8 @@ static QString translatedCategory(const QString &category) i18nc("Category of Desktop Effects, used as section header", "Show Desktop Animation"), i18nc("Category of Desktop Effects, used as section header", "Tools"), i18nc("Category of Desktop Effects, used as section header", "Virtual Desktop Switching Animation"), - i18nc("Category of Desktop Effects, used as section header", "Window Management") + i18nc("Category of Desktop Effects, used as section header", "Window Management"), + i18nc("Category of Desktop Effects, used as section header", "Window Open/Close Animation") }; const int index = knownCategories.indexOf(category); if (index == -1) {