Warning, /plasma/latte-dock/containment/package/contents/ui/abilities/privates/LaunchersPrivate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.7 0007 0008 Item { 0009 id: _launchersprivate 0010 property Item layouts: null 0011 property bool updateIsBlocked: false 0012 0013 readonly property bool hasStealingApplet: appletStealingDroppedLaunchers !== null 0014 0015 property int appletIdStealingDroppedLaunchers: -1 0016 property Item appletStealingDroppedLaunchers: null 0017 0018 signal currentAppletStealingDroppedLaunchers(int id); 0019 0020 Binding { 0021 target: _launchersprivate 0022 property: "appletIdStealingDroppedLaunchers" 0023 when: !updateIsBlocked 0024 value: { 0025 var sLayout = layouts.startLayout; 0026 for (var i=0; i<sLayout.children.length; ++i){ 0027 var appletItem = sLayout.children[i]; 0028 if (appletItem 0029 && appletItem.index>=0 0030 && appletItem.communicator 0031 && appletItem.communicator.launchersAreSupported 0032 && appletItem.communicator.bridge.launchers.client.isStealingDroppedLaunchers) { 0033 return appletItem.index; 0034 } 0035 } 0036 0037 var mLayout = layouts.mainLayout; 0038 for (var i=0; i<mLayout.children.length; ++i){ 0039 var appletItem = mLayout.children[i]; 0040 0041 if (appletItem 0042 && appletItem.index>=0 0043 && appletItem.communicator 0044 && appletItem.communicator.launchersAreSupported 0045 && appletItem.communicator.bridge.launchers.client.isStealingDroppedLaunchers) { 0046 return appletItem.index; 0047 } 0048 } 0049 0050 var eLayout = layouts.endLayout; 0051 for (var i=0; i<eLayout.children.length; ++i){ 0052 var appletItem = eLayout.children[i]; 0053 if (appletItem 0054 && appletItem.index>=0 0055 && appletItem.communicator 0056 && appletItem.communicator.launchersAreSupported 0057 && appletItem.communicator.bridge.launchers.client.isStealingDroppedLaunchers) { 0058 return appletItem.index; 0059 } 0060 } 0061 0062 return -1; 0063 } 0064 } 0065 0066 0067 Binding { 0068 target: _launchersprivate 0069 property: "appletStealingDroppedLaunchers" 0070 when: !updateIsBlocked 0071 value: { 0072 var sLayout = layouts.startLayout; 0073 for (var i=0; i<sLayout.children.length; ++i){ 0074 var appletItem = sLayout.children[i]; 0075 if (appletItem 0076 && appletItem.index>=0 0077 && appletItem.communicator 0078 && appletItem.communicator.launchersAreSupported 0079 && appletItem.communicator.bridge.launchers.client.isStealingDroppedLaunchers) { 0080 return appletItem.communicator.bridge.launchers.client; 0081 } 0082 } 0083 0084 var mLayout = layouts.mainLayout; 0085 for (var i=0; i<mLayout.children.length; ++i){ 0086 var appletItem = mLayout.children[i]; 0087 if (appletItem 0088 && appletItem.index>=0 0089 && appletItem.communicator 0090 && appletItem.communicator.launchersAreSupported 0091 && appletItem.communicator.bridge.launchers.client.isStealingDroppedLaunchers) { 0092 return appletItem.communicator.bridge.launchers.client; 0093 } 0094 } 0095 0096 var eLayout = layouts.endLayout; 0097 for (var i=0; i<eLayout.children.length; ++i){ 0098 var appletItem = eLayout.children[i]; 0099 if (appletItem 0100 && appletItem.index>=0 0101 && appletItem.communicator 0102 && appletItem.communicator.launchersAreSupported 0103 && appletItem.communicator.bridge.launchers.client.isStealingDroppedLaunchers) { 0104 return appletItem.communicator.bridge.launchers.client; 0105 } 0106 } 0107 0108 return null; 0109 } 0110 } 0111 }