diff --git a/.gitignore b/.gitignore index a56559b..5ea8916 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .kdev4 system_panel.kdev4 + +.vscode/ diff --git a/AUTHORS b/AUTHORS index a8a1b3a..2e6aa73 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -Copyright (c) 2016 Carlos López Sánchez +Copyright (c) 2024 Carlos López Sánchez diff --git a/ChangeLog b/ChangeLog index 577c36f..c73f93d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +--------------------- +2024-06-23 - v.2.0.0 +--------------------- +- Port to KDe Plasma 6. +- Other minor code enhancements. + --------------------- 2019-07-08 - v.1.6.0 --------------------- diff --git a/INSTALL b/INSTALL index b303883..766a1cb 100644 --- a/INSTALL +++ b/INSTALL @@ -1,14 +1,14 @@ # (0) Minimum Requirements (tested, but might be lower) -- Qt >= 5.4.0 -- KDE Workspace >= 5.4.0 -- Plasma Framework >= 5.19 -- extra-cmake-modules >= 5.38.0 +- Qt >= 6.6.0 +- Plasma Workspace >= 6.0.0 +- Plasma Framework >= 6.0.0 +- extra-cmake-modules >= 6.0.0 # (1) Standard way: having root permission cd /path/to/system_panel/ mkdir build cd build -cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../src/ +cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../src/ make make install @@ -16,6 +16,6 @@ make install cd /path/to/system_panel/ mkdir build cd build -cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` --prefix` -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../src/ +cmake -DCMAKE_INSTALL_PREFIX=~/local/share --prefix` -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../src/ make make install diff --git a/README.md b/README.md index eedb221..5391d9f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# plasma5-applets-system-panel -Plasma5 applet that displays a panel with a set of system actions. +# plasma-applets-system-panel +Applet for KDE Plasma 6 that displays a panel with a set of system actions. ## Screenshots: ![alt tag](./docs/screenshoots/system_panel_01.png) @@ -13,7 +13,9 @@ Plasma5 applet that displays a panel with a set of system actions. ## Supported actions: - Standby (turn off monitor to save energy). - Lock screen. -- Leave (log out, restart or shut down the computer). +- Shut Down. +- Restart. +- Log out. - Switch user (switch user o create new session). - Sleep (suspend to RAM). - Hibernate (suspend to disk). @@ -29,3 +31,11 @@ Plasma5 applet that displays a panel with a set of system actions. - English (default). - French. - Spanish. + +If you want to support a new language, please follow [these simple steps](./src/translations/TRANSLATORS.REAME.md). + +## Testing source code locally +You can test this code locally by issuing the following command: +``` +QT_LOGGING_RULES="qml.debug=true" plasmoidviewer -a src/package/ +``` \ No newline at end of file diff --git a/TODO b/TODO index ab77407..29d6ad7 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ -- Add contextual menu with unselected options -- Select custom action -- Add About tab in the Settings window +- Improve the turnOffScreen operation to rely on DBus rather than command execution. +- Port confirmation dialog for sleep and hibernate actions. +- Add contextual menu with not displayed actions. +- Implement feature to allow running custom actions. \ No newline at end of file diff --git a/docs/screenshoots/system_panel_01.png b/docs/screenshoots/system_panel_01.png index 108f866..7183fd8 100644 Binary files a/docs/screenshoots/system_panel_01.png and b/docs/screenshoots/system_panel_01.png differ diff --git a/docs/screenshoots/system_panel_02.png b/docs/screenshoots/system_panel_02.png index c7429a1..10c6a27 100644 Binary files a/docs/screenshoots/system_panel_02.png and b/docs/screenshoots/system_panel_02.png differ diff --git a/docs/screenshoots/system_panel_03.png b/docs/screenshoots/system_panel_03.png index f23d791..bf6927b 100644 Binary files a/docs/screenshoots/system_panel_03.png and b/docs/screenshoots/system_panel_03.png differ diff --git a/docs/screenshoots/system_panel_04.png b/docs/screenshoots/system_panel_04.png index 4082845..44e0a0b 100644 Binary files a/docs/screenshoots/system_panel_04.png and b/docs/screenshoots/system_panel_04.png differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be935e0..5f02429 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,23 +1,23 @@ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.16 FATAL_ERROR) +project(plasma-applet-system-panel) -set(QT_MIN_VERSION "5.4.0") -set(KF5_MIN_VERSION "5.0.0") - -find_package(ECM 0.0.11 REQUIRED NO_MODULE) +set(QT_MIN_VERSION "6.6.0") +set(KF6_MIN_VERSION "6.0.0") +find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) -include(KDEInstallDirs) -include(KDECMakeSettings) -include(KDECompilerSettings) +include(KDEInstallDirs6) +include(KDECMakeSettings NO_POLICY_SCOPE) -find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Quick) -find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Plasma) +find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED Quick) +find_package(Plasma ${KF6_MIN_VERSION} REQUIRED) add_subdirectory(plugin) add_subdirectory(translations) plasma_install_package(package org.kde.plasma.systempanel) -install( DIRECTORY image/breeze DESTINATION ${ICON_INSTALL_DIR}) -install( DIRECTORY image/breeze-dark DESTINATION ${ICON_INSTALL_DIR}) +message(STATUS "Install directory KDE_INSTALL_ICONDIR=${KDE_INSTALL_ICONDIR}") +install( DIRECTORY image/breeze DESTINATION ${KDE_INSTALL_ICONDIR}) +install( DIRECTORY image/breeze-dark DESTINATION ${KDE_INSTALL_ICONDIR}) diff --git a/src/package/contents/code/data.js b/src/package/contents/code/data.js index 9f504d8..cb87878 100644 --- a/src/package/contents/code/data.js +++ b/src/package/contents/code/data.js @@ -1,189 +1,213 @@ -var store = function(){ - - var operationIdx = null - var defaultData = [{ - icon: "system-standby", - operation: "turnOffScreen", - tooltip_mainText: i18n("Standby"), - tooltip_subText: i18n("Turn off the monitor to save energy") - }, { - icon: "system-lock-screen", - operation: "lockScreen", - tooltip_mainText: i18n("Lock"), - tooltip_subText: i18n("Lock the screen"), - requires: "LockScreen" - }, { - icon: "system-switch-user", - operation: "switchUser", - tooltip_mainText: i18n("Switch user"), - tooltip_subText: i18n("Start a parallel session as a different user") - }, { - icon: "system-shutdown", - operation: "requestShutDown", - tooltip_mainText: i18n("Leave..."), - tooltip_subText: i18n("Log out, turn off or restart the computer") - }, { - icon: "system-suspend", - operation: "suspendToRam", - tooltip_mainText: i18n("Suspend"), - tooltip_subText: i18n("Sleep (suspend to RAM)"), - requires: "Suspend" - }, { - icon: "system-suspend-hibernate", - operation: "suspendToDisk", - tooltip_mainText: i18n("Hibernate"), - tooltip_subText: i18n("Hibernate (suspend to disk)"), - requires: "Hibernate" - }] - - var myData = deepCopy(defaultData) - - function deepCopy(array){ - - var newArray = array.slice(); - for(var i = 0; i < array.length; i++){ - var item = array[i] - var newItem = {} - for(var x in item ){ - newItem[x] = item[x] - } - newArray[i] = newItem - } - - return newArray - } - - function resetOperationIdx(){ - - operationIdx = null - } - - function getOperationIdx(force) { - - if(!operationIdx){ - operationIdx = {} - for(var i = 0; i < myData.length; i++){ - operationIdx[myData[i].operation] = i - } - } - - return operationIdx +let store = (function () { + let operationIdx = null; + const defaultData = [ + { + icon: "system-standby", + operation: "turnOffScreen", + configKey: "turnOffScreen", + tooltip_mainText: i18n("Standby"), + tooltip_subText: i18n("Turn off the monitor to save energy"), + }, + { + icon: "system-lock-screen", + operation: "lock", + configKey: "lockScreen", + tooltip_mainText: i18n("Lock"), + tooltip_subText: i18n("Lock the screen"), + requires: "canLock", + }, + { + icon: "system-switch-user", + operation: "switchUser", + configKey: "switchUser", + tooltip_mainText: i18n("Switch user"), + tooltip_subText: i18n("Start a parallel session as a different user"), + requires: "canSwitchUser", + }, + { + icon: "system-shutdown", + operation: "requestShutdown", + configKey: "requestShutDown", + tooltip_mainText: i18n("Shut Down"), + tooltip_subText: i18n("Turn off the computer"), + requires: "canShutdown", + }, + { + icon: "system-reboot", + operation: "requestReboot", + configKey: "requestRestart", + tooltip_mainText: i18n("Restart"), + tooltip_subText: i18n("Reboot the computer"), + requires: "canReboot", + }, + { + icon: "system-log-out", + operation: "requestLogout", + configKey: "requestLogOut", + tooltip_mainText: i18n("Log Out"), + tooltip_subText: i18n("Log out the computer"), + requires: "canLogout", + }, + { + icon: "system-suspend", + operation: "suspend", + configKey: "suspendToRam", + tooltip_mainText: i18n("Sleep"), + tooltip_subText: i18n("Suspend to RAM"), + requires: "canSuspend", + }, + { + icon: "system-suspend-hibernate", + operation: "hibernate", + configKey: "suspendToDisk", + tooltip_mainText: i18n("Hibernate"), + tooltip_subText: i18n("Suspend to disk"), + requires: "canHibernate", + }, + ]; + + let myData = deepCopy(defaultData); + + function deepCopy(array) { + const newArray = array.slice(); + for (let i = 0; i < array.length; i++) { + const item = array[i]; + const newItem = {}; + for (let key in item) { + newItem[key] = item[key]; + } + newArray[i] = newItem; } - - function swapOperation(currentPosition, newPosition){ - - console.log("Swapping position from", currentPosition, "to", newPosition ) - var success = false - var item = myData[currentPosition]; - myData.splice(currentPosition, 1); - myData.splice(newPosition, 0, item) - success = true - - return success + + return newArray; + } + + function resetOperationIdx() { + operationIdx = null; + } + + function getOperationIdx() { + if (!operationIdx) { + operationIdx = {}; + for (let i = 0; i < myData.length; i++) { + operationIdx[myData[i].operation] = i; + } } - - function syncData(){ - - console.log("Synchronizing data...") - var cfgData = plasmoid.configuration.layoutData - if(cfgData){ - console.log("Parsing data", cfgData) - cfgData = JSON.parse(cfgData) - if(cfgData && cfgData.length > 0){ - var newData = [] - var operationIdx = getOperationIdx() - for(var i = 0; i < cfgData.length; i++){ - var item = cfgData[i] - var itemIdx = operationIdx[item.operation] - var defaultItem = myData[itemIdx] - defaultItem.icon = item.icon - newData[newData.length]=defaultItem - } - - myData = newData - resetOperationIdx() - } + + return operationIdx; + } + + function swapOperation(currentPosition, newPosition) { + console.log("Swapping position from", currentPosition, "to", newPosition); + let success = false; + const item = myData[currentPosition]; + myData.splice(currentPosition, 1); + myData.splice(newPosition, 0, item); + success = true; + + return success; + } + + function syncData() { + console.log("Synchronizing data..."); + let cfgData = plasmoid.configuration.layoutData; + if (cfgData) { + console.log("Parsing data", cfgData); + cfgData = JSON.parse(cfgData); + if (cfgData && cfgData.length > 0) { + const newData = []; + const operationIdx = getOperationIdx(); + for (let i = 0; i < cfgData.length; i++) { + const item = cfgData[i]; + const itemIdx = operationIdx[item.operation]; + const defaultItem = myData[itemIdx]; + defaultItem.icon = item.icon; + newData[newData.length] = defaultItem; } - console.log("Data synchronized successfully!") + + myData = newData; + resetOperationIdx(); + } } + console.log("Data synchronized successfully!"); + } - return { - getOperationPosition: function(operation){ - - var operationIdx = getOperationIdx() - var idx = operationIdx[operation] - - return idx - } - ,updateOperationIcon: function(operation, icon){ - - console.log("updateOperationIcon - operation=", operation, "icon=",icon) - var success = false - var operationIdx = getOperationIdx() - var idx = operationIdx[operation] - if(idx || idx == 0){ - myData[idx].icon = icon - success = true - } - else { - console.error("Could not find index for operation=", operation) - } - - return success - } - ,updateOperationPosition: function (operation, newPosition) { - - console.log("Updating position of operation= ", operation, "to", newPosition ) - var success = false - var operationIdx = getOperationIdx() - var currentPosition = operationIdx[operation] - if(currentPosition || currentPosition == 0){ - success = swapOperation(currentPosition, newPosition) - if(success){ - resetOperationIdx() - } - console.log("Position updated with success=", success) - } - else { - console.error("Could not find index for operation=", operation) - } - - return success - } - ,getData: function(){ - - console.log("getData", myData) - - return myData - } - ,getConfigData: function(){ - - console.log("getConfigData", myData) - syncData(); - - return myData; - } - ,getBasicJsonData: function(){ - - var json = null - if(myData){ - var basicData = [] - for( var i = 0; i < myData.length; i++){ - basicData[i] = {'icon':myData[i].icon, 'operation':myData[i].operation} - } - - json = JSON.stringify(basicData) - console.log("JSON", json) - } - - return json + return { + getOperationPosition: function (operation) { + const operationIdx = getOperationIdx(); + const idx = operationIdx[operation]; + + return idx; + }, + updateOperationIcon: function (operation, icon) { + console.log("updateOperationIcon - operation=", operation, "icon=", icon); + let success = false; + const operationIdx = getOperationIdx(); + const idx = operationIdx[operation]; + if (idx || idx == 0) { + myData[idx].icon = icon; + success = true; + } else { + console.error("Could not find index for operation=", operation); + } + + return success; + }, + updateOperationPosition: function (operation, newPosition) { + console.log( + "Updating position of operation= ", + operation, + "to", + newPosition + ); + let success = false; + const operationIdx = getOperationIdx(); + const currentPosition = operationIdx[operation]; + if (currentPosition || currentPosition == 0) { + success = swapOperation(currentPosition, newPosition); + if (success) { + resetOperationIdx(); } - ,restore: function(){ - - myData = deepCopy(defaultData) - resetOperationIdx() - - return myData + console.log("Position updated with success=", success); + } else { + console.error("Could not find index for operation=", operation); + } + + return success; + }, + getData: function () { + console.log("getData", JSON.stringify(myData)); + + return myData; + }, + getConfigData: function () { + console.log("getConfigData", JSON.stringify(myData)); + syncData(); + + return myData; + }, + getBasicJsonData: function () { + let json = null; + if (myData) { + const basicData = []; + for (let i = 0; i < myData.length; i++) { + basicData[i] = { + icon: myData[i].icon, + operation: myData[i].operation, + }; } - } -}() + + json = JSON.stringify(basicData); + console.log("JSON", json); + } + + return json; + }, + restore: function () { + myData = deepCopy(defaultData); + resetOperationIdx(); + + return myData; + }, + }; +})(); diff --git a/src/package/contents/config/config.qml b/src/package/contents/config/config.qml index c532ba6..92fa326 100644 --- a/src/package/contents/config/config.qml +++ b/src/package/contents/config/config.qml @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 @@ -15,19 +15,19 @@ along with this program. If not, see . */ -import QtQuick 2.0 +import QtQuick -import org.kde.plasma.configuration 2.0 +import org.kde.plasma.configuration ConfigModel { ConfigCategory { name: i18n("General") icon: "system-shutdown" - source: "ConfigGeneral.qml" + source: "configGeneral.qml" } ConfigCategory { name: i18nc("Icon and location of the icon of each action", "Icon settings") icon: "preferences-desktop-color" - source: "ConfigIconSettings.qml" + source: "configIconSettings.qml" } } diff --git a/src/package/contents/config/main.xml b/src/package/contents/config/main.xml index e2f7e43..b1ea9be 100644 --- a/src/package/contents/config/main.xml +++ b/src/package/contents/config/main.xml @@ -12,6 +12,12 @@ true + + true + + + true + true diff --git a/src/package/contents/ui/ConfigGeneral.qml b/src/package/contents/ui/ConfigGeneral.qml deleted file mode 100644 index e638d1a..0000000 --- a/src/package/contents/ui/ConfigGeneral.qml +++ /dev/null @@ -1,212 +0,0 @@ -/* - Copyright (c) 2016 Carlos López Sánchez - - 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 3 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 . -*/ - -import QtQuick 2.1 -import QtQuick.Layouts 1.11 -import QtQuick.Controls 1.0 as QtControls - -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.extras 2.0 as PlasmaExtras - -Item { - id: iconsPage - width: childrenRect.width - height: childrenRect.height - implicitWidth: pageColumn.implicitWidth - implicitHeight: pageColumn.implicitHeight - - readonly property int numVisibleButtons: turnOffScreen.checked + leave.checked + lock.checked + switchUser.checked + hibernate.checked + sleep.checked - - property alias cfg_show_turnOffScreen: turnOffScreen.checked - property alias cfg_show_requestShutDown: leave.checked - property alias cfg_lockTurnOffScreen: lockTurnOffScreen.checked - property alias cfg_show_lockScreen: lock.checked - property alias cfg_show_switchUser: switchUser.checked - property alias cfg_show_suspendToDisk: hibernate.checked - property alias cfg_hibernateConfirmation: hibernateConfirmation.checked - property alias cfg_show_suspendToRam: sleep.checked - property alias cfg_sleepConfirmation: sleepConfirmation.checked - - property alias cfg_inlineBestFit: inlineBestFit.checked - property alias cfg_rows: rows.value - property alias cfg_columns: columns.value - - readonly property bool lockScreenEnabled: dataEngine.data["Sleep States"].LockScreen - readonly property bool suspendEnabled: dataEngine.data["Sleep States"].Suspend - readonly property bool hibernateEnabled: dataEngine.data["Sleep States"].Hibernate - - readonly property int defaultLeftMargin: 10 - - PlasmaCore.DataSource { - id: dataEngine - engine: "powermanagement" - connectedSources: ["Sleep States"] - } - - SystemPalette { id: syspal } - - ColumnLayout { - id: pageColumn - - PlasmaExtras.Heading { - text: i18nc("Heading for list of actions (leave, lock, shutdown, ...)", "Actions") - color: syspal.text - level: 2 - } - - Column { - spacing: 5 - - Column { - QtControls.Label { - id: turnOffLabel - text: i18n("Turn off screen") - } - QtControls.CheckBox { - id: turnOffScreen - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Enabled") - enabled: (numVisibleButtons > 1 || !checked) - } - } - Column { - QtControls.Label { - text: i18n("Leave") - } - QtControls.CheckBox { - id: leave - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Enabled") - enabled: iconsPage.lockScreenEnabled && (numVisibleButtons > 1 || !checked) - } - } - Column { - QtControls.Label { - text: i18n("Lock") - } - QtControls.CheckBox { - id: lock - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Enabled") - enabled: numVisibleButtons > 1 || !checked - } - QtControls.CheckBox { - id: lockTurnOffScreen - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Turn off screen when locking") - enabled: lock.checked - } - } - Column { - QtControls.Label { - text: i18n("Switch user") - } - QtControls.CheckBox { - id: switchUser - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Enabled") - enabled: numVisibleButtons > 1 || !checked - } - } - Column { - QtControls.Label { - text: i18n("Hibernate") - } - QtControls.CheckBox { - id: hibernate - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Enabled") - enabled: iconsPage.hibernateEnabled && (numVisibleButtons > 1 || !checked) - } - QtControls.CheckBox { - id: hibernateConfirmation - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Ask for confirmation") - enabled: hibernate.checked - } - } - Column { - QtControls.Label { - text: i18n("Suspend") - } - QtControls.CheckBox { - id: sleep - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Enabled") - enabled: iconsPage.suspendEnabled && (numVisibleButtons > 1 || !checked) - } - QtControls.CheckBox { - id: sleepConfirmation - Layout.alignment : Qt.AlignLeft - Layout.leftMargin: defaultLeftMargin - text: i18n("Ask for confirmation") - enabled: sleep.checked - } - } - } - - PlasmaExtras.Heading { - text: i18nc("Number of rows, columns...","Layout") - color: syspal.text - level: 2 - } - - QtControls.CheckBox { - id: inlineBestFit - text: i18n("Inline best fit") - checked: numVisibleButtons <= 1 - } - - QtControls.SpinBox{ - id: rows - minimumValue: { - var value = 2; - if(numVisibleButtons <= 2 /*&& columns.value > 1*/) { - value = 1 - } - return value - } - maximumValue: Math.ceil(numVisibleButtons / columns.value) - value: cfg_rows - suffix: " " + i18n("rows") - enabled: !inlineBestFit.checked && numVisibleButtons > 1 - } - - QtControls.SpinBox{ - id: columns - minimumValue: { - var value = 2; - if(numVisibleButtons <= 2 /*&& rows.value > 1*/) { - value = 1 - } - return value - } - maximumValue: Math.ceil(numVisibleButtons / rows.value) - value: cfg_columns - suffix: " " + i18n("columns") - enabled: !inlineBestFit.checked && numVisibleButtons > 1 - } - } -} diff --git a/src/package/contents/ui/SystemPanel.qml b/src/package/contents/ui/SystemPanel.qml index eab0200..e46a185 100644 --- a/src/package/contents/ui/SystemPanel.qml +++ b/src/package/contents/ui/SystemPanel.qml @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 @@ -15,7 +15,7 @@ along with this program. If not, see . */ -import QtQuick 2.2 +import QtQuick Item { id: systemPanel diff --git a/src/package/contents/ui/configGeneral.qml b/src/package/contents/ui/configGeneral.qml new file mode 100644 index 0000000..43cb1f9 --- /dev/null +++ b/src/package/contents/ui/configGeneral.qml @@ -0,0 +1,246 @@ +/* + Copyright (c) 2024 Carlos López Sánchez + + 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 3 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 . +*/ + +import QtQuick +import QtQuick.Controls as QtControls +import QtQuick.Layouts + +import org.kde.kirigami as Kirigami +import org.kde.kcmutils as KCM +import org.kde.plasma.private.sessions + +KCM.SimpleKCM { + id: iconsPage + width: childrenRect.width + height: childrenRect.height + implicitWidth: pageColumn.implicitWidth + implicitHeight: pageColumn.implicitHeight + + readonly property int numVisibleButtons: turnOffScreen.checked + shutdown.checked + restart.checked + logout.checked + lock.checked + switchUser.checked + hibernate.checked + sleep.checked + + property alias cfg_show_turnOffScreen: turnOffScreen.checked + property alias cfg_show_requestShutDown: shutdown.checked + property alias cfg_show_requestRestart: restart.checked + property alias cfg_show_requestLogOut: logout.checked + property alias cfg_lockTurnOffScreen: lockTurnOffScreen.checked + property alias cfg_show_lockScreen: lock.checked + property alias cfg_show_switchUser: switchUser.checked + property alias cfg_show_suspendToDisk: hibernate.checked + //TODO: See how to implement a confirmation dialog + // property alias cfg_hibernateConfirmation: hibernateConfirmation.checked + property alias cfg_show_suspendToRam: sleep.checked + //TODO: See how to implement a confirmation dialog + // property alias cfg_sleepConfirmation: sleepConfirmation.checked + + property alias cfg_inlineBestFit: inlineBestFit.checked + property alias cfg_rows: rows.value + property alias cfg_columns: columns.value + + readonly property int defaultLeftPadding: 10 + + SessionManagement { + id: session + } + + SystemPalette { id: syspal } + + ColumnLayout { + id: pageColumn + + Kirigami.Heading { + text: i18nc("Heading for list of actions (leave, lock, shutdown, ...)", "Actions") + color: syspal.text + level: 2 + } + + Grid { + spacing: 5 + columns: 2 + + Column { + QtControls.Label { + id: turnOffLabel + text: i18n("Turn Off Screen") + } + QtControls.CheckBox { + id: turnOffScreen + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: (numVisibleButtons > 1 || !checked) + } + } + Column { + QtControls.Label { + text: i18n("Shut Down") + } + QtControls.CheckBox { + id: shutdown + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canShutdown && (numVisibleButtons > 1 || !checked) + } + } + Column { + QtControls.Label { + text: i18n("Restart") + } + QtControls.CheckBox { + id: restart + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canReboot && (numVisibleButtons > 1 || !checked) + } + } + Column { + QtControls.Label { + text: i18n("Log Out") + } + QtControls.CheckBox { + id: logout + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canLogout && (numVisibleButtons > 1 || !checked) + } + } + Column { + QtControls.Label { + text: i18n("Lock") + } + QtControls.CheckBox { + id: lock + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canLock && (numVisibleButtons > 1 || !checked) + } + QtControls.CheckBox { + id: lockTurnOffScreen + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Turn off screen when locking") + enabled: lock.checked + } + } + Column { + QtControls.Label { + text: i18n("Switch user") + } + QtControls.CheckBox { + id: switchUser + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canSwitchUser && (numVisibleButtons > 1 || !checked) + } + } + Column { + QtControls.Label { + text: i18n("Hibernate") + } + QtControls.CheckBox { + id: hibernate + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canHibernate && (numVisibleButtons > 1 || !checked) + } + //TODO: See how to implement a confirmation dialog + // QtControls.CheckBox { + // id: hibernateConfirmation + // Layout.alignment : Qt.AlignLeft + // leftPadding: defaultLeftPadding + // text: i18n("Ask for confirmation") + // enabled: hibernate.checked + // } + } + Column { + QtControls.Label { + text: i18n("Sleep") + } + QtControls.CheckBox { + id: sleep + Layout.alignment : Qt.AlignLeft + leftPadding: defaultLeftPadding + text: i18n("Enabled") + enabled: session.canSuspend && (numVisibleButtons > 1 || !checked) + } + //TODO: See how to implement a confirmation dialog + // QtControls.CheckBox { + // id: sleepConfirmation + // Layout.alignment : Qt.AlignLeft + // leftPadding: defaultLeftPadding + // text: i18n("Ask for confirmation") + // enabled: sleep.checked + // } + } + } + + Kirigami.Heading { + text: i18nc("Number of rows, columns...","Layout") + color: syspal.text + level: 2 + } + + QtControls.CheckBox { + id: inlineBestFit + text: i18n("Inline best fit") + checked: numVisibleButtons <= 1 + } + + Row { + QtControls.SpinBox{ + id: rows + //TODO: See if there is any case scenario we need to do any maths + from: 1 + // from: { + // var value = 2 + // if(numVisibleButtons <= 2) { + // value = 1 + // } + // return value + // } + to: Math.ceil(numVisibleButtons / columns.value) + value: cfg_rows + enabled: !inlineBestFit.checked && numVisibleButtons > 1 + } + QtControls.Label { + leftPadding: 5 + topPadding: 5 + text: i18n("rows") + } + } + + Row { + QtControls.SpinBox{ + id: columns + to: Math.ceil(numVisibleButtons / rows.value) + value: cfg_columns + enabled: !inlineBestFit.checked && numVisibleButtons > 1 + } + QtControls.Label { + leftPadding: 5 + topPadding: 5 + text: i18n("columns") + } + } + + } +} diff --git a/src/package/contents/ui/ConfigIconSettings.qml b/src/package/contents/ui/configIconSettings.qml similarity index 74% rename from src/package/contents/ui/ConfigIconSettings.qml rename to src/package/contents/ui/configIconSettings.qml index 844cc4a..455314c 100644 --- a/src/package/contents/ui/ConfigIconSettings.qml +++ b/src/package/contents/ui/configIconSettings.qml @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 @@ -15,24 +15,24 @@ along with this program. If not, see . */ -import QtQuick 2.1 -import QtQuick.Controls 1.1 as QtControls -import QtQuick.Dialogs 1.3 -import QtQuick.Layouts 1.11 +import QtQuick +import QtQuick.Controls +import QtQuick.Dialogs +import Qt.labs.platform +import QtQuick.Layouts -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 -import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.kcmutils as KCM +import org.kde.kirigami as Kirigami import "../code/data.js" as Data - -Item { - readonly property int defaultIconSize: 64 + +KCM.SimpleKCM { + readonly property int defaultIconSize: 48 property var selectedIcon property var selectedIconData property alias cfg_layoutData : cfgStore.text - QtControls.Label { + Label { id : cfgStore text : cfg_layoutData visible: false @@ -44,14 +44,14 @@ Item { nameFilters: [i18n("Icons only (*.svg *.png *.jpg *.jpeg)"), i18n("All files (*)")] onAccepted: { if(selectedIcon){ - console.log("Chosen file icon is", fileDialog.fileUrl.toString()) - var icon = getIconName(fileDialog.fileUrl) - selectedIcon.iconSource = icon + console.log("Chosen file icon is", fileDialog.file.toString()) + var icon = getIconName(fileDialog.file) + selectedIcon.icon.name = icon selectedIcon = null - + Data.store.updateOperationIcon(selectedIconData.operation, icon) selectedIconData = null - + var json = Data.store.getBasicJsonData() cfgStore.text = json } @@ -68,63 +68,65 @@ Item { ColumnLayout { - PlasmaExtras.Heading { + Kirigami.Heading { text: i18n("Customize & rearrange icons") color: syspal.text level: 2 } - - QtControls.Label { + + Label { text: i18nc("Actions for the available radio buttons","Action:") } - QtControls.ExclusiveGroup { + ButtonGroup { id: actionRadioGroup - } - QtControls.RadioButton { + } + RadioButton { id: rearrangeIconsAction Layout.alignment : Qt.AlignLeft Layout.leftMargin: 10 text: i18n("Rearrange icons") checked: true - exclusiveGroup: actionRadioGroup + ButtonGroup.group: actionRadioGroup } - QtControls.RadioButton { + RadioButton { id: changeSystemIconsAction Layout.alignment : Qt.AlignLeft Layout.leftMargin: 10 text: i18n("Change icons with system icons (recommended)") - exclusiveGroup: actionRadioGroup + ButtonGroup.group: actionRadioGroup onClicked: uncheckToolButtons() } - QtControls.RadioButton { + RadioButton { id: changeUserIconsAction Layout.alignment : Qt.AlignLeft Layout.leftMargin: 10 text: i18n("Change icons with user-defined icons") - exclusiveGroup: actionRadioGroup + ButtonGroup.group: actionRadioGroup onClicked: uncheckToolButtons() } Row { ToolButton { - id:arrowLeft - iconSource: "arrow-left" - width: defaultIconSize - height: defaultIconSize - tooltip: i18n("Move icon to the left") + id: arrowLeft + icon.name: "arrow-left" + icon.width: defaultIconSize + icon.height: defaultIconSize + ToolTip.visible: hovered + ToolTip.text: i18n("Move icon to the left") enabled: false onClicked: moveIcon("LEFT") } - + Repeater { - id:iconList + id: iconList model: Data.store.getConfigData() delegate: ToolButton { - iconSource: modelData.icon + icon.name: modelData.icon checkable: rearrangeIconsAction.checked - width: defaultIconSize - height: defaultIconSize - tooltip: { + icon.width: defaultIconSize + icon.height: defaultIconSize + ToolTip.visible: hovered + ToolTip.text: { return rearrangeIconsAction.checked ? i18n("Click to select and move icon") : i18n("Click to change icon") } onClicked: { @@ -137,35 +139,37 @@ Item { } } } - + ToolButton { - id:arrowRight - iconSource: "arrow-right" - width: defaultIconSize - height: defaultIconSize - tooltip: i18n("Move icon to the right") + id: arrowRight + icon.name: "arrow-right" + icon.width: defaultIconSize + icon.height: defaultIconSize + ToolTip.visible: hovered + ToolTip.text: i18n("Move icon to the right") enabled: false onClicked: moveIcon("RIGHT") } } - + ToolButton { id: restore - iconSource: "edit-undo" - width: 90 - height: 48 + icon.name: "edit-undo" + icon.width: 64 + icon.height: 32 + ToolTip.visible: hovered + ToolTip.text: i18n("Reset all current changes to previous values") text: i18n("Reset") - tooltip: i18n("Reset all current changes to previous values") onClicked: restoreDefaults() } } - + function getIconName(icon){ - + if( icon && icon.toString){ icon = icon.toString() } - + if(changeUserIconsAction.checked){ icon = icon.replace("file://", "") } @@ -175,59 +179,60 @@ Item { icon = icon.slice(lastSlashIdx + 1, -4) } } - + return icon } - + function uncheckToolButtons(){ - + if(selectedIcon){ selectedIcon.checked = false selectIcon(selectedIcon) } } - + function chooseIconFile(toolButton, modelData){ - console.log("Clicked on", toolButton.iconSource) + console.log("Clicked on", toolButton.icon.source) selectedIcon = toolButton selectedIconData = modelData - fileDialog.folder = (changeUserIconsAction.checked ? fileDialog.shortcuts.home : "/usr/share/icons") - fileDialog.open(); + fileDialog.folder = (changeUserIconsAction.checked ? StandardPaths.standardLocations(StandardPaths.HomeLocation)[0] : + "file:///usr/share/icons") + fileDialog.open() } - + function selectIcon(toolButton, modelData, index){ - console.log("Clicked on", toolButton.iconSource, "Selected:", toolButton.checked) + console.log("Clicked on", toolButton.icon.source, "Selected:", toolButton.checked) if(selectedIcon && selectedIcon != toolButton){ selectedIcon.checked = false } - + if(toolButton.checked){ selectedIcon = toolButton selectedIconData = modelData updateArrows() - + } else { resetArrows() } } - + function moveIcon(direction){ - + if(selectedIconData){ - var currentPosition = Data.store.getOperationPosition(selectedIconData.operation); + var currentPosition = Data.store.getOperationPosition(selectedIconData.operation) if(currentPosition < iconList.count){ var newPosition = -1 if(direction == "LEFT" && currentPosition > 0){ - newPosition = currentPosition - 1; + newPosition = currentPosition - 1 } else if(direction == "RIGHT" && currentPosition < iconList.count - 1) { - newPosition = currentPosition + 1; + newPosition = currentPosition + 1 } - + if(newPosition > -1){ var success = Data.store.updateOperationPosition(selectedIconData.operation, newPosition) if(success){ @@ -253,22 +258,22 @@ Item { } } } - + function updateArrows(){ - - var currentPosition = Data.store.getOperationPosition(selectedIconData.operation); + + var currentPosition = Data.store.getOperationPosition(selectedIconData.operation) arrowLeft.enabled = (currentPosition > 0) arrowRight.enabled = (currentPosition < iconList.count - 1) } - + function resetArrows(){ - + selectedIcon = null selectedIconData = null arrowLeft.enabled = false arrowRight.enabled = false } - + function restoreDefaults(){ iconList.model = null // Needed to force refresh diff --git a/src/package/contents/ui/main.qml b/src/package/contents/ui/main.qml index e82b4ac..5d43ce7 100644 --- a/src/package/contents/ui/main.qml +++ b/src/package/contents/ui/main.qml @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 @@ -14,19 +14,22 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -import QtQuick 2.1 -import QtQuick.Layouts 1.11 -import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 -import "data.js" as Data - -Item { +import QtQuick +import QtQuick.Dialogs +import QtQuick.Layouts +import org.kde.kirigami as Kirigami +import org.kde.plasma.plasmoid +import org.kde.plasma.core as PlasmaCore +import org.kde.plasma.components +import org.kde.plasma.private.sessions +import "../code/data.js" as Data + +PlasmoidItem { id: root - readonly property int minButtonSize: units.iconSizes.small - readonly property int medButtonSize: units.iconSizes.medium - readonly property int maxButtonSize: units.iconSizes.large + readonly property int minButtonSize: Kirigami.Units.iconSizes.small + readonly property int medButtonSize: Kirigami.Units.iconSizes.medium + readonly property int maxButtonSize: Kirigami.Units.iconSizes.large Layout.minimumWidth: minButtonSize * itemGrid.columns Layout.minimumHeight: minButtonSize * itemGrid.rows @@ -36,7 +39,7 @@ Item { readonly property int iconSize: { var value = 0 - if(plasmoid.formFactor != PlasmaCore.Types.Vertical){ + if(Plasmoid.formFactor != PlasmaCore.Types.Vertical){ value = height / itemGrid.rows } else { @@ -53,13 +56,12 @@ Item { Layout.preferredWidth: (iconSize * itemGrid.columns) Layout.preferredHeight: (iconSize * itemGrid.rows) - Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation - - PlasmaCore.DataSource { - id: dataEngine - engine: "powermanagement" - connectedSources: ["Sleep States","PowerDevil"] + preferredRepresentation: fullRepresentation + + SessionManagement { + id: session } + Grid { id: itemGrid @@ -67,10 +69,10 @@ Item { readonly property int numVisibleButtons: (visibleChildren.length - 1) rows: { - var value = plasmoid.configuration.rows - if(plasmoid.configuration.inlineBestFit){ - if(plasmoid.formFactor != PlasmaCore.Types.Vertical){ - value = 1; + var value = Plasmoid.configuration.rows + if(Plasmoid.configuration.inlineBestFit){ + if(Plasmoid.formFactor != PlasmaCore.Types.Vertical){ + value = 1 } else { value = numVisibleButtons @@ -80,10 +82,10 @@ Item { return value } columns: { - var value = plasmoid.configuration.columns - if(plasmoid.configuration.inlineBestFit){ - if(plasmoid.formFactor === PlasmaCore.Types.Vertical){ - value = 1; + var value = Plasmoid.configuration.columns + if(Plasmoid.configuration.inlineBestFit){ + if(Plasmoid.formFactor === PlasmaCore.Types.Vertical){ + value = 1 } else { value = numVisibleButtons @@ -103,10 +105,10 @@ Item { property int iconSize: Math.min(itemWidth, itemHeight) model: Data.store.getConfigData() - PlasmaCore.IconItem { + Kirigami.Icon { id: iconButton - visible: { - var value = plasmoid.configuration["show_" + modelData.operation] && (!modelData.hasOwnProperty("requires") || dataEngine.data["Sleep States"][modelData.requires]) + visible: { + var value = Plasmoid.configuration["show_" + modelData.configKey] && (!modelData.hasOwnProperty("requires") || session[modelData.requires]) console.log(modelData.operation,"visible=", value) return value @@ -133,78 +135,99 @@ Item { } } - Component { - id: hibernateDialogComponent - QueryDialog { - titleIcon: "system-suspend-hibernate" - titleText: i18n("Hibernate") - message: i18n("Do you want to suspend to disk (hibernate)?") - location: plasmoid.location - - acceptButtonText: i18n("Yes") - rejectButtonText: i18n("No") - - onAccepted: performOperation("suspendToDisk") - } - } - property QueryDialog hibernateDialog - - Component { - id: sleepDialogComponent - QueryDialog { - titleIcon: "system-suspend" - titleText: i18n("Suspend") - message: i18n("Do you want to suspend to RAM (sleep)?") - location: plasmoid.location - - acceptButtonText: i18n("Yes") - rejectButtonText: i18n("No") - - onAccepted: performOperation("suspendToRam") - } - } - property QueryDialog sleepDialog + //TODO: See how to implement a confirmation dialog + // MessageDialog { + // id: hibernateDialogComponent + // text: qsTr("The document has been modified.") + // informativeText: qsTr("Do you want to save your changes?") + // buttons: MessageDialog.Yes | MessageDialog.No + // onButtonClicked: function (button, role) { + // switch (button) { + // case MessageDialog.Yes: + // console.log("Clicked on YES button!") + // performOperation("suspendToDisk") + // break + // } + // } + // } + // property MessageDialog hibernateDialog + + //TODO: See how to implement a confirmation dialog + // MessageDialog { + // id: sleepDialogComponent + // text: i18n("Suspend") + // informativeText: i18n("Do you want to suspend to RAM (sleep)?") + // buttons: MessageDialog.Yes | MessageDialog.No + // onButtonClicked: function (button, role) { + // switch (button) { + // case MessageDialog.Yes: + // console.log("SUSPEND - Clicked on YES button!") + // performOperation("suspendToRam") + // break + // } + // } + // } + // property MessageDialog sleepDialog + + //TODO: Clean up + // Component { + // id: hibernateDialogComponent + // QueryDialog { + // titleIcon: "system-suspend-hibernate" + // titleText: i18n("Hibernate") + // message: i18n("Do you want to suspend to disk (hibernate)?") + // location: Plasmoid.location + + // acceptButtonText: i18n("Yes") + // rejectButtonText: i18n("No") + + // onAccepted: performOperation("suspendToDisk") + // } + // } + // property QueryDialog hibernateDialog + + // Component { + // id: sleepDialogComponent + // QueryDialog { + // titleIcon: "system-suspend" + // titleText: i18n("Suspend") + // message: i18n("Do you want to suspend to RAM (sleep)?") + // location: Plasmoid.location + + // acceptButtonText: i18n("Yes") + // rejectButtonText: i18n("No") + + // onAccepted: performOperation("suspendToRam") + // } + // } + // property QueryDialog sleepDialog SystemPanel { id: systemPanel } - function clickHandler(what, button) { - if (what == "suspendToDisk" && plasmoid.configuration.hibernateConfirmation) { - if (!hibernateDialog) { - hibernateDialog = hibernateDialogComponent.createObject(itemGrid); - } - hibernateDialog.visualParent = button - hibernateDialog.open() + function clickHandler(operation, button) { + //TODO: See how to implement a confirmation dialog + // if (operation === "suspendToDisk" && Plasmoid.configuration.hibernateConfirmation) { + // hibernateDialogComponent.open() - } else if (what == "suspendToRam" && plasmoid.configuration.sleepConfirmation){ - if (!sleepDialog) { - sleepDialog = sleepDialogComponent.createObject(itemGrid); - } - sleepDialog.visualParent = button - sleepDialog.open() + // } else if (operation === "suspendToRam" && Plasmoid.configuration.sleepConfirmation){ + // sleepDialogComponent.open() - } else if (what == "turnOffScreen") { - systemPanel.turnOffScreen(); + // } else if (operation === "turnOffScreen") { + if (operation === "turnOffScreen") { + systemPanel.turnOffScreen() } else { - performOperation(what) + performOperation(operation) } } - function performOperation(what) { - - var service = dataEngine.serviceForSource("PowerDevil"); - var operation = service.operationDescription(what); - var serviceJob = service.startOperationCall(operation); - serviceJob.finished.connect(result); - } - - function result(job) { - - console.log("ServiceJob result=", job.result, "operationName=", job.operationName); + function performOperation(operation) { + console.log("performOperation - operation=", operation) + session[operation]() - if(job.operationName == "lockScreen" && plasmoid.configuration.lockTurnOffScreen){ + if(operation == "lock" && Plasmoid.configuration.lockTurnOffScreen){ systemPanel.turnOffScreen() } } diff --git a/src/package/metadata.json b/src/package/metadata.json new file mode 100644 index 0000000..48d60f2 --- /dev/null +++ b/src/package/metadata.json @@ -0,0 +1,32 @@ +{ + "KPlugin": { + "Authors": [ + { + "Email": "", + "Name": "Carlos López Sánchez" + } + ], + "Category": "Utilities", + "Description": "Applet for KDE Plasma 6 that displays a panel with a set of system actions", + "Description[es]": "Applet para KDE Plasma 6 que muestra un panel con acciones de sistema", + "Description[fr]": "Applet Plasma6 qui affiche un ensemble d'actions système", + "Description[nl]": "Plasma6-widget die een paneel bevat met systeemacties", + "EnabledByDefault": true, + "Icon": "system-shutdown", + "Id": "org.kde.plasma.systempanel", + "License": "GPL3", + "Name": "System panel", + "Name[es]": "Panel de sistema", + "Name[fr]": "Panneau système", + "Name[nl]": "Systeemactiepaneel", + "ServiceTypes": [ + "Plasma/Applet" + ], + "Version": "2.0", + "Website": "https://github.com/Musikolo" + }, + "X-Plasma-API-Minimum-Version": "6.0", + "X-Plasma-Requires-FileDialog": "Unused", + "X-Plasma-Requires-LaunchApp": "Unused", + "X-Plasma-StandAloneApp": true +} diff --git a/src/plugin/CMakeLists.txt b/src/plugin/CMakeLists.txt index 9929bec..762d34b 100644 --- a/src/plugin/CMakeLists.txt +++ b/src/plugin/CMakeLists.txt @@ -4,9 +4,8 @@ set(plasmoidplugin_SRCS ) add_library(plasmoidplugin SHARED ${plasmoidplugin_SRCS}) +target_link_libraries(plasmoidplugin Qt6::Quick) -target_link_libraries(plasmoidplugin Qt5::Quick KF5::Plasma) +install(TARGETS plasmoidplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/private/systempanel) -install(TARGETS plasmoidplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/private/systempanel) - -install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/private/systempanel) +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/private/systempanel) diff --git a/src/plugin/plasmoidplugin.cpp b/src/plugin/plasmoidplugin.cpp index 155b7b8..4357568 100644 --- a/src/plugin/plasmoidplugin.cpp +++ b/src/plugin/plasmoidplugin.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 @@ -23,7 +23,7 @@ void PlasmoidPlugin::registerTypes(const char *uri) { - Q_ASSERT(uri == QLatin1String("org.kde.private.systempanel")); + Q_ASSERT(uri == QLatin1String("org.kde.private.systempanel").data()); qmlRegisterType(uri, 1, 0, "SystemPanel"); } diff --git a/src/plugin/plasmoidplugin.h b/src/plugin/plasmoidplugin.h index 7cfbf98..48c6f2d 100644 --- a/src/plugin/plasmoidplugin.h +++ b/src/plugin/plasmoidplugin.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 diff --git a/src/plugin/systempanel.cpp b/src/plugin/systempanel.cpp index 62bdc8e..f385aed 100644 --- a/src/plugin/systempanel.cpp +++ b/src/plugin/systempanel.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 @@ -25,7 +25,11 @@ SystemPanel::~SystemPanel() { int SystemPanel::turnOffScreen(){ - const int result = system("/usr/bin/xset dpms force off"); + //TODO: For wayland we need sleep 0.5 && qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut "Turn Off Screen" + //TODO: We can also use kscreen-doctor --dpms off or implment integration with libkscreen + // const int result = system("/usr/bin/xset dpms force off"); + const int result = system("/usr/bin/kscreen-doctor --dpms off"); + // const int result = system("qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut \"Turn Off Screen\""); return result; } diff --git a/src/plugin/systempanel.h b/src/plugin/systempanel.h index 1219176..b884369 100644 --- a/src/plugin/systempanel.h +++ b/src/plugin/systempanel.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2016 Carlos López Sánchez + Copyright (c) 2024 Carlos López Sánchez 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 diff --git a/src/translations/CMakeLists.txt b/src/translations/CMakeLists.txt index 6f74a17..caf6be2 100644 --- a/src/translations/CMakeLists.txt +++ b/src/translations/CMakeLists.txt @@ -1,5 +1,5 @@ FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt) - + IF(NOT GETTEXT_MSGFMT_EXECUTABLE) MESSAGE( "------ @@ -25,7 +25,14 @@ ELSE(NOT GETTEXT_MSGFMT_EXECUTABLE) ADD_CUSTOM_COMMAND(TARGET translations COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_gmoFile} ${_poFile} DEPENDS ${_poFile}) - INSTALL(FILES ${_gmoFile} DESTINATION ${LOCALE_INSTALL_DIR}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo) + #TODO: Find a better locale variable + # message(STATUS "Install directory LOCALE_INSTALL_DIR=${LOCALE_INSTALL_DIR}") + # INSTALL(FILES ${_gmoFile} DESTINATION ${LOCALE_INSTALL_DIR}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo) + # message(STATUS "Install directory DATAROOTDIR=${DATAROOTDIR}") + # message(STATUS "Install directory LOCALEDIR=${LOCALEDIR}") + # INSTALL(FILES ${_gmoFile} DESTINATION ${LOCALEDIR}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo) + message(STATUS "Install Locale ${CMAKE_INSTALL_PREFIX}/share/locale/${_langCode}") + INSTALL(FILES ${_gmoFile} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo) ENDIF( _langCode ) ENDFOREACH(_poFile ${PO_FILES}) diff --git a/src/translations/TRANSLATORS.REAME b/src/translations/TRANSLATORS.REAME deleted file mode 100644 index b03b340..0000000 --- a/src/translations/TRANSLATORS.REAME +++ /dev/null @@ -1,36 +0,0 @@ -------------------------- -Translation instructions: -------------------------- - -1.- Copy the systempanel.pot file (language catalog template) as - .po. For instance: fr.po for French, it.po Italian - and so on. - -2.- Open .po file with Lokalize (http://userbase.kde.org/Lokalize) - -3.- Then, you'll need to translate each label into your language. You must - be very careful not to remove numbers starting with %, like %1, %2, as - they are parameters for the labels. For instance, the label "Hello %1!" - might be printed like "Hello John!", if the user happens to be named so. - You must be also careful with HTML tags like something. Finally, - you will be provided with a context to let you know what %1 is referred to - when considered appropriate. - -4.- Save your translation file. - -5.- Open the metadata.desktop file and you'll find a couple of lines like the following: - - Name=System panel - Comment=Plasma5 applet that displays a panel with a set of system actions - - Then, add your language in the same way as it has been done for other languages such as: - - Name[es]=Panel de sistema - Name[fr]=Panneau système - Comment[es]=Plasma5 applet que muestra un panel con acciones de sistema - Comment[fr]=Applet Plasma5 qui affiche un ensemble d'actions système - -6.- Save it all and send it to musikolo[AT]hotmail{DOT}com, where - [AT] is '@' character and {DOT} is '.' character. - -Thanks a lot for your contribution! diff --git a/src/translations/TRANSLATORS.REAME.md b/src/translations/TRANSLATORS.REAME.md new file mode 100644 index 0000000..471335b --- /dev/null +++ b/src/translations/TRANSLATORS.REAME.md @@ -0,0 +1,35 @@ +# How to support a new language +If you want to incorporate a new language, all you need to do is to follow the next simple steps: + +1.- Copy the `systempanel.pot` file (language catalog template) as + ``.po. For instance: `fr.po` for French, `it.po` Italian + and so on. + +2.- Open `.po` file with Lokalize (http://userbase.kde.org/Lokalize) + +3.- Then, you'll need to translate each label into your language. You must + be very careful not to remove numbers starting with %, like `%1`, `%2`, as + they represent parameters for the labels. For instance, the label `"Hello %1!"` + might be printed like `"Hello John!"`, if the user happens to be named so. + You must also be careful with HTML tags like `something`. Finally, + you will be provided with a context to let you know what `%1` is referred to + when considered appropriate. + +4.- Save your translation file. + +5.- Open the file `src/package/metadata.desktop` and you'll find a couple of lines like the following: + + Name=System panel + Comment=Applet for KDE Plasma 6 that displays a panel with a set of system actions + +Then, add your language in the same way as it has been done for other languages such as: + + Name[es]=Panel de sistema + Name[fr]=Panneau système + Comment[es]=Applet para KDE Plasma 6 que muestra un panel con acciones de sistema + Comment[fr]=Applet pour KDE Plasma 6 qui affiche un ensemble d'actions système + +6.- Once all changes are saved, you can either create pull request or send it to musikolo[AT]hotmail{DOT}com, where + [AT] is '@' character and {DOT} is '.' character. + +Thanks a lot for your contribution! \ No newline at end of file diff --git a/src/translations/es.po b/src/translations/es.po index b1a84e6..65dbe65 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -1,14 +1,14 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Carlos López Sánchez , 2016. +# SPDX-FileCopyrightText: 2016, 2024 Carlos López Sánchez msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php/plasma5-applets-sys" "tem-panel?content=175309\n" -"POT-Creation-Date: 2016-04-13 22:58-0500\n" -"PO-Revision-Date: 2016-04-13 23:15-0600\n" +"POT-Creation-Date: 2024-06-23 00:21-0500\n" +"PO-Revision-Date: 2024-06-23 00:27-0500\n" "Last-Translator: Carlos López Sánchez \n" "Language-Team: English \n" "Language: en_US\n" @@ -16,57 +16,71 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 2.0\n" +"X-Generator: Lokalize 24.05.1\n" -#: package/contents/code/data.js:7 +#: package/contents/code/data.js:8 msgid "Standby" msgstr "Reposo " -#: package/contents/code/data.js:8 +#: package/contents/code/data.js:9 msgid "Turn off the monitor to save energy" msgstr "Apagar el monitor para ahorrar energía" -#: package/contents/code/data.js:12 package/contents/ui/ConfigGeneral.qml:99 +#: package/contents/code/data.js:15 package/contents/ui/configGeneral.qml:125 msgid "Lock" msgstr "Bloquear" -#: package/contents/code/data.js:13 +#: package/contents/code/data.js:16 msgid "Lock the screen" msgstr "Bloquear la pantalla" -#: package/contents/code/data.js:18 package/contents/ui/ConfigGeneral.qml:118 +#: package/contents/code/data.js:23 package/contents/ui/configGeneral.qml:144 msgid "Switch user" msgstr "Cambiar de usuario" -#: package/contents/code/data.js:19 +#: package/contents/code/data.js:24 msgid "Start a parallel session as a different user" msgstr "Iniciar sesión en paralelo con un usuario diferente" -#: package/contents/code/data.js:23 -msgid "Leave..." -msgstr "Salir..." +#: package/contents/code/data.js:31 package/contents/ui/configGeneral.qml:89 +msgid "Shut Down" +msgstr "Apagar" -#: package/contents/code/data.js:24 -msgid "Log out, turn off or restart the computer" -msgstr "Cerrar sesión, apagar o reiniciar el equipo" +#: package/contents/code/data.js:32 +msgid "Turn off the computer" +msgstr "Apagar el equipo" + +#: package/contents/code/data.js:39 package/contents/ui/configGeneral.qml:101 +msgid "Restart" +msgstr "Reiniciar" + +#: package/contents/code/data.js:40 +msgid "Reboot the computer" +msgstr "Reiniciar el equipo" + +#: package/contents/code/data.js:47 package/contents/ui/configGeneral.qml:113 +msgid "Log Out" +msgstr "Salir" -#: package/contents/code/data.js:28 package/contents/ui/ConfigGeneral.qml:149 -#: package/contents/ui/main.qml:156 -msgid "Suspend" -msgstr "Suspender" +#: package/contents/code/data.js:48 +msgid "Log out the computer" +msgstr "Cerrar sesión del equipo" -#: package/contents/code/data.js:29 -msgid "Sleep (suspend to RAM)" +#: package/contents/code/data.js:55 package/contents/ui/configGeneral.qml:176 +msgid "Sleep" +msgstr "Dormir" + +#: package/contents/code/data.js:56 +msgid "Suspend to RAM" msgstr "Suspender en memoria" -#: package/contents/code/data.js:34 package/contents/ui/ConfigGeneral.qml:130 -#: package/contents/ui/main.qml:140 +#: package/contents/code/data.js:63 package/contents/ui/configGeneral.qml:156 msgid "Hibernate" msgstr "Hibernar" -#: package/contents/code/data.js:35 -msgid "Hibernate (suspend to disk)" -msgstr "Hibernar (suspender en disco)" +#: package/contents/code/data.js:64 +msgid "Suspend to disk" +msgstr "Suspender en disco" #: package/contents/config/config.qml:24 msgid "General" @@ -77,126 +91,103 @@ msgctxt "Icon and location of the icon of each action" msgid "Icon settings" msgstr "Configurar iconos" -#: package/contents/ui/ConfigGeneral.qml:64 +#: package/contents/ui/configGeneral.qml:65 msgctxt "Heading for list of actions (leave, lock, shutdown, ...)" msgid "Actions" msgstr "Acciones" -#: package/contents/ui/ConfigGeneral.qml:75 -msgid "Turn off screen" +#: package/contents/ui/configGeneral.qml:77 +msgid "Turn Off Screen" msgstr "Apagar la pantalla" -#: package/contents/ui/ConfigGeneral.qml:81 -#: package/contents/ui/ConfigGeneral.qml:93 -#: package/contents/ui/ConfigGeneral.qml:105 -#: package/contents/ui/ConfigGeneral.qml:124 -#: package/contents/ui/ConfigGeneral.qml:136 -#: package/contents/ui/ConfigGeneral.qml:155 +#: package/contents/ui/configGeneral.qml:83 +#: package/contents/ui/configGeneral.qml:95 +#: package/contents/ui/configGeneral.qml:107 +#: package/contents/ui/configGeneral.qml:119 +#: package/contents/ui/configGeneral.qml:131 +#: package/contents/ui/configGeneral.qml:150 +#: package/contents/ui/configGeneral.qml:162 +#: package/contents/ui/configGeneral.qml:182 msgid "Enabled" msgstr "Habilitar" -#: package/contents/ui/ConfigGeneral.qml:87 -msgid "Leave" -msgstr "Salir" - -#: package/contents/ui/ConfigGeneral.qml:112 +#: package/contents/ui/configGeneral.qml:138 msgid "Turn off screen when locking" msgstr "Apagar la pantalla" -#: package/contents/ui/ConfigGeneral.qml:143 -#: package/contents/ui/ConfigGeneral.qml:162 -msgid "Ask for confirmation" -msgstr "Solicitar confirmación" - -#: package/contents/ui/ConfigGeneral.qml:169 +#: package/contents/ui/configGeneral.qml:197 msgctxt "Number of rows, columns..." msgid "Layout" msgstr "Disposición" -#: package/contents/ui/ConfigGeneral.qml:176 +#: package/contents/ui/configGeneral.qml:204 msgid "Inline best fit" msgstr "Mejor ajuste en línea" -#: package/contents/ui/ConfigGeneral.qml:191 +#: package/contents/ui/configGeneral.qml:227 msgid "rows" msgstr "filas" -#: package/contents/ui/ConfigGeneral.qml:206 +#: package/contents/ui/configGeneral.qml:250 msgid "columns" msgstr "columnas" -#: package/contents/ui/ConfigIconSettings.qml:43 +#: package/contents/ui/configIconSettings.qml:43 msgid "Please choose a file" msgstr "Por favor, seleccione un fichero" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "Icons only (*.svg *.png *.jpg *.jpeg)" msgstr "Sólo iconos (*.svg *.png *.jpg *.jpeg)" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "All files (*)" msgstr "Todos los ficheros (*)" -#: package/contents/ui/ConfigIconSettings.qml:70 +#: package/contents/ui/configIconSettings.qml:72 msgid "Customize & rearrange icons" msgstr "Personalizar y reubicar iconos" -#: package/contents/ui/ConfigIconSettings.qml:76 +#: package/contents/ui/configIconSettings.qml:78 msgctxt "Actions for the available radio buttons" msgid "Action:" msgstr "Acciones:" -#: package/contents/ui/ConfigIconSettings.qml:85 +#: package/contents/ui/configIconSettings.qml:87 msgid "Rearrange icons" msgstr "Reubicar iconos" -#: package/contents/ui/ConfigIconSettings.qml:93 +#: package/contents/ui/configIconSettings.qml:95 msgid "Change icons with system icons (recommended)" msgstr "Cambiar los iconos con iconos de sistema (recomendado)" -#: package/contents/ui/ConfigIconSettings.qml:101 +#: package/contents/ui/configIconSettings.qml:103 msgid "Change icons with user-defined icons" msgstr "Cambiar los iconos con iconos de usuario" -#: package/contents/ui/ConfigIconSettings.qml:112 +#: package/contents/ui/configIconSettings.qml:115 msgid "Move icon to the left" msgstr "Mover icono a la izquierda" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to select and move icon" msgstr "Haga clic para seleccionar y mover un icono" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to change icon" msgstr "Haga clic para cambiar un icono" -#: package/contents/ui/ConfigIconSettings.qml:144 +#: package/contents/ui/configIconSettings.qml:149 msgid "Move icon to the right" msgstr "Mover icono a la derecha" -#: package/contents/ui/ConfigIconSettings.qml:155 -msgid "Reset" -msgstr "Restablecer" - -#: package/contents/ui/ConfigIconSettings.qml:156 +#: package/contents/ui/configIconSettings.qml:161 msgid "Reset all current changes to previous values" msgstr "Restablecer todos los cambios actuales por los valores predeterminados" -#: package/contents/ui/main.qml:141 -msgid "Do you want to suspend to disk (hibernate)?" -msgstr "¿Quiere hibernar el equipo (suspender en disco)?" - -#: package/contents/ui/main.qml:144 package/contents/ui/main.qml:160 -msgid "Yes" -msgstr "Sí" - -#: package/contents/ui/main.qml:145 package/contents/ui/main.qml:161 -msgid "No" -msgstr "No" - -#: package/contents/ui/main.qml:157 -msgid "Do you want to suspend to RAM (sleep)?" -msgstr "¿Quiere suspender el equipo en memoria?" +#: package/contents/ui/configIconSettings.qml:162 +msgid "Reset" +msgstr "Restablecer" #: translations/rc.cpp:1 rc.cpp:1 msgctxt "NAME OF TRANSLATORS" @@ -213,5 +204,30 @@ msgctxt "HOMEPAGE OF TRANSLATORS" msgid "Your homepages" msgstr "https://github.com/Musikolo" +#~ msgid "Leave..." +#~ msgstr "Salir..." + +#~ msgid "Suspend" +#~ msgstr "Suspender" + +#~ msgid "Leave" +#~ msgstr "Salir" + +#~ msgid "Ask for confirmation" +#~ msgstr "Solicitar confirmación" + +#~ msgid "Do you want to suspend to disk (hibernate)?" +#~ msgstr "¿Quiere hibernar el equipo (suspender en disco)?" + +#~ msgid "Yes" +#~ msgstr "Sí" + +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "Do you want to suspend to RAM (sleep)?" +#~ msgstr "¿Quiere suspender el equipo en memoria?" + #~ msgid "Switch User" #~ msgstr "Cambiar usuario" + diff --git a/src/translations/fr.po b/src/translations/fr.po index 3450577..1e4acbd 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: plasma5-applets-system-panel\n" -"Report-Msgid-Bugs-To: http://kde-look.org/content/show.php/plasma5-applets-sys" -"tem-panel?content=175309\n" -"POT-Creation-Date: 2016-04-13 22:58-0500\n" +"Report-Msgid-Bugs-To: http://kde-look.org/content/show.php/plasma5-applets-" +"system-panel?content=175309\n" +"POT-Creation-Date: 2024-06-23 00:21-0500\n" "PO-Revision-Date: 2016-04-13 23:05-0600\n" "Last-Translator: Carlos López Sánchez \n" "Language-Team: Spanish \n" @@ -20,54 +20,72 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 2.0\n" -#: package/contents/code/data.js:7 +#: package/contents/code/data.js:8 msgid "Standby" msgstr "En attente" -#: package/contents/code/data.js:8 +#: package/contents/code/data.js:9 msgid "Turn off the monitor to save energy" msgstr "Eteindre l'écran pour économiser l'énergie" -#: package/contents/code/data.js:12 package/contents/ui/ConfigGeneral.qml:99 +#: package/contents/code/data.js:15 package/contents/ui/configGeneral.qml:125 msgid "Lock" msgstr "Verrouiller" -#: package/contents/code/data.js:13 +#: package/contents/code/data.js:16 msgid "Lock the screen" msgstr "Verrouiller l'écran" -#: package/contents/code/data.js:18 package/contents/ui/ConfigGeneral.qml:118 +#: package/contents/code/data.js:23 package/contents/ui/configGeneral.qml:144 msgid "Switch user" msgstr "Changer d'utilisateur" -#: package/contents/code/data.js:19 +#: package/contents/code/data.js:24 msgid "Start a parallel session as a different user" msgstr "Démarre une session parallèle en tant qu'utilisateur différent" -#: package/contents/code/data.js:23 -msgid "Leave..." -msgstr "Quitter" +#: package/contents/code/data.js:31 package/contents/ui/configGeneral.qml:89 +msgid "Shut Down" +msgstr "" + +#: package/contents/code/data.js:32 +#, fuzzy +msgid "Turn off the computer" +msgstr "Déconnecter, éteindre ou redémarrer l'ordinateur" -#: package/contents/code/data.js:24 -msgid "Log out, turn off or restart the computer" +#: package/contents/code/data.js:39 package/contents/ui/configGeneral.qml:101 +msgid "Restart" +msgstr "" + +#: package/contents/code/data.js:40 +msgid "Reboot the computer" +msgstr "" + +#: package/contents/code/data.js:47 package/contents/ui/configGeneral.qml:113 +msgid "Log Out" +msgstr "" + +#: package/contents/code/data.js:48 +#, fuzzy +msgid "Log out the computer" msgstr "Déconnecter, éteindre ou redémarrer l'ordinateur" -#: package/contents/code/data.js:28 package/contents/ui/ConfigGeneral.qml:149 -#: package/contents/ui/main.qml:156 -msgid "Suspend" -msgstr "Passer en veille" +#: package/contents/code/data.js:55 package/contents/ui/configGeneral.qml:176 +msgid "Sleep" +msgstr "" -#: package/contents/code/data.js:29 -msgid "Sleep (suspend to RAM)" +#: package/contents/code/data.js:56 +#, fuzzy +msgid "Suspend to RAM" msgstr "En veille (mettre en veille)" -#: package/contents/code/data.js:34 package/contents/ui/ConfigGeneral.qml:130 -#: package/contents/ui/main.qml:140 +#: package/contents/code/data.js:63 package/contents/ui/configGeneral.qml:156 msgid "Hibernate" msgstr "Veille prolongée" -#: package/contents/code/data.js:35 -msgid "Hibernate (suspend to disk)" +#: package/contents/code/data.js:64 +#, fuzzy +msgid "Suspend to disk" msgstr "Veille prolongée (mettre en veille prolongée)" #: package/contents/config/config.qml:24 @@ -79,126 +97,104 @@ msgctxt "Icon and location of the icon of each action" msgid "Icon settings" msgstr "Configuration des icônes" -#: package/contents/ui/ConfigGeneral.qml:64 +#: package/contents/ui/configGeneral.qml:65 msgctxt "Heading for list of actions (leave, lock, shutdown, ...)" msgid "Actions" msgstr "Actions" -#: package/contents/ui/ConfigGeneral.qml:75 -msgid "Turn off screen" +#: package/contents/ui/configGeneral.qml:77 +#, fuzzy +msgid "Turn Off Screen" msgstr "Éteindre l'écran" -#: package/contents/ui/ConfigGeneral.qml:81 -#: package/contents/ui/ConfigGeneral.qml:93 -#: package/contents/ui/ConfigGeneral.qml:105 -#: package/contents/ui/ConfigGeneral.qml:124 -#: package/contents/ui/ConfigGeneral.qml:136 -#: package/contents/ui/ConfigGeneral.qml:155 +#: package/contents/ui/configGeneral.qml:83 +#: package/contents/ui/configGeneral.qml:95 +#: package/contents/ui/configGeneral.qml:107 +#: package/contents/ui/configGeneral.qml:119 +#: package/contents/ui/configGeneral.qml:131 +#: package/contents/ui/configGeneral.qml:150 +#: package/contents/ui/configGeneral.qml:162 +#: package/contents/ui/configGeneral.qml:182 msgid "Enabled" msgstr "Activé" -#: package/contents/ui/ConfigGeneral.qml:87 -msgid "Leave" -msgstr "Quitter" - -#: package/contents/ui/ConfigGeneral.qml:112 +#: package/contents/ui/configGeneral.qml:138 msgid "Turn off screen when locking" msgstr "Éteindre l'écran lors du verrouillage" -#: package/contents/ui/ConfigGeneral.qml:143 -#: package/contents/ui/ConfigGeneral.qml:162 -msgid "Ask for confirmation" -msgstr "Demander la confirmation" - -#: package/contents/ui/ConfigGeneral.qml:169 +#: package/contents/ui/configGeneral.qml:197 msgctxt "Number of rows, columns..." msgid "Layout" msgstr "Disposition" -#: package/contents/ui/ConfigGeneral.qml:176 +#: package/contents/ui/configGeneral.qml:204 msgid "Inline best fit" msgstr "Ajuster les lignes" -#: package/contents/ui/ConfigGeneral.qml:191 +#: package/contents/ui/configGeneral.qml:227 msgid "rows" msgstr "lignes" -#: package/contents/ui/ConfigGeneral.qml:206 +#: package/contents/ui/configGeneral.qml:250 msgid "columns" msgstr "colonnes" -#: package/contents/ui/ConfigIconSettings.qml:43 +#: package/contents/ui/configIconSettings.qml:43 msgid "Please choose a file" msgstr "Choisissez un fichier" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "Icons only (*.svg *.png *.jpg *.jpeg)" msgstr "N'afficher que les icônes (*.svg *.png *.jpg *.jpeg)" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "All files (*)" msgstr "Tous les fichiers (*)" -#: package/contents/ui/ConfigIconSettings.qml:70 +#: package/contents/ui/configIconSettings.qml:72 msgid "Customize & rearrange icons" msgstr "Personnaliser et réorganiser les icônes" -#: package/contents/ui/ConfigIconSettings.qml:76 +#: package/contents/ui/configIconSettings.qml:78 msgctxt "Actions for the available radio buttons" msgid "Action:" msgstr "Actions" -#: package/contents/ui/ConfigIconSettings.qml:85 +#: package/contents/ui/configIconSettings.qml:87 msgid "Rearrange icons" msgstr "Réorganiser les icônes" -#: package/contents/ui/ConfigIconSettings.qml:93 +#: package/contents/ui/configIconSettings.qml:95 msgid "Change icons with system icons (recommended)" msgstr "Modifier les icônes avec les icônes du système (recommandé)" -#: package/contents/ui/ConfigIconSettings.qml:101 +#: package/contents/ui/configIconSettings.qml:103 msgid "Change icons with user-defined icons" msgstr "Modifier les icônes avec des icônes personnels" -#: package/contents/ui/ConfigIconSettings.qml:112 +#: package/contents/ui/configIconSettings.qml:115 msgid "Move icon to the left" msgstr "Déplacer l'icône vers la gauche" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to select and move icon" msgstr "Cliquer pour choisir et déplacer l'icône" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to change icon" msgstr "Cliquer pour modifier l'icône" -#: package/contents/ui/ConfigIconSettings.qml:144 +#: package/contents/ui/configIconSettings.qml:149 msgid "Move icon to the right" msgstr "Déplacer l'icône vers la droite" -#: package/contents/ui/ConfigIconSettings.qml:155 -msgid "Reset" -msgstr "Réinitialiser" - -#: package/contents/ui/ConfigIconSettings.qml:156 +#: package/contents/ui/configIconSettings.qml:161 msgid "Reset all current changes to previous values" msgstr "Réinitialiser tous les modifications aux valeurs précédentes" -#: package/contents/ui/main.qml:141 -msgid "Do you want to suspend to disk (hibernate)?" -msgstr "Voulez-vous passer en veille prolongée (mode hibernation) ?" - -#: package/contents/ui/main.qml:144 package/contents/ui/main.qml:160 -msgid "Yes" -msgstr "Oui" - -#: package/contents/ui/main.qml:145 package/contents/ui/main.qml:161 -msgid "No" -msgstr "Non" - -#: package/contents/ui/main.qml:157 -msgid "Do you want to suspend to RAM (sleep)?" -msgstr "Voulez-vous passer en veille ?" +#: package/contents/ui/configIconSettings.qml:162 +msgid "Reset" +msgstr "Réinitialiser" #: translations/rc.cpp:1 rc.cpp:1 msgctxt "NAME OF TRANSLATORS" @@ -217,3 +213,26 @@ msgstr "" "http://kde-look.org/content/show.php/plasma5-applets-system-panel?" "content=175309" +#~ msgid "Leave..." +#~ msgstr "Quitter" + +#~ msgid "Suspend" +#~ msgstr "Passer en veille" + +#~ msgid "Leave" +#~ msgstr "Quitter" + +#~ msgid "Ask for confirmation" +#~ msgstr "Demander la confirmation" + +#~ msgid "Do you want to suspend to disk (hibernate)?" +#~ msgstr "Voulez-vous passer en veille prolongée (mode hibernation) ?" + +#~ msgid "Yes" +#~ msgstr "Oui" + +#~ msgid "No" +#~ msgstr "Non" + +#~ msgid "Do you want to suspend to RAM (sleep)?" +#~ msgstr "Voulez-vous passer en veille ?" diff --git a/src/translations/nl.po b/src/translations/nl.po index ad01142..6de53fa 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -8,65 +8,83 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php/plasma5-applets-" "system-panel?content=175309\n" -"POT-Creation-Date: 2016-04-13 22:58-0500\n" +"POT-Creation-Date: 2024-06-23 00:21-0500\n" "PO-Revision-Date: 2019-07-08 12:09+0200\n" +"Last-Translator: Heimen Stoffels \n" "Language-Team: Dutch \n" +"Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.2.3\n" -"Last-Translator: Heimen Stoffels \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: nl_NL\n" -#: package/contents/code/data.js:7 +#: package/contents/code/data.js:8 msgid "Standby" msgstr "Standby" -#: package/contents/code/data.js:8 +#: package/contents/code/data.js:9 msgid "Turn off the monitor to save energy" msgstr "Schakel het scherm uit om stroom te besparen" -#: package/contents/code/data.js:12 package/contents/ui/ConfigGeneral.qml:99 +#: package/contents/code/data.js:15 package/contents/ui/configGeneral.qml:125 msgid "Lock" msgstr "Vergrendelen" -#: package/contents/code/data.js:13 +#: package/contents/code/data.js:16 msgid "Lock the screen" msgstr "Vergrendel het scherm" -#: package/contents/code/data.js:18 package/contents/ui/ConfigGeneral.qml:118 +#: package/contents/code/data.js:23 package/contents/ui/configGeneral.qml:144 msgid "Switch user" msgstr "Andere gebruiker" -#: package/contents/code/data.js:19 +#: package/contents/code/data.js:24 msgid "Start a parallel session as a different user" msgstr "Start een tweede sessie als andere gebruiker" -#: package/contents/code/data.js:23 -msgid "Leave..." -msgstr "Verlaten..." +#: package/contents/code/data.js:31 package/contents/ui/configGeneral.qml:89 +msgid "Shut Down" +msgstr "" -#: package/contents/code/data.js:24 -msgid "Log out, turn off or restart the computer" +#: package/contents/code/data.js:32 +#, fuzzy +msgid "Turn off the computer" msgstr "Afmelden, uitschakelen of opnieuw opstarten" -#: package/contents/code/data.js:28 package/contents/ui/ConfigGeneral.qml:149 -#: package/contents/ui/main.qml:156 -msgid "Suspend" -msgstr "Pauzestand" +#: package/contents/code/data.js:39 package/contents/ui/configGeneral.qml:101 +msgid "Restart" +msgstr "" + +#: package/contents/code/data.js:40 +msgid "Reboot the computer" +msgstr "" + +#: package/contents/code/data.js:47 package/contents/ui/configGeneral.qml:113 +msgid "Log Out" +msgstr "" + +#: package/contents/code/data.js:48 +#, fuzzy +msgid "Log out the computer" +msgstr "Afmelden, uitschakelen of opnieuw opstarten" + +#: package/contents/code/data.js:55 package/contents/ui/configGeneral.qml:176 +msgid "Sleep" +msgstr "" -#: package/contents/code/data.js:29 -msgid "Sleep (suspend to RAM)" +#: package/contents/code/data.js:56 +#, fuzzy +msgid "Suspend to RAM" msgstr "Pauzeren (pauzeren naar RAM)" -#: package/contents/code/data.js:34 package/contents/ui/ConfigGeneral.qml:130 -#: package/contents/ui/main.qml:140 +#: package/contents/code/data.js:63 package/contents/ui/configGeneral.qml:156 msgid "Hibernate" msgstr "Slaapstand" -#: package/contents/code/data.js:35 -msgid "Hibernate (suspend to disk)" +#: package/contents/code/data.js:64 +#, fuzzy +msgid "Suspend to disk" msgstr "Slaapstand (pauzeren naar schijf)" #: package/contents/config/config.qml:24 @@ -78,126 +96,104 @@ msgctxt "Icon and location of the icon of each action" msgid "Icon settings" msgstr "Pictograminstellingen" -#: package/contents/ui/ConfigGeneral.qml:64 +#: package/contents/ui/configGeneral.qml:65 msgctxt "Heading for list of actions (leave, lock, shutdown, ...)" msgid "Actions" msgstr "Acties" -#: package/contents/ui/ConfigGeneral.qml:75 -msgid "Turn off screen" +#: package/contents/ui/configGeneral.qml:77 +#, fuzzy +msgid "Turn Off Screen" msgstr "Scherm uitschakelen" -#: package/contents/ui/ConfigGeneral.qml:81 -#: package/contents/ui/ConfigGeneral.qml:93 -#: package/contents/ui/ConfigGeneral.qml:105 -#: package/contents/ui/ConfigGeneral.qml:124 -#: package/contents/ui/ConfigGeneral.qml:136 -#: package/contents/ui/ConfigGeneral.qml:155 +#: package/contents/ui/configGeneral.qml:83 +#: package/contents/ui/configGeneral.qml:95 +#: package/contents/ui/configGeneral.qml:107 +#: package/contents/ui/configGeneral.qml:119 +#: package/contents/ui/configGeneral.qml:131 +#: package/contents/ui/configGeneral.qml:150 +#: package/contents/ui/configGeneral.qml:162 +#: package/contents/ui/configGeneral.qml:182 msgid "Enabled" msgstr "Ingeschakeld" -#: package/contents/ui/ConfigGeneral.qml:87 -msgid "Leave" -msgstr "Verlaten" - -#: package/contents/ui/ConfigGeneral.qml:112 +#: package/contents/ui/configGeneral.qml:138 msgid "Turn off screen when locking" msgstr "Scherm uitschakelen na vergrendelen" -#: package/contents/ui/ConfigGeneral.qml:143 -#: package/contents/ui/ConfigGeneral.qml:162 -msgid "Ask for confirmation" -msgstr "Vragen om bevestiging" - -#: package/contents/ui/ConfigGeneral.qml:169 +#: package/contents/ui/configGeneral.qml:197 msgctxt "Number of rows, columns..." msgid "Layout" msgstr "Indeling" -#: package/contents/ui/ConfigGeneral.qml:176 +#: package/contents/ui/configGeneral.qml:204 msgid "Inline best fit" msgstr "Best passend" -#: package/contents/ui/ConfigGeneral.qml:191 +#: package/contents/ui/configGeneral.qml:227 msgid "rows" msgstr "rijen" -#: package/contents/ui/ConfigGeneral.qml:206 +#: package/contents/ui/configGeneral.qml:250 msgid "columns" msgstr "kolommen" -#: package/contents/ui/ConfigIconSettings.qml:43 +#: package/contents/ui/configIconSettings.qml:43 msgid "Please choose a file" msgstr "Kies een bestand" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "Icons only (*.svg *.png *.jpg *.jpeg)" msgstr "Alleen pictogrammen (*.svg *.png *.jpg *.jpeg)" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "All files (*)" msgstr "Alle bestanden (*)" -#: package/contents/ui/ConfigIconSettings.qml:70 +#: package/contents/ui/configIconSettings.qml:72 msgid "Customize & rearrange icons" msgstr "Pictogrammen aanpassen en herschikken" -#: package/contents/ui/ConfigIconSettings.qml:76 +#: package/contents/ui/configIconSettings.qml:78 msgctxt "Actions for the available radio buttons" msgid "Action:" msgstr "Actie:" -#: package/contents/ui/ConfigIconSettings.qml:85 +#: package/contents/ui/configIconSettings.qml:87 msgid "Rearrange icons" msgstr "Pictogrammen herschikken" -#: package/contents/ui/ConfigIconSettings.qml:93 +#: package/contents/ui/configIconSettings.qml:95 msgid "Change icons with system icons (recommended)" msgstr "Pictogrammen wijzigen middels systeempictogrammen (aanbevolen)" -#: package/contents/ui/ConfigIconSettings.qml:101 +#: package/contents/ui/configIconSettings.qml:103 msgid "Change icons with user-defined icons" msgstr "Pictogrammen wijzigen middels eigen pictogrammen" -#: package/contents/ui/ConfigIconSettings.qml:112 +#: package/contents/ui/configIconSettings.qml:115 msgid "Move icon to the left" msgstr "Pictogram naar links verplaatsen" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to select and move icon" msgstr "Klik om pictogram te selecteren en verplaatsen" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to change icon" msgstr "Klik om pictogram te wijzigen" -#: package/contents/ui/ConfigIconSettings.qml:144 +#: package/contents/ui/configIconSettings.qml:149 msgid "Move icon to the right" msgstr "Pictogram naar rechts verplaatsen" -#: package/contents/ui/ConfigIconSettings.qml:155 -msgid "Reset" -msgstr "Standaardwaarden" - -#: package/contents/ui/ConfigIconSettings.qml:156 +#: package/contents/ui/configIconSettings.qml:161 msgid "Reset all current changes to previous values" msgstr "Alle huidige aanpassingen terugdraaien" -#: package/contents/ui/main.qml:141 -msgid "Do you want to suspend to disk (hibernate)?" -msgstr "Wil je pauzeren naar de schijf ('slaapstand')?" - -#: package/contents/ui/main.qml:144 package/contents/ui/main.qml:160 -msgid "Yes" -msgstr "Ja" - -#: package/contents/ui/main.qml:145 package/contents/ui/main.qml:161 -msgid "No" -msgstr "Nee" - -#: package/contents/ui/main.qml:157 -msgid "Do you want to suspend to RAM (sleep)?" -msgstr "Wil je pauzeren naar RAM ('pauzestand')?" +#: package/contents/ui/configIconSettings.qml:162 +msgid "Reset" +msgstr "Standaardwaarden" #: translations/rc.cpp:1 rc.cpp:1 msgctxt "NAME OF TRANSLATORS" @@ -213,3 +209,27 @@ msgstr "vistausss@outlook.com" msgctxt "HOMEPAGE OF TRANSLATORS" msgid "Your homepages" msgstr "" + +#~ msgid "Leave..." +#~ msgstr "Verlaten..." + +#~ msgid "Suspend" +#~ msgstr "Pauzestand" + +#~ msgid "Leave" +#~ msgstr "Verlaten" + +#~ msgid "Ask for confirmation" +#~ msgstr "Vragen om bevestiging" + +#~ msgid "Do you want to suspend to disk (hibernate)?" +#~ msgstr "Wil je pauzeren naar de schijf ('slaapstand')?" + +#~ msgid "Yes" +#~ msgstr "Ja" + +#~ msgid "No" +#~ msgstr "Nee" + +#~ msgid "Do you want to suspend to RAM (sleep)?" +#~ msgstr "Wil je pauzeren naar RAM ('pauzestand')?" diff --git a/src/translations/systempanel.pot b/src/translations/systempanel.pot index ad4aad3..cf2feaa 100644 --- a/src/translations/systempanel.pot +++ b/src/translations/systempanel.pot @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php/plasma5-applets-" "system-panel?content=175309\n" -"POT-Creation-Date: 2016-04-13 22:58-0500\n" +"POT-Creation-Date: 2024-06-23 00:21-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,54 +18,68 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: package/contents/code/data.js:7 +#: package/contents/code/data.js:8 msgid "Standby" msgstr "" -#: package/contents/code/data.js:8 +#: package/contents/code/data.js:9 msgid "Turn off the monitor to save energy" msgstr "" -#: package/contents/code/data.js:12 package/contents/ui/ConfigGeneral.qml:99 +#: package/contents/code/data.js:15 package/contents/ui/configGeneral.qml:125 msgid "Lock" msgstr "" -#: package/contents/code/data.js:13 +#: package/contents/code/data.js:16 msgid "Lock the screen" msgstr "" -#: package/contents/code/data.js:18 package/contents/ui/ConfigGeneral.qml:118 +#: package/contents/code/data.js:23 package/contents/ui/configGeneral.qml:144 msgid "Switch user" msgstr "" -#: package/contents/code/data.js:19 +#: package/contents/code/data.js:24 msgid "Start a parallel session as a different user" msgstr "" -#: package/contents/code/data.js:23 -msgid "Leave..." +#: package/contents/code/data.js:31 package/contents/ui/configGeneral.qml:89 +msgid "Shut Down" msgstr "" -#: package/contents/code/data.js:24 -msgid "Log out, turn off or restart the computer" +#: package/contents/code/data.js:32 +msgid "Turn off the computer" msgstr "" -#: package/contents/code/data.js:28 package/contents/ui/ConfigGeneral.qml:149 -#: package/contents/ui/main.qml:156 -msgid "Suspend" +#: package/contents/code/data.js:39 package/contents/ui/configGeneral.qml:101 +msgid "Restart" msgstr "" -#: package/contents/code/data.js:29 -msgid "Sleep (suspend to RAM)" +#: package/contents/code/data.js:40 +msgid "Reboot the computer" msgstr "" -#: package/contents/code/data.js:34 package/contents/ui/ConfigGeneral.qml:130 -#: package/contents/ui/main.qml:140 +#: package/contents/code/data.js:47 package/contents/ui/configGeneral.qml:113 +msgid "Log Out" +msgstr "" + +#: package/contents/code/data.js:48 +msgid "Log out the computer" +msgstr "" + +#: package/contents/code/data.js:55 package/contents/ui/configGeneral.qml:176 +msgid "Sleep" +msgstr "" + +#: package/contents/code/data.js:56 +msgid "Suspend to RAM" +msgstr "" + +#: package/contents/code/data.js:63 package/contents/ui/configGeneral.qml:156 msgid "Hibernate" msgstr "" -#: package/contents/code/data.js:35 -msgid "Hibernate (suspend to disk)" +#: package/contents/code/data.js:64 +msgid "Suspend to disk" msgstr "" #: package/contents/config/config.qml:24 @@ -77,125 +91,102 @@ msgctxt "Icon and location of the icon of each action" msgid "Icon settings" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:64 +#: package/contents/ui/configGeneral.qml:65 msgctxt "Heading for list of actions (leave, lock, shutdown, ...)" msgid "Actions" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:75 -msgid "Turn off screen" +#: package/contents/ui/configGeneral.qml:77 +msgid "Turn Off Screen" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:81 -#: package/contents/ui/ConfigGeneral.qml:93 -#: package/contents/ui/ConfigGeneral.qml:105 -#: package/contents/ui/ConfigGeneral.qml:124 -#: package/contents/ui/ConfigGeneral.qml:136 -#: package/contents/ui/ConfigGeneral.qml:155 +#: package/contents/ui/configGeneral.qml:83 +#: package/contents/ui/configGeneral.qml:95 +#: package/contents/ui/configGeneral.qml:107 +#: package/contents/ui/configGeneral.qml:119 +#: package/contents/ui/configGeneral.qml:131 +#: package/contents/ui/configGeneral.qml:150 +#: package/contents/ui/configGeneral.qml:162 +#: package/contents/ui/configGeneral.qml:182 msgid "Enabled" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:87 -msgid "Leave" -msgstr "" - -#: package/contents/ui/ConfigGeneral.qml:112 +#: package/contents/ui/configGeneral.qml:138 msgid "Turn off screen when locking" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:143 -#: package/contents/ui/ConfigGeneral.qml:162 -msgid "Ask for confirmation" -msgstr "" - -#: package/contents/ui/ConfigGeneral.qml:169 +#: package/contents/ui/configGeneral.qml:197 msgctxt "Number of rows, columns..." msgid "Layout" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:176 +#: package/contents/ui/configGeneral.qml:204 msgid "Inline best fit" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:191 +#: package/contents/ui/configGeneral.qml:227 msgid "rows" msgstr "" -#: package/contents/ui/ConfigGeneral.qml:206 +#: package/contents/ui/configGeneral.qml:250 msgid "columns" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:43 +#: package/contents/ui/configIconSettings.qml:43 msgid "Please choose a file" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "Icons only (*.svg *.png *.jpg *.jpeg)" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:44 +#: package/contents/ui/configIconSettings.qml:44 msgid "All files (*)" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:70 +#: package/contents/ui/configIconSettings.qml:72 msgid "Customize & rearrange icons" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:76 +#: package/contents/ui/configIconSettings.qml:78 msgctxt "Actions for the available radio buttons" msgid "Action:" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:85 +#: package/contents/ui/configIconSettings.qml:87 msgid "Rearrange icons" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:93 +#: package/contents/ui/configIconSettings.qml:95 msgid "Change icons with system icons (recommended)" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:101 +#: package/contents/ui/configIconSettings.qml:103 msgid "Change icons with user-defined icons" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:112 +#: package/contents/ui/configIconSettings.qml:115 msgid "Move icon to the left" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to select and move icon" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:126 +#: package/contents/ui/configIconSettings.qml:130 msgid "Click to change icon" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:144 +#: package/contents/ui/configIconSettings.qml:149 msgid "Move icon to the right" msgstr "" -#: package/contents/ui/ConfigIconSettings.qml:155 -msgid "Reset" -msgstr "" - -#: package/contents/ui/ConfigIconSettings.qml:156 +#: package/contents/ui/configIconSettings.qml:161 msgid "Reset all current changes to previous values" msgstr "" -#: package/contents/ui/main.qml:141 -msgid "Do you want to suspend to disk (hibernate)?" -msgstr "" - -#: package/contents/ui/main.qml:144 package/contents/ui/main.qml:160 -msgid "Yes" -msgstr "" - -#: package/contents/ui/main.qml:145 package/contents/ui/main.qml:161 -msgid "No" -msgstr "" - -#: package/contents/ui/main.qml:157 -msgid "Do you want to suspend to RAM (sleep)?" +#: package/contents/ui/configIconSettings.qml:162 +msgid "Reset" msgstr "" #: translations/rc.cpp:1 rc.cpp:1