Desktop/kde: add patches
This commit is contained in:
parent
b6119bd2cc
commit
09d0847ea4
14 changed files with 2981 additions and 0 deletions
456
roles/kde/patches/plasma-workspace/pr5609.patch
Normal file
456
roles/kde/patches/plasma-workspace/pr5609.patch
Normal file
|
|
@ -0,0 +1,456 @@
|
|||
From 439b251bcb3ea24f52c052e7244fb7ced04503aa Mon Sep 17 00:00:00 2001
|
||||
From: Bohdan Onofriichuk <bogdan.onofriuchuk@gmail.com>
|
||||
Date: Thu, 19 Jun 2025 14:51:30 +0000
|
||||
Subject: [PATCH] applets/devicenotifier: port to plasma_add_applet
|
||||
|
||||
---
|
||||
applets/devicenotifier/CMakeLists.txt | 58 ++++++++++++++++---
|
||||
.../{plugin => }/actioninterface.cpp | 0
|
||||
.../{plugin => }/actioninterface.h | 0
|
||||
.../{plugin => }/actions/defaultaction.cpp | 0
|
||||
.../{plugin => }/actions/defaultaction.h | 0
|
||||
.../{plugin => }/actions/mountaction.cpp | 0
|
||||
.../{plugin => }/actions/mountaction.h | 0
|
||||
.../actions/mountandopenaction.cpp | 0
|
||||
.../{plugin => }/actions/mountandopenaction.h | 0
|
||||
.../actions/openwithfilemanageraction.cpp | 0
|
||||
.../actions/openwithfilemanageraction.h | 0
|
||||
.../{plugin => }/actions/unmountaction.cpp | 0
|
||||
.../{plugin => }/actions/unmountaction.h | 0
|
||||
.../{plugin => }/actionscontrol.cpp | 0
|
||||
.../{plugin => }/actionscontrol.h | 0
|
||||
.../{plugin => }/devicecontrol.cpp | 0
|
||||
.../{plugin => }/devicecontrol.h | 0
|
||||
.../{plugin => }/deviceerrormonitor_p.cpp | 0
|
||||
.../{plugin => }/deviceerrormonitor_p.h | 0
|
||||
.../{plugin => }/devicefiltercontrol.cpp | 0
|
||||
.../{plugin => }/devicefiltercontrol.h | 0
|
||||
.../{plugin => }/devicenotifications.notifyrc | 0
|
||||
.../{plugin => }/deviceserviceaction.cpp | 0
|
||||
.../{plugin => }/deviceserviceaction.h | 0
|
||||
.../{plugin => }/devicestatemonitor_p.cpp | 0
|
||||
.../{plugin => }/devicestatemonitor_p.h | 0
|
||||
.../{package/contents/config => }/main.xml | 0
|
||||
.../{package => }/metadata.json | 1 -
|
||||
applets/devicenotifier/plugin/CMakeLists.txt | 51 ----------------
|
||||
.../{plugin => }/predicatesmonitor_p.cpp | 0
|
||||
.../{plugin => }/predicatesmonitor_p.h | 0
|
||||
.../contents/ui => qml}/DeviceItem.qml | 22 ++++---
|
||||
.../ui => qml}/FullRepresentation.qml | 0
|
||||
.../{package/contents/ui => qml}/main.qml | 9 ++-
|
||||
.../{plugin => }/spacemonitor_p.cpp | 0
|
||||
.../{plugin => }/spacemonitor_p.h | 0
|
||||
36 files changed, 65 insertions(+), 76 deletions(-)
|
||||
rename applets/devicenotifier/{plugin => }/actioninterface.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actioninterface.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/defaultaction.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/defaultaction.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/mountaction.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/mountaction.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/mountandopenaction.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/mountandopenaction.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/openwithfilemanageraction.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/openwithfilemanageraction.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/unmountaction.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actions/unmountaction.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actionscontrol.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/actionscontrol.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicecontrol.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicecontrol.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/deviceerrormonitor_p.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/deviceerrormonitor_p.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicefiltercontrol.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicefiltercontrol.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicenotifications.notifyrc (100%)
|
||||
rename applets/devicenotifier/{plugin => }/deviceserviceaction.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/deviceserviceaction.h (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicestatemonitor_p.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/devicestatemonitor_p.h (100%)
|
||||
rename applets/devicenotifier/{package/contents/config => }/main.xml (100%)
|
||||
rename applets/devicenotifier/{package => }/metadata.json (99%)
|
||||
delete mode 100644 applets/devicenotifier/plugin/CMakeLists.txt
|
||||
rename applets/devicenotifier/{plugin => }/predicatesmonitor_p.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/predicatesmonitor_p.h (100%)
|
||||
rename applets/devicenotifier/{package/contents/ui => qml}/DeviceItem.qml (81%)
|
||||
rename applets/devicenotifier/{package/contents/ui => qml}/FullRepresentation.qml (100%)
|
||||
rename applets/devicenotifier/{package/contents/ui => qml}/main.qml (96%)
|
||||
rename applets/devicenotifier/{plugin => }/spacemonitor_p.cpp (100%)
|
||||
rename applets/devicenotifier/{plugin => }/spacemonitor_p.h (100%)
|
||||
|
||||
diff --git a/applets/devicenotifier/CMakeLists.txt b/applets/devicenotifier/CMakeLists.txt
|
||||
index bde4a38dd30..f336db13a69 100644
|
||||
--- a/applets/devicenotifier/CMakeLists.txt
|
||||
+++ b/applets/devicenotifier/CMakeLists.txt
|
||||
@@ -1,11 +1,55 @@
|
||||
-add_subdirectory(plugin)
|
||||
+# SPDX-FileCopyrightText: 2024 Fushan Wen <qydwhotmail@gmail.com>
|
||||
+# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
-ecm_qt_install_logging_categories(
|
||||
- EXPORT APPLETS::DEVICENOTIFIER
|
||||
- FILE applets/devicenotifier.categories
|
||||
- DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
|
||||
+add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.devicenotifier\")
|
||||
+
|
||||
+plasma_add_applet(org.kde.plasma.devicenotifier
|
||||
+ QML_SOURCES
|
||||
+ qml/DeviceItem.qml
|
||||
+ qml/FullRepresentation.qml
|
||||
+ qml/main.qml
|
||||
+ CPP_SOURCES
|
||||
+ actionscontrol.cpp
|
||||
+ devicecontrol.cpp
|
||||
+ spacemonitor_p.cpp
|
||||
+ devicestatemonitor_p.cpp
|
||||
+ deviceserviceaction.cpp
|
||||
+ predicatesmonitor_p.cpp
|
||||
+ deviceerrormonitor_p.cpp
|
||||
+ actioninterface.cpp
|
||||
+ devicefiltercontrol.cpp
|
||||
+ actions/defaultaction.cpp
|
||||
+ actions/mountandopenaction.cpp
|
||||
+ actions/mountaction.cpp
|
||||
+ actions/unmountaction.cpp
|
||||
+ actions/openwithfilemanageraction.cpp
|
||||
+ RESOURCES
|
||||
+ main.xml
|
||||
+ GENERATE_APPLET_CLASS
|
||||
+)
|
||||
+
|
||||
+target_link_libraries(org.kde.plasma.devicenotifier
|
||||
+ PRIVATE
|
||||
+ Qt::Qml
|
||||
+ Plasma::Plasma
|
||||
+ KF6::Solid
|
||||
+ KF6::I18n
|
||||
+ KF6::CoreAddons
|
||||
+ KF6::Service
|
||||
+ KF6::KIOCore
|
||||
+ KF6::KIOGui # KIO::CommandLauncherJob
|
||||
+ KF6::JobWidgets # KNotificationJobUiDelegate
|
||||
+ KSysGuard::ProcessCore
|
||||
+ KF6::Notifications
|
||||
)
|
||||
|
||||
-plasma_install_package(package org.kde.plasma.devicenotifier)
|
||||
+ecm_qt_declare_logging_category(org.kde.plasma.devicenotifier
|
||||
+ HEADER "devicenotifier_debug.h"
|
||||
+ IDENTIFIER "APPLETS::DEVICENOTIFIER"
|
||||
+ CATEGORY_NAME org.kde.applets.devicenotifier
|
||||
+ DEFAULT_SEVERITY Warning
|
||||
+ DESCRIPTION "Device Notifier applet" EXPORT "APPLETS::DEVICENOTIFIER"
|
||||
+)
|
||||
|
||||
-install(FILES openWithFileManager.desktop DESTINATION ${KDE_INSTALL_DATADIR}/solid/actions )
|
||||
+install(FILES devicenotifications.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
|
||||
+install(FILES openWithFileManager.desktop DESTINATION ${KDE_INSTALL_DATADIR}/solid/actions)
|
||||
diff --git a/applets/devicenotifier/plugin/actioninterface.cpp b/applets/devicenotifier/actioninterface.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actioninterface.cpp
|
||||
rename to applets/devicenotifier/actioninterface.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actioninterface.h b/applets/devicenotifier/actioninterface.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actioninterface.h
|
||||
rename to applets/devicenotifier/actioninterface.h
|
||||
diff --git a/applets/devicenotifier/plugin/actions/defaultaction.cpp b/applets/devicenotifier/actions/defaultaction.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/defaultaction.cpp
|
||||
rename to applets/devicenotifier/actions/defaultaction.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actions/defaultaction.h b/applets/devicenotifier/actions/defaultaction.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/defaultaction.h
|
||||
rename to applets/devicenotifier/actions/defaultaction.h
|
||||
diff --git a/applets/devicenotifier/plugin/actions/mountaction.cpp b/applets/devicenotifier/actions/mountaction.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/mountaction.cpp
|
||||
rename to applets/devicenotifier/actions/mountaction.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actions/mountaction.h b/applets/devicenotifier/actions/mountaction.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/mountaction.h
|
||||
rename to applets/devicenotifier/actions/mountaction.h
|
||||
diff --git a/applets/devicenotifier/plugin/actions/mountandopenaction.cpp b/applets/devicenotifier/actions/mountandopenaction.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/mountandopenaction.cpp
|
||||
rename to applets/devicenotifier/actions/mountandopenaction.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actions/mountandopenaction.h b/applets/devicenotifier/actions/mountandopenaction.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/mountandopenaction.h
|
||||
rename to applets/devicenotifier/actions/mountandopenaction.h
|
||||
diff --git a/applets/devicenotifier/plugin/actions/openwithfilemanageraction.cpp b/applets/devicenotifier/actions/openwithfilemanageraction.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/openwithfilemanageraction.cpp
|
||||
rename to applets/devicenotifier/actions/openwithfilemanageraction.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actions/openwithfilemanageraction.h b/applets/devicenotifier/actions/openwithfilemanageraction.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/openwithfilemanageraction.h
|
||||
rename to applets/devicenotifier/actions/openwithfilemanageraction.h
|
||||
diff --git a/applets/devicenotifier/plugin/actions/unmountaction.cpp b/applets/devicenotifier/actions/unmountaction.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/unmountaction.cpp
|
||||
rename to applets/devicenotifier/actions/unmountaction.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actions/unmountaction.h b/applets/devicenotifier/actions/unmountaction.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actions/unmountaction.h
|
||||
rename to applets/devicenotifier/actions/unmountaction.h
|
||||
diff --git a/applets/devicenotifier/plugin/actionscontrol.cpp b/applets/devicenotifier/actionscontrol.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actionscontrol.cpp
|
||||
rename to applets/devicenotifier/actionscontrol.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/actionscontrol.h b/applets/devicenotifier/actionscontrol.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/actionscontrol.h
|
||||
rename to applets/devicenotifier/actionscontrol.h
|
||||
diff --git a/applets/devicenotifier/plugin/devicecontrol.cpp b/applets/devicenotifier/devicecontrol.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicecontrol.cpp
|
||||
rename to applets/devicenotifier/devicecontrol.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/devicecontrol.h b/applets/devicenotifier/devicecontrol.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicecontrol.h
|
||||
rename to applets/devicenotifier/devicecontrol.h
|
||||
diff --git a/applets/devicenotifier/plugin/deviceerrormonitor_p.cpp b/applets/devicenotifier/deviceerrormonitor_p.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/deviceerrormonitor_p.cpp
|
||||
rename to applets/devicenotifier/deviceerrormonitor_p.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/deviceerrormonitor_p.h b/applets/devicenotifier/deviceerrormonitor_p.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/deviceerrormonitor_p.h
|
||||
rename to applets/devicenotifier/deviceerrormonitor_p.h
|
||||
diff --git a/applets/devicenotifier/plugin/devicefiltercontrol.cpp b/applets/devicenotifier/devicefiltercontrol.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicefiltercontrol.cpp
|
||||
rename to applets/devicenotifier/devicefiltercontrol.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/devicefiltercontrol.h b/applets/devicenotifier/devicefiltercontrol.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicefiltercontrol.h
|
||||
rename to applets/devicenotifier/devicefiltercontrol.h
|
||||
diff --git a/applets/devicenotifier/plugin/devicenotifications.notifyrc b/applets/devicenotifier/devicenotifications.notifyrc
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicenotifications.notifyrc
|
||||
rename to applets/devicenotifier/devicenotifications.notifyrc
|
||||
diff --git a/applets/devicenotifier/plugin/deviceserviceaction.cpp b/applets/devicenotifier/deviceserviceaction.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/deviceserviceaction.cpp
|
||||
rename to applets/devicenotifier/deviceserviceaction.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/deviceserviceaction.h b/applets/devicenotifier/deviceserviceaction.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/deviceserviceaction.h
|
||||
rename to applets/devicenotifier/deviceserviceaction.h
|
||||
diff --git a/applets/devicenotifier/plugin/devicestatemonitor_p.cpp b/applets/devicenotifier/devicestatemonitor_p.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicestatemonitor_p.cpp
|
||||
rename to applets/devicenotifier/devicestatemonitor_p.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/devicestatemonitor_p.h b/applets/devicenotifier/devicestatemonitor_p.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/devicestatemonitor_p.h
|
||||
rename to applets/devicenotifier/devicestatemonitor_p.h
|
||||
diff --git a/applets/devicenotifier/package/contents/config/main.xml b/applets/devicenotifier/main.xml
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/package/contents/config/main.xml
|
||||
rename to applets/devicenotifier/main.xml
|
||||
diff --git a/applets/devicenotifier/package/metadata.json b/applets/devicenotifier/metadata.json
|
||||
similarity index 99%
|
||||
rename from applets/devicenotifier/package/metadata.json
|
||||
rename to applets/devicenotifier/metadata.json
|
||||
index 0a330dfc189..77d7feac1cb 100644
|
||||
--- a/applets/devicenotifier/package/metadata.json
|
||||
+++ b/applets/devicenotifier/metadata.json
|
||||
@@ -115,7 +115,6 @@
|
||||
"desktop"
|
||||
],
|
||||
"Icon": "device-notifier",
|
||||
- "Id": "org.kde.plasma.devicenotifier",
|
||||
"License": "GPL-2.0+",
|
||||
"Name": "Disks & Devices",
|
||||
"Name[ar]": "الأجهزة والأقراص",
|
||||
diff --git a/applets/devicenotifier/plugin/CMakeLists.txt b/applets/devicenotifier/plugin/CMakeLists.txt
|
||||
deleted file mode 100644
|
||||
index 34a3456d690..00000000000
|
||||
--- a/applets/devicenotifier/plugin/CMakeLists.txt
|
||||
+++ /dev/null
|
||||
@@ -1,51 +0,0 @@
|
||||
-# SPDX-FileCopyrightText: 2024 Fushan Wen <qydwhotmail@gmail.com>
|
||||
-# SPDX-License-Identifier: BSD-3-Clause
|
||||
-
|
||||
-add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.devicenotifier\")
|
||||
-
|
||||
-ecm_add_qml_module(devicenotifierplugin URI org.kde.plasma.private.devicenotifier GENERATE_PLUGIN_SOURCE)
|
||||
-
|
||||
-target_sources(devicenotifierplugin
|
||||
- PRIVATE
|
||||
- actionscontrol.cpp actionscontrol.h
|
||||
- devicecontrol.cpp devicecontrol.h
|
||||
- spacemonitor_p.cpp spacemonitor_p.h
|
||||
- devicestatemonitor_p.cpp devicestatemonitor_p.h
|
||||
- deviceserviceaction.cpp deviceserviceaction.h
|
||||
- predicatesmonitor_p.cpp predicatesmonitor_p.h
|
||||
- deviceerrormonitor_p.cpp deviceerrormonitor_p.h
|
||||
- actioninterface.cpp actioninterface.h
|
||||
- devicefiltercontrol.cpp devicefiltercontrol.h
|
||||
- actions/defaultaction.cpp actions/defaultaction.h
|
||||
- actions/mountandopenaction.cpp actions/mountandopenaction.h
|
||||
- actions/mountaction.cpp actions/mountaction.h
|
||||
- actions/unmountaction.cpp actions/unmountaction.h
|
||||
- actions/openwithfilemanageraction.cpp actions/openwithfilemanageraction.h
|
||||
-)
|
||||
-
|
||||
-target_link_libraries(devicenotifierplugin
|
||||
- PRIVATE
|
||||
- Qt::Qml
|
||||
- Plasma::Plasma
|
||||
- KF6::Solid
|
||||
- KF6::I18n
|
||||
- KF6::CoreAddons
|
||||
- KF6::Service
|
||||
- KF6::KIOCore
|
||||
- KF6::KIOGui # KIO::CommandLauncherJob
|
||||
- KF6::JobWidgets # KNotificationJobUiDelegate
|
||||
- KSysGuard::ProcessCore
|
||||
- KF6::Notifications
|
||||
-)
|
||||
-
|
||||
-ecm_qt_declare_logging_category(devicenotifierplugin
|
||||
- HEADER "devicenotifier_debug.h"
|
||||
- IDENTIFIER "APPLETS::DEVICENOTIFIER"
|
||||
- CATEGORY_NAME org.kde.applets.devicenotifier
|
||||
- DEFAULT_SEVERITY Warning
|
||||
- DESCRIPTION "Device Notifier applet" EXPORT "APPLETS::DEVICENOTIFIER"
|
||||
-)
|
||||
-
|
||||
-ecm_finalize_qml_module(devicenotifierplugin)
|
||||
-
|
||||
-install(FILES devicenotifications.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
|
||||
diff --git a/applets/devicenotifier/plugin/predicatesmonitor_p.cpp b/applets/devicenotifier/predicatesmonitor_p.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/predicatesmonitor_p.cpp
|
||||
rename to applets/devicenotifier/predicatesmonitor_p.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/predicatesmonitor_p.h b/applets/devicenotifier/predicatesmonitor_p.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/predicatesmonitor_p.h
|
||||
rename to applets/devicenotifier/predicatesmonitor_p.h
|
||||
diff --git a/applets/devicenotifier/package/contents/ui/DeviceItem.qml b/applets/devicenotifier/qml/DeviceItem.qml
|
||||
similarity index 81%
|
||||
rename from applets/devicenotifier/package/contents/ui/DeviceItem.qml
|
||||
rename to applets/devicenotifier/qml/DeviceItem.qml
|
||||
index c19c9535b04..861996af45c 100644
|
||||
--- a/applets/devicenotifier/package/contents/ui/DeviceItem.qml
|
||||
+++ b/applets/devicenotifier/qml/DeviceItem.qml
|
||||
@@ -19,8 +19,6 @@ import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.kquickcontrolsaddons
|
||||
|
||||
-import org.kde.plasma.private.devicenotifier as DN
|
||||
-
|
||||
PlasmaExtras.ExpandableListItem {
|
||||
id: deviceItem
|
||||
|
||||
@@ -41,18 +39,18 @@ PlasmaExtras.ExpandableListItem {
|
||||
|
||||
property bool hasMessage: deviceItem.deviceErrorMessage !== ""
|
||||
|
||||
- property bool isFree: deviceItem.deviceOperationResult !== DN.DevicesStateMonitor.Working && deviceItem.deviceOperationResult !== DN.DevicesStateMonitor.Checking && deviceItem.deviceOperationResult !== DN.DevicesStateMonitor.Repairing && deviceItem.deviceOperationResult !== DN.DevicesStateMonitor.NotPresent && !(deviceItem.deviceMounted === false && deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Successful)
|
||||
+ property bool isFree: deviceItem.deviceOperationResult !== DevicesStateMonitor.Working && deviceItem.deviceOperationResult !== DevicesStateMonitor.Checking && deviceItem.deviceOperationResult !== DevicesStateMonitor.Repairing && deviceItem.deviceOperationResult !== DevicesStateMonitor.NotPresent && !(deviceItem.deviceMounted === false && deviceItem.deviceOperationResult === DevicesStateMonitor.Successful)
|
||||
|
||||
onDeviceOperationResultChanged: {
|
||||
if (!popupIconTimer.running) {
|
||||
- if (deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Working) {
|
||||
+ if (deviceItem.deviceOperationResult === DevicesStateMonitor.Working) {
|
||||
if(deviceMounted){
|
||||
unmountTimer.restart();
|
||||
}
|
||||
- } else if (deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Successful) {
|
||||
+ } else if (deviceItem.deviceOperationResult === DevicesStateMonitor.Successful) {
|
||||
devicenotifier.popupIcon = "dialog-ok"
|
||||
popupIconTimer.restart()
|
||||
- } else if (deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Unsuccessful) {
|
||||
+ } else if (deviceItem.deviceOperationResult === DevicesStateMonitor.Unsuccessful) {
|
||||
devicenotifier.popupIcon = "dialog-error"
|
||||
popupIconTimer.restart()
|
||||
}
|
||||
@@ -80,7 +78,7 @@ PlasmaExtras.ExpandableListItem {
|
||||
} else {
|
||||
return "emblem-error"
|
||||
}
|
||||
- } else if (deviceItem.deviceOperationResult !== DN.DevicesStateMonitor.Working && deviceItem.deviceEmblems[0]) {
|
||||
+ } else if (deviceItem.deviceOperationResult !== DevicesStateMonitor.Working && deviceItem.deviceEmblems[0]) {
|
||||
return deviceItem.deviceEmblems[0]
|
||||
} else {
|
||||
return ""
|
||||
@@ -93,16 +91,16 @@ PlasmaExtras.ExpandableListItem {
|
||||
if (deviceItem.hasMessage) {
|
||||
return deviceItem.deviceErrorMessage
|
||||
}
|
||||
- if (deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Checking) {
|
||||
+ if (deviceItem.deviceOperationResult === DevicesStateMonitor.Checking) {
|
||||
return i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Checking…")
|
||||
- } else if (deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Repairing) {
|
||||
+ } else if (deviceItem.deviceOperationResult === DevicesStateMonitor.Repairing) {
|
||||
return i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Repairing…")
|
||||
- } else if (deviceItem.deviceOperationResult !== DN.DevicesStateMonitor.Working) {
|
||||
+ } else if (deviceItem.deviceOperationResult !== DevicesStateMonitor.Working) {
|
||||
if (deviceItem.deviceFreeSpace > 0 && deviceItem.deviceSize > 0) {
|
||||
return i18nc("@info:status Free disk space", "%1 free of %2", deviceItem.deviceFreeSpaceText, deviceItem.deviceSizeText)
|
||||
}
|
||||
return ""
|
||||
- } else if (!deviceItem.deviceMounted && deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Working) {
|
||||
+ } else if (!deviceItem.deviceMounted && deviceItem.deviceOperationResult === DevicesStateMonitor.Working) {
|
||||
return i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Accessing…")
|
||||
} else if (unmountTimer.running) {
|
||||
// Unmounting; shown if unmount takes less than 1 second
|
||||
@@ -139,7 +137,7 @@ PlasmaExtras.ExpandableListItem {
|
||||
}
|
||||
}
|
||||
|
||||
- isBusy: deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Working || deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Checking || deviceItem.deviceOperationResult === DN.DevicesStateMonitor.Repairing
|
||||
+ isBusy: deviceItem.deviceOperationResult === DevicesStateMonitor.Working || deviceItem.deviceOperationResult === DevicesStateMonitor.Checking || deviceItem.deviceOperationResult === DevicesStateMonitor.Repairing
|
||||
|
||||
customExpandedViewContent: deviceActions !== undefined && deviceActions.rowCount() !== 0 && isFree ? actionComponent : null
|
||||
|
||||
diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/qml/FullRepresentation.qml
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/package/contents/ui/FullRepresentation.qml
|
||||
rename to applets/devicenotifier/qml/FullRepresentation.qml
|
||||
diff --git a/applets/devicenotifier/package/contents/ui/main.qml b/applets/devicenotifier/qml/main.qml
|
||||
similarity index 96%
|
||||
rename from applets/devicenotifier/package/contents/ui/main.qml
|
||||
rename to applets/devicenotifier/qml/main.qml
|
||||
index 4061480becc..7fcd76a6d16 100644
|
||||
--- a/applets/devicenotifier/package/contents/ui/main.qml
|
||||
+++ b/applets/devicenotifier/qml/main.qml
|
||||
@@ -15,21 +15,20 @@ import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.kcmutils // For KCMLauncher
|
||||
import org.kde.config // KAuthorized
|
||||
-import org.kde.plasma.private.devicenotifier as DN
|
||||
|
||||
PlasmoidItem {
|
||||
id: devicenotifier
|
||||
|
||||
- DN.DeviceFilterControl {
|
||||
+ DeviceFilterControl {
|
||||
id: filterModel
|
||||
|
||||
filterType: {
|
||||
if (Plasmoid.configuration.allDevices) {
|
||||
- return DN.DeviceFilterControl.All
|
||||
+ return DeviceFilterControl.All
|
||||
} else if (Plasmoid.configuration.removableDevices) {
|
||||
- return DN.DeviceFilterControl.Removable
|
||||
+ return DeviceFilterControl.Removable
|
||||
} else {
|
||||
- return DN.DeviceFilterControl.Unremovable
|
||||
+ return DeviceFilterControl.Unremovable
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/applets/devicenotifier/plugin/spacemonitor_p.cpp b/applets/devicenotifier/spacemonitor_p.cpp
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/spacemonitor_p.cpp
|
||||
rename to applets/devicenotifier/spacemonitor_p.cpp
|
||||
diff --git a/applets/devicenotifier/plugin/spacemonitor_p.h b/applets/devicenotifier/spacemonitor_p.h
|
||||
similarity index 100%
|
||||
rename from applets/devicenotifier/plugin/spacemonitor_p.h
|
||||
rename to applets/devicenotifier/spacemonitor_p.h
|
||||
--
|
||||
GitLab
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue