diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -701,6 +701,8 @@ add_subdirectory(doc) endif() +add_subdirectory(kconf_update) + feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) include(CMakePackageConfigHelpers) diff --git a/autotests/integration/effects/slidingpopups_test.cpp b/autotests/integration/effects/slidingpopups_test.cpp --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -120,8 +120,6 @@ { QTest::addColumn("effectsToLoad"); - QTest::newRow("scale, slide") << QStringList{QStringLiteral("kwin4_effect_scalein"), QStringLiteral("slidingpopups")}; - QTest::newRow("slide, scale") << QStringList{QStringLiteral("slidingpopups"), QStringLiteral("kwin4_effect_scalein")}; QTest::newRow("fade, slide") << QStringList{QStringLiteral("kwin4_effect_fade"), QStringLiteral("slidingpopups")}; QTest::newRow("slide, fade") << QStringList{QStringLiteral("slidingpopups"), QStringLiteral("kwin4_effect_fade")}; @@ -257,8 +255,6 @@ { QTest::addColumn("effectsToLoad"); - QTest::newRow("scale, slide") << QStringList{QStringLiteral("kwin4_effect_scalein"), QStringLiteral("slidingpopups")}; - QTest::newRow("slide, scale") << QStringList{QStringLiteral("slidingpopups"), QStringLiteral("kwin4_effect_scalein")}; QTest::newRow("fade, slide") << QStringList{QStringLiteral("kwin4_effect_fade"), QStringLiteral("slidingpopups")}; QTest::newRow("slide, fade") << QStringList{QStringLiteral("slidingpopups"), QStringLiteral("kwin4_effect_fade")}; diff --git a/autotests/test_plugin_effectloader.cpp b/autotests/test_plugin_effectloader.cpp --- a/autotests/test_plugin_effectloader.cpp +++ b/autotests/test_plugin_effectloader.cpp @@ -119,7 +119,6 @@ QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << false; QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << false; QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << false; - QTest::newRow("ScaleIn") << QStringLiteral("kwin4_effect_scalein") << false; QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << false; // and the fake effects we use here QTest::newRow("fakeeffectplugin") << QStringLiteral("fakeeffectplugin") << true; diff --git a/autotests/test_scripted_effectloader.cpp b/autotests/test_scripted_effectloader.cpp --- a/autotests/test_scripted_effectloader.cpp +++ b/autotests/test_scripted_effectloader.cpp @@ -151,7 +151,6 @@ QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << true; QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << true; QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << true; - QTest::newRow("ScaleIn") << QStringLiteral("kwin4_effect_scalein") << true; QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << true; } @@ -183,7 +182,6 @@ << QStringLiteral("kwin4_effect_login") << QStringLiteral("kwin4_effect_logout") << QStringLiteral("kwin4_effect_maximize") - << QStringLiteral("kwin4_effect_scalein") << QStringLiteral("kwin4_effect_translucency"); KWin::ScriptedEffectLoader loader; @@ -210,7 +208,6 @@ QTest::newRow("Login") << QStringLiteral("kwin4_effect_login") << true; QTest::newRow("Logout") << QStringLiteral("kwin4_effect_logout") << true; QTest::newRow("Maximize") << QStringLiteral("kwin4_effect_maximize") << true; - QTest::newRow("ScaleIn") << QStringLiteral("kwin4_effect_scalein") << true; QTest::newRow("Translucency") << QStringLiteral("kwin4_effect_translucency") << true; } @@ -275,15 +272,15 @@ const KWin::LoadEffectFlags dontLoadFlags = KWin::LoadEffectFlags(); // enabled by default - QTest::newRow("Fade") << QStringLiteral("kwin4_effect_fade") << true << checkDefault; + QTest::newRow("Fade") << QStringLiteral("kwin4_effect_fade") << true << checkDefault; // not enabled by default - QTest::newRow("Scalein") << QStringLiteral("kwin4_effect_scalein") << true << checkDefault; + QTest::newRow("EyeOnScreen") << QStringLiteral("kwin4_effect_eyeonscreen") << true << checkDefault; // Force an Effect which will load - QTest::newRow("Scalein-Force") << QStringLiteral("kwin4_effect_scalein") << true << forceFlags; + QTest::newRow("EyeOnScreen-Force") << QStringLiteral("kwin4_effect_eyeonscreen") << true << forceFlags; // Enforce no load of effect which is enabled by default - QTest::newRow("Fade-DontLoad") << QStringLiteral("kwin4_effect_fade") << false << dontLoadFlags; + QTest::newRow("Fade-DontLoad") << QStringLiteral("kwin4_effect_fade") << false << dontLoadFlags; // Enforce no load of effect which is not enabled by default, but enforced - QTest::newRow("Scalein-DontLoad") << QStringLiteral("kwin4_effect_scalein") << false << dontLoadFlags; + QTest::newRow("EyeOnScreen-DontLoad") << QStringLiteral("kwin4_effect_eyeonscreen") << false << dontLoadFlags; } void TestScriptedEffectLoader::testLoadScriptedEffect() @@ -363,7 +360,6 @@ plugins.writeEntry(kwin4 + QStringLiteral("logoutEnabled"), false); plugins.writeEntry(kwin4 + QStringLiteral("maximizeEnabled"), false); plugins.writeEntry(kwin4 + QStringLiteral("minimizeanimationEnabled"), false); - plugins.writeEntry(kwin4 + QStringLiteral("scaleinEnabled"), false); plugins.writeEntry(kwin4 + QStringLiteral("translucencyEnabled"), false); plugins.writeEntry(kwin4 + QStringLiteral("eyeonscreenEnabled"), false); plugins.writeEntry(kwin4 + QStringLiteral("windowapertureEnabled"), false); @@ -388,7 +384,7 @@ QVERIFY(!spy.wait(100)); // now let's prepare a config which has one effect explicitly enabled - plugins.writeEntry(kwin4 + QStringLiteral("scaleinEnabled"), true); + plugins.writeEntry(kwin4 + QStringLiteral("eyeonscreenEnabled"), true); plugins.sync(); loader.queryAndLoadAll(); @@ -401,7 +397,7 @@ // if we caught a signal it should have the effect name we passed in QList arguments = spy.takeFirst(); QCOMPARE(arguments.count(), 2); - QCOMPARE(arguments.at(1).toString(), kwin4 + QStringLiteral("scalein")); + QCOMPARE(arguments.at(1).toString(), kwin4 + QStringLiteral("eyeonscreen")); spy.clear(); // let's delete one of the default entries @@ -419,8 +415,8 @@ loadedEffects << list.at(1).toString(); } qSort(loadedEffects); - QCOMPARE(loadedEffects.at(0), kwin4 + QStringLiteral("fade")); - QCOMPARE(loadedEffects.at(1), kwin4 + QStringLiteral("scalein")); + QCOMPARE(loadedEffects.at(0), kwin4 + QStringLiteral("eyeonscreen")); + QCOMPARE(loadedEffects.at(1), kwin4 + QStringLiteral("fade")); } void TestScriptedEffectLoader::testCancelLoadAllEffects() @@ -433,7 +429,7 @@ KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); const QString kwin4 = QStringLiteral("kwin4_effect_"); KConfigGroup plugins = config->group("Plugins"); - plugins.writeEntry(kwin4 + QStringLiteral("scaleinEnabled"), true); + plugins.writeEntry(kwin4 + QStringLiteral("eyeonscreenEnabled"), true); plugins.sync(); loader.setConfig(config); diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -141,7 +141,6 @@ add_subdirectory( logout ) add_subdirectory( maximize ) add_subdirectory( morphingpopups ) -add_subdirectory( scalein ) add_subdirectory( translucency ) add_subdirectory( windowaperture ) diff --git a/effects/scalein/CMakeLists.txt b/effects/scalein/CMakeLists.txt deleted file mode 100644 --- a/effects/scalein/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory( package ) diff --git a/effects/scalein/package/CMakeLists.txt b/effects/scalein/package/CMakeLists.txt deleted file mode 100644 --- a/effects/scalein/package/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -install(DIRECTORY contents DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_scalein) -install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_scalein) - -install(FILES metadata.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} - RENAME kwin4_effect_scalein.desktop) diff --git a/effects/scalein/package/contents/code/main.js b/effects/scalein/package/contents/code/main.js deleted file mode 100644 --- a/effects/scalein/package/contents/code/main.js +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************** - KWin - the KDE window manager - This file is part of the KDE project. - - Copyright (C) 2013 Kai Uwe Broulik - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*********************************************************************/ -/*global effect, effects, animate, animationTime, Effect, QEasingCurve */ -var scaleInEffect = { - duration: animationTime(150), - loadConfig: function () { - "use strict"; - scaleInEffect.duration = animationTime(150); - }, - isScaleWindow: function (window) { - "use strict"; - if (window.popupMenu || window.specialWindow || window.utility || window.minimized || - effect.isGrabbed(window, Effect.WindowAddedGrabRole)) { - return false; - } - return true; - }, - scaleIn: function (window) { - "use strict"; - window.scaleInWindowTypeAnimation = animate({ - window: window, - duration: scaleInEffect.duration, - curve: QEasingCurve.InOutQuad, - animations: [{ - type: Effect.Opacity, - from: 0.0, - to: 1.0 - }, { - type: Effect.Scale, - from: 0.75, - to: 1.0 - }] - }); - }, - added: function (window) { - "use strict"; - if (!scaleInEffect.isScaleWindow(window)) { - return; - } - scaleInEffect.scaleIn(window); - }, - dataChanged: function (window, role) { - "use strict"; - if (role == Effect.WindowAddedGrabRole) { - if (effect.isGrabbed(window, Effect.WindowAddedGrabRole)) { - if (window.scaleInWindowTypeAnimation !== undefined) { - cancel(window.scaleInWindowTypeAnimation); - window.scaleInWindowTypeAnimation = undefined; - } - } - } - }, - init: function () { - "use strict"; - effect.configChanged.connect(scaleInEffect.loadConfig); - effects.windowAdded.connect(scaleInEffect.added); - effects.windowDataChanged.connect(scaleInEffect.dataChanged); - } -}; -scaleInEffect.init(); diff --git a/effects/scalein/package/metadata.desktop b/effects/scalein/package/metadata.desktop deleted file mode 100644 --- a/effects/scalein/package/metadata.desktop +++ /dev/null @@ -1,163 +0,0 @@ -[Desktop Entry] -Name=Scale In -Name[af]=Rek-verskyn -Name[ar]=تحجيم النوافذ -Name[bg]=Увеличаване -Name[bs]=Uvećana razmjera -Name[ca]=Escalat -Name[ca@valencia]=Escalat -Name[cs]=Zvětšení -Name[csb]=Skalowanié -Name[da]=Skalér ind -Name[de]=Hineinzoomen -Name[el]=Εστίαση -Name[en_GB]=Scale In -Name[eo]=Enskali -Name[es]=Escalar -Name[et]=Skaleerimine -Name[eu]=Eskalatu -Name[fa]=مقیاس در -Name[fi]=Skaalaus -Name[fr]=Gradation -Name[fy]=Ynskale -Name[ga]=Scálaigh Isteach -Name[gl]=Ampliar -Name[gu]=અંદર આવવું -Name[he]=התקרבות -Name[hi]=स्केल इन -Name[hne]=स्केल इन -Name[hr]=Skaliranje -Name[hu]=Felbukkanás -Name[ia]=Scala intra -Name[id]=Skala Masuk -Name[is]=Kvarða niður -Name[it]=Espandi -Name[ja]=スケールイン -Name[kk]=Масштабтау -Name[km]=ធ្វើ​មាត្រដ្ឋាន​ក្នុង -Name[kn]=ಸ್ಕೇಲ್ ಇನ್ -Name[ko]=확대 -Name[lt]=Išdidėjimas -Name[lv]=Mērogot iekšā -Name[mai]=स्केल इन -Name[mk]=Зголемување -Name[ml]=ആനുപാതികമാക്കുക -Name[mr]=लहान मोठे करा -Name[nb]=Skaler inn -Name[nds]=Inpassen -Name[ne]=भित्री मापन गर्नुहोस् -Name[nl]=Inschalen -Name[nn]=Skaler inn -Name[pa]=ਸਕੇਲ ਇਨ -Name[pl]=Skalowanie -Name[pt]=Escala -Name[pt_BR]=Dimensionar -Name[ro]=Scalează interior -Name[ru]=Анимация появления окна -Name[se]=Skálere sisa -Name[si]=ඇතුළට ප්‍රමාණිත කරන්න -Name[sk]=Škálovať -Name[sl]=Animirano pojavljanje -Name[sr]=Увећана размера -Name[sr@ijekavian]=Увећана размјера -Name[sr@ijekavianlatin]=Uvećana razmjera -Name[sr@latin]=Uvećana razmera -Name[sv]=Skala in -Name[ta]= காலியன் -Name[te]=స్కేల్ ఇన్ -Name[tg]=Масштабирование (увеличение) -Name[th]=ปรับขนาดขึ้น -Name[tr]=Açılan Pencereleri Canlandır -Name[ug]=يېقىنلاشتۇر -Name[uk]=Збільшення -Name[vi]=Co dãn vào -Name[wa]=Agrandi l' schåle -Name[x-test]=xxScale Inxx -Name[zh_CN]=拉近 -Name[zh_TW]=縮放 -Icon=preferences-system-windows-effect-scale-in -Comment=Animate the appearing of windows -Comment[ar]=يحرك عملية ظهور النوافذ -Comment[be@latin]=Animuje źjaŭleńnie akon. -Comment[bg]=Анимирано показване на прозорците -Comment[bs]=Animira pojavljivanje prozora -Comment[ca]=Anima l'aparició de les finestres -Comment[ca@valencia]=Anima l'aparició de les finestres -Comment[cs]=Animuje objevení oken -Comment[csb]=Animùjë pòkazëwanié sã òkna -Comment[da]=Animér vinduers fremkomst -Comment[de]=Animiert das Erscheinen von Fenstern. -Comment[el]=Εφέ κίνησης της εμφάνισης των παραθύρων -Comment[en_GB]=Animate the appearing of windows -Comment[eo]=Animigas la aperon de fenestroj -Comment[es]=Anima la aparición de ventanas -Comment[et]=Animeerib akende ilmumise -Comment[eu]=Leihoak agertzeko modua animatzen du -Comment[fi]=Animoi ikkunoiden ilmestymisen -Comment[fr]=Anime l'apparition des fenêtres -Comment[fy]=Bringt it ferskinen fan finsters ta libben -Comment[ga]=Déan beochan agus fuinneog á taispeáint -Comment[gl]=Anima a aparición das xanelas -Comment[gu]=વિન્ડોનો દેખાવ એનિમેટ કરો -Comment[he]=הנפשת ההופעה של חלונות -Comment[hi]=विंडो प्रकट होने को एनिमेट करता है -Comment[hne]=विंडो ल देखाय के बेरा मं एनीमेट करथे -Comment[hr]=Animacija pojavljivanja prozora -Comment[hu]=Animáció történik ablakok megjelenésekor -Comment[ia]=Anima le apparentia de fenestras -Comment[id]=Animasikan munculnya jendela -Comment[is]=Hreyfingaráhrif við birtingu glugga -Comment[it]=Anima l'apparizione delle finestre -Comment[ja]=ウィンドウの出現をアニメーション化します -Comment[kk]=Терезеледің пайда болуын анимациялау -Comment[km]=ធ្វើ​ឲ្យ​កា​របង្ហាញ​របស់​បង្អួច​មាន​ចលនា -Comment[kn]=ಕಿಟಕಿಗಳ ತೋರಿಕೊಳ್ಳುವಿಕೆಯನ್ನು ಸಜೀವನಗೊಳಿಸು -Comment[ko]=창이 등장하는 것을 애니메이션으로 보여 줍니다 -Comment[lt]=Animuoja langų atsiradimą -Comment[lv]=Animē logu parādīšanos -Comment[mk]=Го анимира појавувањето прозорци -Comment[ml]=ജാലകങ്ങള്‍ കളിച്ചുകൊണ്ടു് വരട്ടെ. -Comment[mr]=चौकट दर्शविणे एनीमेट करा -Comment[nb]=Animer vinduer som dukker opp -Comment[nds]=Dat Opduken vun Finstern animeren -Comment[nl]=Voorziet het verschijnen van vensters van een animatie -Comment[nn]=Animer opning av vindauge -Comment[pa]=ਵਿੰਡੋ ਵੇਖਾਉਣ ਨੂੰ ਐਨੀਮੇਟ ਕੀਤਾ ਜਾਂਦਾ ਹੈ -Comment[pl]=Efekt skalowania okien przy ich otwieraniu i zamykaniu -Comment[pt]=Animar a aparição das janelas -Comment[pt_BR]=Anima o aparecimento de janelas -Comment[ro]=Animează apariția ferestrelor -Comment[ru]=Анимация появления нового окна -Comment[si]=කවුළුවල දැක්වීම සජීවීකරණය කරන්න -Comment[sk]=Animuje objavenie okien -Comment[sl]=Pojavljanje oken je animirano -Comment[sr]=Анимира појављивање прозора -Comment[sr@ijekavian]=Анимира појављивање прозора -Comment[sr@ijekavianlatin]=Animira pojavljivanje prozora -Comment[sr@latin]=Animira pojavljivanje prozora -Comment[sv]=Animera när fönster framträder -Comment[ta]=Animate the appearing of windows -Comment[tg]=Анимация появления окон -Comment[th]=การปรากฎตัวของหน้าต่างในแบบเคลื่อนไหว -Comment[tr]=Pencerelerin açılışını canlandır -Comment[ug]=كۆزنەكلەرنىڭ ئېچىلىشىنى جانلاندۇر -Comment[uk]=Анімація появи вікон -Comment[vi]=Tạo hiệu ứng xuất hiện cửa sổ -Comment[wa]=Animer l' aparexhaedje des fniesses -Comment[x-test]=xxAnimate the appearing of windowsxx -Comment[zh_CN]=动画显示窗口的出现 -Comment[zh_TW]=動畫顯示視窗出現 - -Type=Service -X-Plasma-API=javascript -X-Plasma-MainScript=code/main.js -X-KDE-ServiceTypes=KWin/Effect -X-KDE-PluginInfo-Author=Luboš Luňák, Kai Uwe Broulik -X-KDE-PluginInfo-Email=l.lunak@kde.org, kde@privat.broulik.de -X-KDE-PluginInfo-Name=kwin4_effect_scalein -X-KDE-PluginInfo-Version=0.2.0 -X-KDE-PluginInfo-Category=Appearance -X-KDE-PluginInfo-Depends= -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=false -X-KDE-Ordering=50 diff --git a/kconf_update/CMakeLists.txt b/kconf_update/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/kconf_update/CMakeLists.txt @@ -0,0 +1,2 @@ +install(FILES kwin.upd + DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) diff --git a/kconf_update/kwin.upd b/kconf_update/kwin.upd new file mode 100644 --- /dev/null +++ b/kconf_update/kwin.upd @@ -0,0 +1,7 @@ +Version=5 + +# Replace old Scale in effect with Scale effect. +Id=replace-scalein-with-scale +File=kwinrc +Group=Plugins +Key=kwin4_effect_scaleinEnabled,scaleEnabled