From 52f09917fd5aa5fe3b8cf01d80e17313ac79283e Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 5 Jan 2021 21:16:51 +0200 Subject: [PATCH] drop layoutsContainer abilities implementation --this code is not needed any more. HostAbilities are pretty capable to handle such code. --- .../contents/ui/layouts/AppletsContainer.qml | 4 +- .../contents/ui/layouts/LayoutsContainer.qml | 7 --- .../ui/layouts/abilities/AbilityGrid.qml | 49 ------------------- .../layouts/abilities/AbilityGridPrivate.qml | 28 ----------- .../ui/layouts/abilities/AbilityLayouts.qml | 26 ---------- .../abilities/AbilityLayoutsPrivate.qml | 33 ------------- .../layouts/abilities/types/AbilitiesHost.qml | 25 ---------- .../abilities/types/ParabolicEffect.qml | 24 --------- .../layouts/abilities/types/Requirements.qml | 24 --------- 9 files changed, 1 insertion(+), 219 deletions(-) delete mode 100644 containment/package/contents/ui/layouts/abilities/AbilityGrid.qml delete mode 100644 containment/package/contents/ui/layouts/abilities/AbilityGridPrivate.qml delete mode 100644 containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml delete mode 100644 containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml delete mode 100644 containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml delete mode 100644 containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml delete mode 100644 containment/package/contents/ui/layouts/abilities/types/Requirements.qml diff --git a/containment/package/contents/ui/layouts/AppletsContainer.qml b/containment/package/contents/ui/layouts/AppletsContainer.qml index 4e0c31a16..2e8a24a29 100644 --- a/containment/package/contents/ui/layouts/AppletsContainer.qml +++ b/containment/package/contents/ui/layouts/AppletsContainer.qml @@ -23,9 +23,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte.core 0.2 as LatteCore -import "./abilities" as Abilities - -Abilities.AbilityGrid { +Grid { id: appletsContainer columns: root.isVertical ? 1 : 0 diff --git a/containment/package/contents/ui/layouts/LayoutsContainer.qml b/containment/package/contents/ui/layouts/LayoutsContainer.qml index 975ea81d7..5d893c9dd 100644 --- a/containment/package/contents/ui/layouts/LayoutsContainer.qml +++ b/containment/package/contents/ui/layouts/LayoutsContainer.qml @@ -28,7 +28,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.private.containment 0.1 as LatteContainment -import "./abilities" as AbilitiesTypes import "../debugger" as Debugger Item{ @@ -47,12 +46,6 @@ Item{ readonly property alias mainLayout: _mainLayout readonly property alias endLayout: _endLayout - readonly property AbilitiesTypes.AbilityLayouts applets: AbilitiesTypes.AbilityLayouts{ - startLayout: _startLayout - mainLayout: _mainLayout - endLayout: _endLayout - } - signal contentsLengthChanged(); Binding { diff --git a/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml b/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml deleted file mode 100644 index 864fdb824..000000000 --- a/containment/package/contents/ui/layouts/abilities/AbilityGrid.qml +++ /dev/null @@ -1,49 +0,0 @@ -/* -* Copyright 2020 Michail Vourlakos -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -import org.kde.plasma.core 2.0 as PlasmaCore - -AbilityGridPrivate { - id: grid - - //! do not update during dragging/moving applets inConfigureAppletsMode - readonly property bool updateIsBlocked: root.dragOverlay && root.dragOverlay.pressed - - Binding{ - target: ability.require - property: "windowsTrackingCount" - when: !updateIsBlocked - value: { - var cnts = 0; - - for (var i=0; i -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -import org.kde.plasma.core 2.0 as PlasmaCore - -import "./types" as AbilityTypes - -Grid { - readonly property AbilityTypes.AbilitiesHost ability: AbilityTypes.AbilitiesHost{} -} diff --git a/containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml b/containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml deleted file mode 100644 index a173b01f8..000000000 --- a/containment/package/contents/ui/layouts/abilities/AbilityLayouts.qml +++ /dev/null @@ -1,26 +0,0 @@ -/* -* Copyright 2020 Michail Vourlakos -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -AbilityLayoutsPrivate { - require.windowsTrackingCount: startLayout.ability.require.windowsTrackingCount + - mainLayout.ability.require.windowsTrackingCount + - endLayout.ability.require.windowsTrackingCount -} diff --git a/containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml b/containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml deleted file mode 100644 index db14918e3..000000000 --- a/containment/package/contents/ui/layouts/abilities/AbilityLayoutsPrivate.qml +++ /dev/null @@ -1,33 +0,0 @@ -/* -* Copyright 2020 Michail Vourlakos -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -import org.kde.plasma.core 2.0 as PlasmaCore - -import "./types" as AbilityTypes - -Item { - property Item startLayout: null - property Item mainLayout: null - property Item endLayout: null - - readonly property AbilityTypes.ParabolicEffect parabolic: AbilityTypes.ParabolicEffect{} - readonly property AbilityTypes.Requirements require: AbilityTypes.Requirements{} -} diff --git a/containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml b/containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml deleted file mode 100644 index 8f5898cde..000000000 --- a/containment/package/contents/ui/layouts/abilities/types/AbilitiesHost.qml +++ /dev/null @@ -1,25 +0,0 @@ -/* -* Copyright 2020 Michail Vourlakos -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -Item { - readonly property ParabolicEffect parabolic: ParabolicEffect{} - readonly property Requirements require: Requirements{} -} diff --git a/containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml b/containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml deleted file mode 100644 index 2d7283e94..000000000 --- a/containment/package/contents/ui/layouts/abilities/types/ParabolicEffect.qml +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright 2020 Michail Vourlakos -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -Item { - -} diff --git a/containment/package/contents/ui/layouts/abilities/types/Requirements.qml b/containment/package/contents/ui/layouts/abilities/types/Requirements.qml deleted file mode 100644 index 456f6a20b..000000000 --- a/containment/package/contents/ui/layouts/abilities/types/Requirements.qml +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright 2020 Michail Vourlakos -* -* This file is part of Latte-Dock -* -* Latte-Dock 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. -* -* Latte-Dock 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 . -*/ - -import QtQuick 2.7 - -Item { - property int windowsTrackingCount: 0 //! number of applets requesting windows tracking -}