Compare commits

..

35 Commits

Author SHA1 Message Date
ae4e7deddd create pkgbuild for the last stable archive in 2.4.0 branch 2015-09-09 06:57:49 +03:00
be26033ff7 edit log format line 2015-09-04 00:18:46 +03:00
70020d0aef Merge branch 'master' of github.com:arcan1s/awesome-widgets 2015-09-03 00:31:07 +03:00
7218defe19 add '$this' feature to lambda functions
fix large size on startup
fix invalid key parsing
2015-09-03 00:30:10 +03:00
200ecc7196 translation update 2015-09-02 00:19:28 +03:00
6689bea9a7 implement dynamic tags 2015-09-02 00:05:11 +03:00
5940ec4531 update awdebug 2015-09-01 01:45:25 +03:00
2716f77eb2 revert 2015-09-01 01:40:48 +03:00
cfdcaae036 drop script from deps 2015-09-01 01:40:15 +03:00
82c1839634 drop hidding method 2015-09-01 01:12:10 +03:00
08dae3b02b small patch to avoid notifications on nan 2015-08-31 01:43:39 +03:00
cc2b1b7b8a add images feature to extweather (apiver == 2) 2015-08-31 00:16:04 +03:00
4c27382467 more correct logging, use qt logging for qml as well 2015-08-30 16:24:00 +03:00
aacb50c946 start moving to qt5 style logging 2015-08-29 00:58:39 +03:00
466faf53fa some refactoring, prepare to moving to qt5 style logging 2015-08-28 00:15:25 +03:00
8228d1d06b Add filter feature to ExtUpgrade (ApiVer = 3) 2015-08-26 00:24:55 +03:00
37726370ee Add additional column to configuraion ui to better tag selection 2015-08-25 00:07:23 +03:00
07305d7578 no kf5 on ubuntu 12.04 2015-08-23 02:26:12 +03:00
b97c821c8f try to upgrade ubuntu first 2015-08-23 02:16:22 +03:00
b50c1d2363 add ability to do not translate strings 2015-08-23 02:14:55 +03:00
713aa611d9 drop travis since it uses ubuntu-12.04 2015-08-22 23:11:09 +03:00
319755179f #2 2015-08-22 22:30:52 +03:00
9509d87962 try to get it working 2015-08-22 22:27:27 +03:00
6d58a3f05c add repo 2015-08-22 14:59:44 +03:00
2cca290630 try add travis-ci 2015-08-22 14:55:50 +03:00
29b75e2b12 update additional files
update translations
add "Add lambda" button to ui
2015-08-22 00:40:14 +03:00
835eb00f0d add lambda support 2015-08-21 00:05:15 +03:00
a5e9b32b28 implement support of network speed units tags
fix warning for empty tooltip image
2015-08-18 01:17:51 +03:00
fbdc9112aa update archive generator 2015-08-16 15:48:43 +03:00
b3fc0501ba unify build, allow cross build 2015-08-16 03:24:44 +03:00
a74c65a2a3 fix typo 2015-08-16 02:41:26 +03:00
4858c9dbcd add rpm recipe 2015-08-16 02:38:24 +03:00
3601b4246d add build requirements for deb packages 2015-08-16 01:54:49 +03:00
241e13ffd8 add experimental debian build 2015-08-16 01:22:28 +03:00
7a5d2d5dd4 add forgoten line to CHANGELOG
drop default active script
2015-08-11 00:05:23 +03:00
98 changed files with 3192 additions and 2923 deletions

3
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "sources/3rdparty/pdebug"]
path = sources/3rdparty/pdebug
url = https://github.com/arcan1s/qtadds-pdebug.git
[submodule "sources/3rdparty/task"] [submodule "sources/3rdparty/task"]
path = sources/3rdparty/task path = sources/3rdparty/task
url = https://github.com/arcan1s/qtadds-taskadds-qprocess.git url = https://github.com/arcan1s/qtadds-taskadds-qprocess.git

11
.travis.yml.bckp Normal file
View File

@ -0,0 +1,11 @@
install:
- sudo apt-get update -qq
- sudo apt-get install -y cmake extra-cmake-modules g++ git libkf5i18n-dev libkf5notifications-dev libkf5service-dev libkf5windowsystem-dev plasma-framework-dev qtbase5-dev qtdeclarative5-dev
- git submobule update --init
- rm -rf build
- mkdir build
script:
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../sources
- make

View File

@ -1,3 +1,6 @@
+ add tags upunits, downunits
- fix warning for empty tooltip image
Ver.2.4.0: Ver.2.4.0:
+ add support of weather items + add support of weather items
+ add support of load average (la1, la5, la15 tags) + add support of load average (la1, la5, la15 tags)
@ -8,6 +11,7 @@ Ver.2.4.0:
+ add ability to disable player monitor + add ability to disable player monitor
- fix bug with invalid network data calculation - fix bug with invalid network data calculation
- fix warning with fond dialog init - fix warning with fond dialog init
- fix bug with no object deletions (#60)
* rewrite ExtItems to use own abstract class * rewrite ExtItems to use own abstract class
* improve work with data updating (#57) * improve work with data updating (#57)
* move to signal-slot interface painting * move to signal-slot interface painting

View File

@ -8,6 +8,7 @@
+ добавлена возможность отключить монитор плеера + добавлена возможность отключить монитор плеера
- исправлен баг с неправильным расчетам скорости сети - исправлен баг с неправильным расчетам скорости сети
- исправлен баг с неправильной инициализацией диалога шрифтов - исправлен баг с неправильной инициализацией диалога шрифтов
- исправлен баг с отсутствием удаления объектов (#60)
* переписаны ExtItems для использования собственного абстрактного класса * переписаны ExtItems для использования собственного абстрактного класса
* улучшена работа с обновлениями виджета (#57) * улучшена работа с обновлениями виджета (#57)
* рисование интерфейса переписано на модель сигнал-слот * рисование интерфейса переписано на модель сигнал-слот

View File

@ -1,40 +0,0 @@
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
pkgname=plasma5-applet-awesome-widgets
_pkgname=awesome-widgets
pkgver=2.4.0
pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('i686' 'x86_64')
url="http://arcanis.name/projects/awesome-widgets"
license=('GPL3')
depends=('plasma-framework')
optdepends=("catalyst: for GPU monitor"
"hddtemp: for HDD temperature monitor"
"smartmontools: for HDD temperature monitor"
"mpd: for music player monitor"
"nvidia-utils: for GPU monitor")
makedepends=('cmake' 'extra-cmake-modules')
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install=${pkgname}.install
md5sums=('9b870da6ecefef584f11b6ba6bf9a397')
backup=('etc/xdg/plasma-dataengine-extsysmon.conf')
prepare() {
rm -rf "${srcdir}/build"
mkdir "${srcdir}/build"
}
build () {
cd "${srcdir}/build"
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
"../${_pkgname}"
make
}
package() {
cd "${srcdir}/build"
make DESTDIR="${pkgdir}" install
}

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
SRCDIR="sources" SRCDIR="sources"
MAJOR=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $2}' | sed 's/.$//g') MAJOR=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $2}' | sed 's/^.\(.*\)..$/\1/')
MINOR=$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $2}' | sed 's/.$//g') MINOR=$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $2}' | sed 's/^.\(.*\)..$/\1/')
PATCH=$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $2}' | sed 's/.$//g') PATCH=$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $2}' | sed 's/^.\(.*\)..$/\1/')
VERSION="${MAJOR}.${MINOR}.${PATCH}" VERSION="${MAJOR}.${MINOR}.${PATCH}"
# update submodules # update submodules
@ -20,13 +20,13 @@ cp -r "${SRCDIR}" "${ARCHIVE}"
for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done
for FILE in ${IGNORELIST[*]}; do rm -rf "${ARCHIVE}/${FILE}"; done for FILE in ${IGNORELIST[*]}; do rm -rf "${ARCHIVE}/${FILE}"; done
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}" tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
ln -sf "../${ARCHIVE}-${VERSION}-src.tar.xz" arch ln -sf "../${ARCHIVE}-${VERSION}-src.tar.xz" packages
rm -rf "${ARCHIVE}" rm -rf "${ARCHIVE}"
# update md5sum # update md5sum
MD5SUMS=$(md5sum ${ARCHIVE}-${VERSION}-src.tar.xz | awk '{print $1}') MD5SUMS=$(md5sum ${ARCHIVE}-${VERSION}-src.tar.xz | awk '{print $1}')
sed -i "/md5sums=('[0-9A-Fa-f]*/s/[^'][^)]*/md5sums=('${MD5SUMS}'/" arch/PKGBUILD sed -i "/md5sums=('[0-9A-Fa-f]*/s/[^'][^)]*/md5sums=('${MD5SUMS}'/" packages/PKGBUILD
sed -i "s/pkgver=[0-9.]*/pkgver=${VERSION}/" arch/PKGBUILD sed -i "s/pkgver=[0-9.]*/pkgver=${VERSION}/" packages/PKGBUILD
# clear # clear
find . -type f -name '*src.tar.xz' -not -name "*${VERSION}-src.tar.xz" -exec rm -rf {} \; find . -type f -name '*src.tar.xz' -not -name "*${VERSION}-src.tar.xz" -exec rm -rf {} \;
find arch -type l -xtype l -exec rm -rf {} \; find packages -type l -xtype l -exec rm -rf {} \;

View File

@ -2,7 +2,7 @@
pkgname=plasma5-applet-awesome-widgets pkgname=plasma5-applet-awesome-widgets
_pkgname=awesome-widgets _pkgname=awesome-widgets
pkgver=2.2.1.r15.g78931b3 pkgver=2.4.0.r34.gbe26033
pkgrel=1 pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor). Git version" pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor). Git version"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -18,7 +18,7 @@ optdepends=("amarok: for music player monitor"
"nvidia-utils: for GPU monitor" "nvidia-utils: for GPU monitor"
"qmmp: for music player monitor") "qmmp: for music player monitor")
makedepends=('cmake' 'extra-cmake-modules' 'git') makedepends=('cmake' 'extra-cmake-modules' 'git')
source=(${_pkgname}::git+https://github.com/arcan1s/awesome-widgets/) source=(${_pkgname}::git+https://github.com/arcan1s/awesome-widgets.git#branch=release-2.4.0)
install=${pkgname}.install install=${pkgname}.install
md5sums=('SKIP') md5sums=('SKIP')
backup=('etc/xdg/plasma-dataengine-extsysmon.conf') backup=('etc/xdg/plasma-dataengine-extsysmon.conf')

View File

@ -0,0 +1,11 @@
cmake
extra-cmake-modules
g++
git
libkf5i18n-dev
libkf5notifications-dev
libkf5service-dev
libkf5windowsystem-dev
plasma-framework-dev
qtbase5-dev
qtdeclarative5-dev

View File

View File

@ -8,7 +8,7 @@ ProjectRootRelative=./
[CMake][CMake Build Directory 0] [CMake][CMake Build Directory 0]
Build Directory Path=file:///home/arcanis/Documents/github/awesome-widgets/build Build Directory Path=file:///home/arcanis/Documents/github/awesome-widgets/build
Build Type=Debug Build Type=Release
CMake Binary=file:///usr/bin/cmake CMake Binary=file:///usr/bin/cmake
Environment Profile= Environment Profile=
Extra Arguments= Extra Arguments=
@ -19,5 +19,8 @@ Name=GCC
Path=gcc Path=gcc
Type=GCC Type=GCC
[Launch]
Launch Configurations=
[Project] [Project]
VersionControlSupport=kdevgit VersionControlSupport=kdevgit

Submodule sources/3rdparty/pdebug deleted from 75e4a0df83

View File

@ -13,10 +13,10 @@ project(awesomewidgets)
set(PROJECT_AUTHOR "Evgeniy Alekseev") set(PROJECT_AUTHOR "Evgeniy Alekseev")
set(PROJECT_CONTACT "esalexeev@gmail.com") set(PROJECT_CONTACT "esalexeev@gmail.com")
set(PROJECT_LICENSE "GPL3") set(PROJECT_LICENSE "GPL3")
set(PROJECT_VERSION_MAJOR 2) set(PROJECT_VERSION_MAJOR "2")
set(PROJECT_VERSION_MINOR 4) set(PROJECT_VERSION_MINOR "4")
set(PROJECT_VERSION_PATCH 0) set(PROJECT_VERSION_PATCH "0")
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC) string(TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC)
string(TIMESTAMP CURRENT_YEAR "%Y") string(TIMESTAMP CURRENT_YEAR "%Y")
@ -26,6 +26,8 @@ message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "Build date: ${CURRENT_DATE}") message(STATUS "Build date: ${CURRENT_DATE}")
option(BUILD_PLASMOIDS "Build plasmoids" ON) option(BUILD_PLASMOIDS "Build plasmoids" ON)
option(BUILD_DEB_PACKAGE "Build deb package" OFF)
option(BUILD_RPM_PACKAGE "Build rpm package" OFF)
# flags # flags
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
@ -61,3 +63,5 @@ if(BUILD_PLASMOIDS)
add_subdirectory(desktop-panel) add_subdirectory(desktop-panel)
add_subdirectory(translations) add_subdirectory(translations)
endif() endif()
include(packages-recipe.cmake)

25
sources/awdebug.cpp Normal file
View File

@ -0,0 +1,25 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets 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. *
* *
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "awdebug.h"
Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget", QtMsgType::QtWarningMsg)
Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel", QtMsgType::QtWarningMsg)
Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon", QtMsgType::QtWarningMsg)
Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets", QtMsgType::QtWarningMsg)

45
sources/awdebug.h Normal file
View File

@ -0,0 +1,45 @@
/***************************************************************************
* This file is part of awesome-widgets *
* *
* awesome-widgets 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. *
* *
* awesome-widgets 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 awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWDEBUG_H
#define AWDEBUG_H
#include <QLoggingCategory>
#ifndef LOG_FORMAT
#define LOG_FORMAT "[%{time yyyy-MM-ddTHH:mm:ss.zzz}][%{if-debug}DD%{endif}%{if-info}II%{endif}%{if-warning}WW%{endif}%{if-critical}CC%{endif}%{if-fatal}FF%{endif}][%{category}][%{function}] %{message}"
#endif /* LOG_FORMAT */
// define info log level
// #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
// #ifndef qCInfo
// redefine info because it doesn't log properly
#ifdef qCInfo
#undef qCInfo
#endif /* qCInfo */
#define qCInfo qCDebug
// #endif /* QT_VERSION */
Q_DECLARE_LOGGING_CATEGORY(LOG_AW)
Q_DECLARE_LOGGING_CATEGORY(LOG_DP)
Q_DECLARE_LOGGING_CATEGORY(LOG_ESM)
Q_DECLARE_LOGGING_CATEGORY(LOG_LIB)
#endif /* AWDEBUG_H */

View File

@ -47,6 +47,9 @@
<entry name="checkUpdates" type="bool"> <entry name="checkUpdates" type="bool">
<default>true</default> <default>true</default>
</entry> </entry>
<entry name="translateStrings" type="bool">
<default>true</default>
</entry>
</group> </group>
<group name="Tooltip"> <group name="Tooltip">

View File

@ -110,6 +110,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[about::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -45,6 +45,8 @@ Item {
property string cfg_tempUnits: tempUnits.currentText property string cfg_tempUnits: tempUnits.currentText
property alias cfg_acOnline: acOnline.text property alias cfg_acOnline: acOnline.text
property alias cfg_acOffline: acOffline.text property alias cfg_acOffline: acOffline.text
property alias cfg_checkUpdates: updates.checked
property alias cfg_translateStrings: translate.checked
Column { Column {
@ -212,8 +214,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_tempUnits = model[currentIndex]["name"] onCurrentIndexChanged: cfg_tempUnits = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.tempUnits) { if (model[i]["name"] == plasmoid.configuration.tempUnits) {
if (debug) console.info("Found", model[i]["name"], "on", i)
tempUnits.currentIndex = i; tempUnits.currentIndex = i;
} }
} }
@ -255,6 +259,34 @@ Item {
} }
} }
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.heigth
width: parent.width * 2 / 5
}
QtControls.CheckBox {
id: updates
width: parent.width * 3 / 5
text: i18n("Check updates on startup")
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.heigth
width: parent.width * 2 / 5
}
QtControls.CheckBox {
id: translate
width: parent.width * 3 / 5
text: i18n("Translate strings")
}
}
Row { Row {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width
@ -272,6 +304,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[advanced::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -90,6 +90,7 @@ Item {
width: parent.width * 2 / 3 width: parent.width * 2 / 3
text: plasmoid.configuration.fontFamily text: plasmoid.configuration.fontFamily
onClicked: { onClicked: {
if (debug) console.debug()
fontDialog.setFont() fontDialog.setFont()
fontDialog.visible = true fontDialog.visible = true
} }
@ -154,8 +155,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_fontWeight = model[currentIndex]["name"] onCurrentIndexChanged: cfg_fontWeight = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.fontWeight) { if (model[i]["name"] == plasmoid.configuration.fontWeight) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontWeight.currentIndex = i; fontWeight.currentIndex = i;
} }
} }
@ -189,8 +192,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_fontStyle = model[currentIndex]["name"] onCurrentIndexChanged: cfg_fontStyle = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.fontStyle) { if (model[i]["name"] == plasmoid.configuration.fontStyle) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontStyle.currentIndex = i; fontStyle.currentIndex = i;
} }
} }
@ -235,12 +240,14 @@ Item {
signal setFont signal setFont
onAccepted: { onAccepted: {
if (debug) console.debug()
selectFont.text = fontDialog.font.family selectFont.text = fontDialog.font.family
fontSize.value = fontDialog.font.pointSize fontSize.value = fontDialog.font.pointSize
fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0 fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0
fontWeight.currentIndex = weight[fontDialog.font.weight] fontWeight.currentIndex = weight[fontDialog.font.weight]
} }
onSetFont: { onSetFont: {
if (debug) console.debug()
fontDialog.font = Qt.font({ fontDialog.font = Qt.font({
family: selectFont.text, family: selectFont.text,
pointSize: fontSize.value > 0 ? fontSize.value : 12, pointSize: fontSize.value > 0 ? fontSize.value : 12,
@ -251,6 +258,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[appearance::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -40,26 +40,6 @@ Item {
implicitHeight: pageColumn.implicitHeight implicitHeight: pageColumn.implicitHeight
property bool debug: awActions.isDebugEnabled() property bool debug: awActions.isDebugEnabled()
property variant tooltipSettings: {
"tooltipNumber": plasmoid.configuration.tooltipNumber,
"useTooltipBackground": plasmoid.configuration.useTooltipBackground,
"tooltipBackgroung": plasmoid.configuration.tooltipBackgroung,
"cpuTooltip": plasmoid.configuration.cpuTooltip,
"cpuclTooltip": plasmoid.configuration.cpuclTooltip,
"memTooltip": plasmoid.configuration.memTooltip,
"swapTooltip": plasmoid.configuration.swapTooltip,
"downTooltip": plasmoid.configuration.downTooltip,
"upTooltip": plasmoid.configuration.downTooltip,
"batTooltip": plasmoid.configuration.batTooltip,
"cpuTooltipColor": plasmoid.configuration.cpuTooltipColor,
"cpuclTooltipColor": plasmoid.configuration.cpuclTooltipColor,
"memTooltipColor": plasmoid.configuration.memTooltipColor,
"swapTooltipColor": plasmoid.configuration.swapTooltipColor,
"downTooltipColor": plasmoid.configuration.downTooltipColor,
"upTooltipColor": plasmoid.configuration.upTooltipColor,
"batTooltipColor": plasmoid.configuration.batTooltipColor,
"batInTooltipColor": plasmoid.configuration.batInTooltipColor
}
property variant cfg_dataengine: awActions.readDataEngineConfiguration() property variant cfg_dataengine: awActions.readDataEngineConfiguration()
@ -79,23 +59,7 @@ Item {
QtControls.TextField { QtControls.TextField {
width: parent.width * 3 / 5 width: parent.width * 3 / 5
text: cfg_dataengine["ACPIPATH"] text: cfg_dataengine["ACPIPATH"]
} onEditingFinished: cfg_dataengine["ACPIPATH"] = text
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
text: i18n("Custom scripts")
}
QtControls.Button {
width: parent.width * 3 / 5
text: i18n("Edit scripts")
onClicked: awKeys.editItem("extscript")
} }
} }
@ -114,8 +78,10 @@ Item {
width: parent.width * 3 / 5 width: parent.width * 3 / 5
model: ["auto", "disable", "ati", "nvidia"] model: ["auto", "disable", "ati", "nvidia"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i=0; i<model.length; i++) { for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["GPUDEV"]) { if (model[i] == cfg_dataengine["GPUDEV"]) {
if (debug) console.info("Found", model[i], "on", i)
currentIndex = i; currentIndex = i;
} }
} }
@ -138,8 +104,10 @@ Item {
width: parent.width * 3 / 5 width: parent.width * 3 / 5
model: awKeys.getHddDevices(true) model: awKeys.getHddDevices(true)
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i=0; i<model.length; i++) { for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["HDDDEV"]) { if (model[i] == cfg_dataengine["HDDDEV"]) {
if (debug) console.info("Found", model[i], "on", i)
hdd.currentIndex = i; hdd.currentIndex = i;
} }
} }
@ -160,6 +128,7 @@ Item {
QtControls.TextField { QtControls.TextField {
width: parent.width * 3 / 5 width: parent.width * 3 / 5
text: cfg_dataengine["HDDTEMPCMD"] text: cfg_dataengine["HDDTEMPCMD"]
onEditingFinished: cfg_dataengine["HDDTEMPCMD"] = text
} }
} }
@ -176,6 +145,7 @@ Item {
QtControls.TextField { QtControls.TextField {
width: parent.width * 3 / 5 width: parent.width * 3 / 5
text: cfg_dataengine["MPDADDRESS"] text: cfg_dataengine["MPDADDRESS"]
onEditingFinished: cfg_dataengine["MPDADDRESS"] = text
} }
} }
@ -195,6 +165,7 @@ Item {
maximumValue: 65535 maximumValue: 65535
stepSize: 1 stepSize: 1
value: cfg_dataengine["MPDPORT"] value: cfg_dataengine["MPDPORT"]
onEditingFinished: cfg_dataengine["MPDPORT"] = value
} }
} }
@ -233,8 +204,10 @@ Item {
width: parent.width * 3 / 5 width: parent.width * 3 / 5
model: ["disable", "mpris", "mpd"] model: ["disable", "mpris", "mpd"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i=0; i<model.length; i++) { for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["PLAYER"]) { if (model[i] == cfg_dataengine["PLAYER"]) {
if (debug) console.info("Found", model[i], "on", i)
player.currentIndex = i; player.currentIndex = i;
} }
} }
@ -242,6 +215,43 @@ Item {
} }
} }
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
text: i18n("Player data symbols")
}
QtControls.SpinBox {
width: parent.width * 3 / 5
minimumValue: 1
maximumValue: 100
stepSize: 1
value: cfg_dataengine["PLAYERSYMBOLS"]
onEditingFinished: cfg_dataengine["PLAYERSYMBOLS"] = value
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
text: i18n("Custom scripts")
}
QtControls.Button {
width: parent.width * 3 / 5
text: i18n("Edit scripts")
onClicked: awKeys.editItem("extscript")
}
}
Row { Row {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width
@ -295,14 +305,14 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[dataengine::onCompleted]") if (debug) console.debug()
// init submodule // init submodule
awKeys.initKeys(plasmoid.configuration.text) awKeys.initKeys(plasmoid.configuration.text)
} }
Component.onDestruction: { Component.onDestruction: {
if (debug) console.log("[dataengine::onDestruction]") if (debug) console.debug()
cfg_dataengine["GPUDEV"] = gpuDev.currentText cfg_dataengine["GPUDEV"] = gpuDev.currentText
cfg_dataengine["HDDDEV"] = hdd.currentText cfg_dataengine["HDDDEV"] = hdd.currentText

View File

@ -92,14 +92,14 @@ Item {
interval: plasmoid.configuration.interval interval: plasmoid.configuration.interval
onNewData: { onNewData: {
if (debug) console.log("[main::onNewData] : Update source " + sourceName) if (debug) console.debug("Update source", sourceName)
systemmonitorDE.interval = plasmoid.configuration.interval systemmonitorDE.interval = plasmoid.configuration.interval
awKeys.setDataBySource(sourceName, data, settings) awKeys.setDataBySource(sourceName, data, settings)
} }
onSourceAdded: { onSourceAdded: {
if (debug) console.log("[main::onSourceAdded] : Source " + source) if (debug) console.debug("Source", source)
awKeys.addDevice(source) awKeys.addDevice(source)
} }
@ -112,7 +112,7 @@ Item {
interval: plasmoid.configuration.interval interval: plasmoid.configuration.interval
onNewData: { onNewData: {
if (debug) console.log("[main::onNewData] : Update source " + sourceName) if (debug) console.debug("Update source", sourceName)
extsysmonDE.interval = plasmoid.configuration.interval extsysmonDE.interval = plasmoid.configuration.interval
awKeys.setDataBySource(sourceName, data, settings) awKeys.setDataBySource(sourceName, data, settings)
@ -126,7 +126,7 @@ Item {
interval: 1000 interval: 1000
onNewData: { onNewData: {
if (debug) console.log("[main::onNewData] : Update source " + sourceName) if (debug) console.debug("Update source", sourceName)
awKeys.setDataBySource(sourceName, data, settings) awKeys.setDataBySource(sourceName, data, settings)
} }
@ -150,8 +150,6 @@ Item {
font.pointSize: plasmoid.configuration.fontSize font.pointSize: plasmoid.configuration.fontSize
font.weight: general.fontWeight[plasmoid.configuration.fontWeight] font.weight: general.fontWeight[plasmoid.configuration.fontWeight]
text: plasmoid.configuration.text
PlasmaCore.ToolTipArea { PlasmaCore.ToolTipArea {
height: tooltip.height height: tooltip.height
width: tooltip.width width: tooltip.width
@ -165,7 +163,7 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[main::onCompleted]") if (debug) console.debug()
// actions // actions
plasmoid.setAction("requestKey", i18n("Request key"), "utilities-system-monitor") plasmoid.setAction("requestKey", i18n("Request key"), "utilities-system-monitor")
@ -178,40 +176,44 @@ Item {
awKeys.dropSourceFromDataengine.connect(dropSource) awKeys.dropSourceFromDataengine.connect(dropSource)
awKeys.needTextToBeUpdated.connect(needTextUpdate) awKeys.needTextToBeUpdated.connect(needTextUpdate)
awKeys.needToolTipToBeUpdated.connect(needToolTipUpdate) awKeys.needToolTipToBeUpdated.connect(needToolTipUpdate)
// check updates if required
if (plasmoid.configuration.checkUpdates) return action_checkUpdates()
} }
onDropSource: { onDropSource: {
if (debug) console.log("[main::onDropSource]") if (debug) console.debug()
if (debug) console.log("[main::onDropSource] : Source " + sourceName) if (debug) console.debug("Source", sourceName)
systemmonitorDE.disconnectSource(sourceName) systemmonitorDE.disconnectSource(sourceName)
} }
onNeedTextUpdate: { onNeedTextUpdate: {
if (debug) console.log("[main::onNeedTextUpdate]") if (debug) console.debug()
text.text = newText text.text = newText
sizeUpdate() sizeUpdate()
} }
onNeedToolTipUpdate: { onNeedToolTipUpdate: {
if (debug) console.log("[main::onNeedToolTipUpdate]") if (debug) console.debug()
tooltip.text = newText tooltip.text = newText
} }
onSizeUpdate: { onSizeUpdate: {
if (debug) console.log("[main::onSizeUpdate]") if (debug) console.debug()
// 16 is a magic number
// in other case plasmoid will increase own size on each update
if (plasmoid.configuration.height == 0) { if (plasmoid.configuration.height == 0) {
Layout.minimumHeight = text.contentHeight Layout.minimumHeight = text.contentHeight - 16
Layout.maximumHeight = -1 Layout.maximumHeight = -1
} else { } else {
Layout.minimumHeight = plasmoid.configuration.height Layout.minimumHeight = plasmoid.configuration.height
Layout.maximumHeight = plasmoid.configuration.height Layout.maximumHeight = plasmoid.configuration.height
} }
if (plasmoid.configuration.width == 0) { if (plasmoid.configuration.width == 0) {
Layout.minimumWidth = text.contentWidth Layout.minimumWidth = text.contentWidth - 16
Layout.maximumWidth = -1 Layout.maximumWidth = -1
} else { } else {
Layout.minimumWidth = plasmoid.configuration.width Layout.minimumWidth = plasmoid.configuration.width
@ -221,38 +223,37 @@ Item {
Plasmoid.onUserConfiguringChanged: { Plasmoid.onUserConfiguringChanged: {
if (plasmoid.userConfiguring) return if (plasmoid.userConfiguring) return
if (debug) console.log("[main::onUserConfiguringChanged]") if (debug) console.debug()
// init submodule // init submodule
awKeys.initKeys(plasmoid.configuration.text) awKeys.initKeys(plasmoid.configuration.text)
awKeys.initTooltip(tooltipSettings) awKeys.initTooltip(tooltipSettings)
awKeys.setPopupEnabled(plasmoid.configuration.notify) awKeys.setPopupEnabled(plasmoid.configuration.notify)
awKeys.setTranslateStrings(plasmoid.configuration.translateStrings)
awKeys.setWrapNewLines(plasmoid.configuration.wrapNewLines) awKeys.setWrapNewLines(plasmoid.configuration.wrapNewLines)
needTextUpdate(plasmoid.configuration.text)
} }
function action_checkUpdates() { function action_checkUpdates() {
if (debug) console.log("[main::action_checkUpdates]") if (debug) console.debug()
awActions.checkUpdates() return awActions.checkUpdates()
} }
function action_showReadme() { function action_showReadme() {
if (debug) console.log("[main::action_showReadme]") if (debug) console.debug()
awActions.showReadme() return awActions.showReadme()
} }
function action_report() { function action_report() {
if (debug) console.log("[main::action_report]") if (debug) console.debug()
awActions.sendEmail() return awActions.sendEmail()
} }
function action_requestKey() { function action_requestKey() {
if (debug) console.log("[main::action_requestKey]") if (debug) console.debug()
awKeys.graphicalValueByKey() return awKeys.graphicalValueByKey()
} }
} }

View File

@ -1 +1 @@
singleton general general.qml singleton general 1.0 general.qml

View File

@ -513,6 +513,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[tooltip::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -90,8 +90,7 @@ Item {
iconName: "font" iconName: "font"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Font button") if (debug) console.debug("Font button")
var defaultFont = { var defaultFont = {
"color": plasmoid.configuration.fontColor, "color": plasmoid.configuration.fontColor,
"family": plasmoid.configuration.fontFamily, "family": plasmoid.configuration.fontFamily,
@ -112,8 +111,7 @@ Item {
iconName: "format-indent-more" iconName: "format-indent-more"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Indent button") if (debug) console.debug("Indent button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -126,8 +124,7 @@ Item {
iconName: "format-text-bold" iconName: "format-text-bold"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Bold button") if (debug) console.debug("Bold button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -139,8 +136,7 @@ Item {
iconName: "format-text-italic" iconName: "format-text-italic"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Italic button") if (debug) console.debug("Italic button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -152,8 +148,7 @@ Item {
iconName: "format-text-underline" iconName: "format-text-underline"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Underline button") if (debug) console.debug("Underline button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -165,8 +160,7 @@ Item {
iconName: "format-text-strikethrough" iconName: "format-text-strikethrough"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Strike button") if (debug) console.debug("Strike button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -179,8 +173,7 @@ Item {
iconName: "format-justify-left" iconName: "format-justify-left"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Left button") if (debug) console.debug("Left button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -192,8 +185,7 @@ Item {
iconName: "format-justify-center" iconName: "format-justify-center"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Center button") if (debug) console.debug("Center button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -205,8 +197,7 @@ Item {
iconName: "format-justify-right" iconName: "format-justify-right"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Right button") if (debug) console.debug("Right button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -218,8 +209,7 @@ Item {
iconName: "format-justify-fill" iconName: "format-justify-fill"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Justify button") if (debug) console.debug("Justify button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -231,17 +221,81 @@ Item {
Row { Row {
height: implicitHeight height: implicitHeight
width: parent.width width: parent.width
QtControls.ComboBox {
width: (parent.width - addTagButton.width - showValueButton.width - addLambdaButton.width) / 2
textRole: "label"
model: [
{
'label': i18n("AC"),
'regexp': "^(ac|bat).*"
},
{
'label': i18n("Bars"),
'regexp': "^bar.*"
},
{
'label': i18n("CPU"),
'regexp': "^(cpu|gpu|la|ps|temp(?!erature)).*"
},
{
'label': i18n("Desktops"),
'regexp': "^(n|t)?desktop(s)?"
},
{
'label': i18n("HDD"),
'regexp': "^hdd.*"
},
{
'label': i18n("Memory"),
'regexp': "^(mem|swap).*"
},
{
'label': i18n("Network"),
'regexp': "^(netdev|(down|up(?!time)).*)"
},
{
'label': i18n("Music player"),
'regexp': "(^|d|s)(album|artist|duration|progress|title)"
},
{
'label': i18n("Scripts"),
'regexp': "^custom.*"
},
{
'label': i18n("Time"),
'regexp': ".*time$"
},
{
'label': i18n("Quotes"),
'regexp': "^(perc)?(ask|bid|price)(chg)?.*"
},
{
'label': i18n("Upgrades"),
'regexp': "^pkgcount.*"
},
{
'label': i18n("Weathers"),
'regexp': "^(weather(Id)?|humidity|pressure|temperature|timestamp)"
}
]
onCurrentIndexChanged: {
if (debug) console.debug()
tags.model = awKeys.dictKeys(true, model[currentIndex]["regexp"])
if (debug) console.info("Init model", tags.model, "for", model[currentIndex]["label"])
tags.currentIndex = -1
}
}
QtControls.ComboBox { QtControls.ComboBox {
id: tags id: tags
width: parent.width - addTagButton.width - showValueButton.width width: (parent.width - addTagButton.width - showValueButton.width - addLambdaButton.width) / 2
} }
QtControls.Button { QtControls.Button {
id: addTagButton id: addTagButton
text: i18n("Add") text: i18n("Add")
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Add tag button") if (!tags.currentText) return
if (debug) console.debug("Add tag button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -253,8 +307,8 @@ Item {
text: i18n("Show value") text: i18n("Show value")
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Show tag button") if (!tags.currentText) return
if (debug) console.debug("Show tag button")
var message = i18n("Tag: %1", tags.currentText) var message = i18n("Tag: %1", tags.currentText)
message += "<br>" message += "<br>"
message += i18n("Value: %1", awKeys.valueByKey(tags.currentText)) message += i18n("Value: %1", awKeys.valueByKey(tags.currentText))
@ -263,6 +317,18 @@ Item {
awActions.sendNotification("tag", message) awActions.sendNotification("tag", message)
} }
} }
QtControls.Button {
id: addLambdaButton
text: i18n("Add lambda")
onClicked: {
if (debug) console.debug("Lambda button")
var pos = textPattern.cursorPosition
var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
textPattern.insert(pos, selected + "${{\n\n}}")
}
}
} }
Row { Row {
@ -293,8 +359,7 @@ Item {
interval: 5000 interval: 5000
onNewData: { onNewData: {
if (debug) console.log("[widget::onNewData] : Update source " + sourceName) if (debug) console.debug("Update source", sourceName)
awKeys.setDataBySource(sourceName, data, settings) awKeys.setDataBySource(sourceName, data, settings)
} }
} }
@ -306,8 +371,7 @@ Item {
interval: 5000 interval: 5000
onNewData: { onNewData: {
if (debug) console.log("[widget::onNewData] : Update source " + sourceName) if (debug) console.debug("Update source", sourceName)
awKeys.setDataBySource(sourceName, data, settings) awKeys.setDataBySource(sourceName, data, settings)
} }
} }
@ -319,17 +383,15 @@ Item {
interval: 5000 interval: 5000
onNewData: { onNewData: {
if (debug) console.log("[widget::onNewData] : Update source " + sourceName) if (debug) console.debug("Update source", sourceName)
awKeys.setDataBySource(sourceName, data, settings) awKeys.setDataBySource(sourceName, data, settings)
} }
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[widget::onCompleted]") if (debug) console.debug()
// init submodule // init submodule
awKeys.initKeys(plasmoid.configuration.text) awKeys.initKeys(plasmoid.configuration.text)
tags.model = awKeys.dictKeys(true)
} }
} }

View File

@ -12,7 +12,7 @@ include_directories(
${Kf5_INCLUDE} ${Kf5_INCLUDE}
) )
file(GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp) file(GLOB SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp ${CMAKE_SOURCE_DIR}/*.cpp)
file(GLOB SUBPROJECT_UI *.ui) file(GLOB SUBPROJECT_UI *.ui)
file(GLOB SUBPROJECT_NOTIFY *.notifyrc) file(GLOB SUBPROJECT_NOTIFY *.notifyrc)

View File

@ -20,7 +20,6 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <KNotifications/KNotification> #include <KNotifications/KNotification>
#include <QDebug>
#include <QDesktopServices> #include <QDesktopServices>
#include <QDir> #include <QDir>
#include <QJsonDocument> #include <QJsonDocument>
@ -35,32 +34,27 @@
#include <QStandardPaths> #include <QStandardPaths>
#include <fontdialog/fontdialog.h> #include <fontdialog/fontdialog.h>
#include <pdebug/pdebug.h>
#include "extscript.h" #include "awdebug.h"
#include "graphicalitem.h"
#include "version.h" #include "version.h"
AWActions::AWActions(QObject *parent) AWActions::AWActions(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
// debug qCDebug(LOG_AW);
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
debug = (debugEnv == QString("yes"));
} }
AWActions::~AWActions() AWActions::~AWActions()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
} }
void AWActions::checkUpdates() void AWActions::checkUpdates()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QNetworkAccessManager *manager = new QNetworkAccessManager(this); QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(versionReplyRecieved(QNetworkReply *))); connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(versionReplyRecieved(QNetworkReply *)));
@ -71,7 +65,7 @@ void AWActions::checkUpdates()
bool AWActions::dropCache() const bool AWActions::dropCache() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QString fileName = QString("%1/awesomewidgets.ndx") QString fileName = QString("%1/awesomewidgets.ndx")
.arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)); .arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation));
@ -82,16 +76,16 @@ bool AWActions::dropCache() const
bool AWActions::isDebugEnabled() const bool AWActions::isDebugEnabled() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
return debug; return LOG_AW().isDebugEnabled();
} }
void AWActions::runCmd(const QString cmd) const void AWActions::runCmd(const QString cmd) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd; qCDebug(LOG_AW) << "Cmd" << cmd;
QProcess command; QProcess command;
sendNotification(QString("Info"), i18n("Run %1", cmd)); sendNotification(QString("Info"), i18n("Run %1", cmd));
@ -102,13 +96,13 @@ void AWActions::runCmd(const QString cmd) const
void AWActions::sendEmail() const void AWActions::sendEmail() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
} }
void AWActions::showReadme() const void AWActions::showReadme() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QDesktopServices::openUrl(QString(HOMEPAGE)); QDesktopServices::openUrl(QString(HOMEPAGE));
} }
@ -116,8 +110,8 @@ void AWActions::showReadme() const
QString AWActions::getAboutText(const QString type) const QString AWActions::getAboutText(const QString type) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Type" << type; qCDebug(LOG_AW) << "Type" << type;
QString text; QString text;
if (type == QString("header")) if (type == QString("header"))
@ -155,7 +149,8 @@ QString AWActions::getAboutText(const QString type) const
QVariantMap AWActions::getFont(const QVariantMap defaultFont) const QVariantMap AWActions::getFont(const QVariantMap defaultFont) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Default font is" << defaultFont;
QVariantMap fontMap; QVariantMap fontMap;
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(), CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
@ -173,10 +168,10 @@ QVariantMap AWActions::getFont(const QVariantMap defaultFont) const
QVariantMap AWActions::readDataEngineConfiguration() const QVariantMap AWActions::readDataEngineConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString("plasma-dataengine-extsysmon.conf")); QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString("plasma-dataengine-extsysmon.conf"));
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName; qCInfo(LOG_AW) << "Configuration file" << fileName;
QSettings settings(fileName, QSettings::IniFormat); QSettings settings(fileName, QSettings::IniFormat);
QVariantMap configuration; QVariantMap configuration;
@ -189,6 +184,7 @@ QVariantMap AWActions::readDataEngineConfiguration() const
configuration[QString("MPDPORT")] = settings.value(QString("MPDPORT"), QString("6600")); configuration[QString("MPDPORT")] = settings.value(QString("MPDPORT"), QString("6600"));
configuration[QString("MPRIS")] = settings.value(QString("MPRIS"), QString("auto")); configuration[QString("MPRIS")] = settings.value(QString("MPRIS"), QString("auto"));
configuration[QString("PLAYER")] = settings.value(QString("PLAYER"), QString("mpris")); configuration[QString("PLAYER")] = settings.value(QString("PLAYER"), QString("mpris"));
configuration[QString("PLAYERSYMBOLS")] = settings.value(QString("PLAYERSYMBOLS"), QString("10"));
settings.endGroup(); settings.endGroup();
return configuration; return configuration;
@ -197,11 +193,11 @@ QVariantMap AWActions::readDataEngineConfiguration() const
void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) const void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QString fileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QString("/plasma-dataengine-extsysmon.conf"); QString fileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QString("/plasma-dataengine-extsysmon.conf");
QSettings settings(fileName, QSettings::IniFormat); QSettings settings(fileName, QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_AW) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Configuration")); settings.beginGroup(QString("Configuration"));
settings.setValue(QString("ACPIPATH"), configuration[QString("ACPIPATH")]); settings.setValue(QString("ACPIPATH"), configuration[QString("ACPIPATH")]);
@ -212,6 +208,7 @@ void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) co
settings.setValue(QString("MPDPORT"), configuration[QString("MPDPORT")]); settings.setValue(QString("MPDPORT"), configuration[QString("MPDPORT")]);
settings.setValue(QString("MPRIS"), configuration[QString("MPRIS")]); settings.setValue(QString("MPRIS"), configuration[QString("MPRIS")]);
settings.setValue(QString("PLAYER"), configuration[QString("PLAYER")]); settings.setValue(QString("PLAYER"), configuration[QString("PLAYER")]);
settings.setValue(QString("PLAYERSYMBOLS"), configuration[QString("PLAYERSYMBOLS")]);
settings.endGroup(); settings.endGroup();
settings.sync(); settings.sync();
@ -221,6 +218,9 @@ void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) co
void AWActions::sendNotification(const QString eventId, const QString message, void AWActions::sendNotification(const QString eventId, const QString message,
const bool enablePopup) const bool enablePopup)
{ {
qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Event" << eventId;
qCDebug(LOG_AW) << "Message" << message;
if ((eventId == QString("event")) && (!enablePopup)) return; if ((eventId == QString("event")) && (!enablePopup)) return;
KNotification *notification = KNotification::event(eventId, QString("Awesome Widget ::: %1").arg(eventId), message); KNotification *notification = KNotification::event(eventId, QString("Awesome Widget ::: %1").arg(eventId), message);
@ -230,7 +230,7 @@ void AWActions::sendNotification(const QString eventId, const QString message,
void AWActions::showUpdates(QString version) const void AWActions::showUpdates(QString version) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QString text; QString text;
text += i18n("Current version : %1", QString(VERSION)) + QString("\n"); text += i18n("Current version : %1", QString(VERSION)) + QString("\n");
@ -249,14 +249,16 @@ void AWActions::showUpdates(QString version) const
void AWActions::versionReplyRecieved(QNetworkReply *reply) const void AWActions::versionReplyRecieved(QNetworkReply *reply) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Return code" << reply->error();
qCDebug(LOG_AW) << "Reply error message" << reply->errorString();
QJsonParseError error; QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error); QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error);
reply->deleteLater(); reply->deleteLater();
if (debug) qDebug() << PDEBUG << ":" << "Json parse error" << error.errorString();
if ((reply->error() != QNetworkReply::NoError) || if ((reply->error() != QNetworkReply::NoError) ||
(error.error != QJsonParseError::NoError)) { (error.error != QJsonParseError::NoError)) {
qCWarning(LOG_AW) << "Parse error" << error.errorString();
return; return;
} }
@ -264,6 +266,7 @@ void AWActions::versionReplyRecieved(QNetworkReply *reply) const
QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap(); QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap();
QString version = firstRelease[QString("tag_name")].toString(); QString version = firstRelease[QString("tag_name")].toString();
version.remove(QString("V.")); version.remove(QString("V."));
qCInfo(LOG_AW) << "Found version" << version;
int old_major = QString(VERSION).split(QChar('.')).at(0).toInt(); int old_major = QString(VERSION).split(QChar('.')).at(0).toInt();
int old_minor = QString(VERSION).split(QChar('.')).at(1).toInt(); int old_minor = QString(VERSION).split(QChar('.')).at(1).toInt();

View File

@ -30,8 +30,8 @@ class AWActions : public QObject
Q_OBJECT Q_OBJECT
public: public:
AWActions(QObject *parent = nullptr); explicit AWActions(QObject *parent = nullptr);
~AWActions(); virtual ~AWActions();
Q_INVOKABLE void checkUpdates(); Q_INVOKABLE void checkUpdates();
Q_INVOKABLE bool dropCache() const; Q_INVOKABLE bool dropCache() const;
@ -55,8 +55,6 @@ private slots:
void versionReplyRecieved(QNetworkReply *reply) const; void versionReplyRecieved(QNetworkReply *reply) const;
private: private:
// variables
bool debug = false;
}; };

View File

@ -20,49 +20,47 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDateTime> #include <QDateTime>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QInputDialog> #include <QInputDialog>
#include <QLocale>
#include <QNetworkInterface> #include <QNetworkInterface>
#include <QProcessEnvironment>
#include <QRegExp> #include <QRegExp>
#include <QScriptEngine>
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
#include <QThread> #include <QThread>
#include <pdebug/pdebug.h>
#include "awactions.h" #include "awactions.h"
#include "awdebug.h"
#include "awtooltip.h" #include "awtooltip.h"
#include "extquotes.h" #include "extquotes.h"
#include "extscript.h" #include "extscript.h"
#include "extupgrade.h" #include "extupgrade.h"
#include "extweather.h" #include "extweather.h"
#include "graphicalitem.h" #include "graphicalitem.h"
#include "version.h"
AWKeys::AWKeys(QObject *parent) AWKeys::AWKeys(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
// debug qCDebug(LOG_AW);
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no")); // logging
debug = (debugEnv == QString("yes")); qSetMessagePattern(LOG_FORMAT);
// backend // backend
graphicalItems = new ExtItemAggregator<GraphicalItem>(nullptr, QString("desktops"), debug); graphicalItems = new ExtItemAggregator<GraphicalItem>(nullptr, QString("desktops"));
extQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"), debug); extQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"));
extScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"), debug); extScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"));
extUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"), debug); extUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"));
extWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"), debug); extWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"));
connect(this, SIGNAL(needToBeUpdated()), this, SLOT(dataUpdate())); connect(this, SIGNAL(needToBeUpdated()), this, SLOT(dataUpdate()));
} }
AWKeys::~AWKeys() AWKeys::~AWKeys()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (toolTip != nullptr) delete toolTip; if (toolTip != nullptr) delete toolTip;
@ -76,12 +74,8 @@ AWKeys::~AWKeys()
void AWKeys::initKeys(const QString currentPattern) void AWKeys::initKeys(const QString currentPattern)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Pattern" << currentPattern;
// clear
keys.clear();
foundBars.clear();
foundKeys.clear();
// init // init
pattern = currentPattern; pattern = currentPattern;
@ -95,7 +89,8 @@ void AWKeys::initKeys(const QString currentPattern)
void AWKeys::initTooltip(const QVariantMap tooltipParams) void AWKeys::initTooltip(const QVariantMap tooltipParams)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Tooltip parameters" << tooltipParams;
if (toolTip != nullptr) { if (toolTip != nullptr) {
disconnect(toolTip, SIGNAL(toolTipPainted(QString)), this, SIGNAL(needToolTipToBeUpdated(QString))); disconnect(toolTip, SIGNAL(toolTipPainted(QString)), this, SIGNAL(needToolTipToBeUpdated(QString)));
@ -110,42 +105,34 @@ void AWKeys::initTooltip(const QVariantMap tooltipParams)
void AWKeys::setPopupEnabled(const bool popup) void AWKeys::setPopupEnabled(const bool popup)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Is popup enabled" << popup;
enablePopup = popup; enablePopup = popup;
} }
void AWKeys::setTranslateStrings(const bool translate)
{
qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Is translation enabled" << translate;
translateStrings = translate;
}
void AWKeys::setWrapNewLines(const bool wrap) void AWKeys::setWrapNewLines(const bool wrap)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Is wrapping enabled" << wrap;
wrapNewLines = wrap; wrapNewLines = wrap;
} }
QString AWKeys::parsePattern() const
{
if (debug) qDebug() << PDEBUG;
if (keys.isEmpty()) return pattern;
QString parsed = pattern;
parsed.replace(QString("$$"), QString("$\\$\\"));
foreach(QString key, foundKeys)
parsed.replace(QString("$%1").arg(key), htmlValue(key));
foreach(QString bar, foundBars)
parsed.replace(QString("$%1").arg(bar), getItemByTag(bar)->image(valueByKey(bar).toFloat()));
parsed.replace(QString("$\\$\\"), QString("$$"));
// wrap new lines if required
if (wrapNewLines) parsed.replace(QString("\n"), QString("<br>"));
return parsed;
}
QSize AWKeys::toolTipSize() const QSize AWKeys::toolTipSize() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (toolTip == nullptr) return QSize(); if (toolTip == nullptr) return QSize();
return toolTip->getSize(); return toolTip->getSize();
@ -154,32 +141,43 @@ QSize AWKeys::toolTipSize() const
void AWKeys::addDevice(const QString source) void AWKeys::addDevice(const QString source)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Source" << source; qCDebug(LOG_AW) << "Source" << source;
QRegExp diskRegexp = QRegExp(QString("disk/(?:md|sd|hd)[a-z|0-9]_.*/Rate/(?:rblk)")); QRegExp diskRegexp = QRegExp(QString("disk/(?:md|sd|hd)[a-z|0-9]_.*/Rate/(?:rblk)"));
QRegExp mountRegexp = QRegExp(QString("partitions/.*/filllevel")); QRegExp mountRegexp = QRegExp(QString("partitions/.*/filllevel"));
QRegExp tempRegexp = QRegExp(QString("lmsensors/.*"));
if (diskRegexp.indexIn(source) > -1) { if (source.contains(diskRegexp)) {
QString device = source; QString device = source;
device.remove(QString("/Rate/rblk")); device.remove(QString("/Rate/rblk"));
addKeyToCache(QString("Disk"), device); addKeyToCache(QString("Disk"), device);
} else if (mountRegexp.indexIn(source) > -1) { } else if (source.contains(mountRegexp)) {
QString device = source; QString device = source;
device.remove(QString("partitions")).remove(QString("/filllevel")); device.remove(QString("partitions")).remove(QString("/filllevel"));
addKeyToCache(QString("Mount"), device); addKeyToCache(QString("Mount"), device);
} else if (tempRegexp.indexIn(source) > -1) { } else if (source.startsWith(QString("lmsensors"))) {
addKeyToCache(QString("Temp"), source); addKeyToCache(QString("Temp"), source);
} }
} }
QStringList AWKeys::dictKeys(const bool sorted) const QStringList AWKeys::dictKeys(const bool sorted, const QString regexp) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Should be sorted" << sorted;
qCDebug(LOG_AW) << "Filter" << regexp;
QStringList allKeys; QStringList allKeys;
// weather
for (int i=extWeather->items().count()-1; i>=0; i--) {
if (!extWeather->items().at(i)->isActive()) continue;
allKeys.append(extWeather->items().at(i)->tag(QString("weatherId")));
allKeys.append(extWeather->items().at(i)->tag(QString("weather")));
allKeys.append(extWeather->items().at(i)->tag(QString("humidity")));
allKeys.append(extWeather->items().at(i)->tag(QString("pressure")));
allKeys.append(extWeather->items().at(i)->tag(QString("temperature")));
allKeys.append(extWeather->items().at(i)->tag(QString("timestamp")));
}
// time // time
allKeys.append(QString("time")); allKeys.append(QString("time"));
allKeys.append(QString("isotime")); allKeys.append(QString("isotime"));
@ -189,13 +187,12 @@ QStringList AWKeys::dictKeys(const bool sorted) const
// uptime // uptime
allKeys.append(QString("uptime")); allKeys.append(QString("uptime"));
allKeys.append(QString("cuptime")); allKeys.append(QString("cuptime"));
// cpuclock // cpuclock & cpu
for (int i=numberCpus()-1; i>=0; i--) for (int i=QThread::idealThreadCount()-1; i>=0; i--) {
allKeys.append(QString("cpucl%1").arg(i)); allKeys.append(QString("cpucl%1").arg(i));
allKeys.append(QString("cpucl"));
// cpu
for (int i=numberCpus()-1; i>=0; i--)
allKeys.append(QString("cpu%1").arg(i)); allKeys.append(QString("cpu%1").arg(i));
}
allKeys.append(QString("cpucl"));
allKeys.append(QString("cpu")); allKeys.append(QString("cpu"));
// temperature // temperature
for (int i=tempDevices.count()-1; i>=0; i--) for (int i=tempDevices.count()-1; i>=0; i--)
@ -242,10 +239,18 @@ QStringList AWKeys::dictKeys(const bool sorted) const
allKeys.append(QString("hddtemp%1").arg(i)); allKeys.append(QString("hddtemp%1").arg(i));
// network // network
for (int i=networkDevices.count()-1; i>=0; i--) { for (int i=networkDevices.count()-1; i>=0; i--) {
allKeys.append(QString("downunits%1").arg(i));
allKeys.append(QString("upunits%1").arg(i));
allKeys.append(QString("downkb%1").arg(i));
allKeys.append(QString("down%1").arg(i)); allKeys.append(QString("down%1").arg(i));
allKeys.append(QString("upkb%1").arg(i));
allKeys.append(QString("up%1").arg(i)); allKeys.append(QString("up%1").arg(i));
} }
allKeys.append(QString("downunits"));
allKeys.append(QString("upunits"));
allKeys.append(QString("downkb"));
allKeys.append(QString("down")); allKeys.append(QString("down"));
allKeys.append(QString("upkb"));
allKeys.append(QString("up")); allKeys.append(QString("up"));
allKeys.append(QString("netdev")); allKeys.append(QString("netdev"));
// battery // battery
@ -263,6 +268,12 @@ QStringList AWKeys::dictKeys(const bool sorted) const
allKeys.append(QString("duration")); allKeys.append(QString("duration"));
allKeys.append(QString("progress")); allKeys.append(QString("progress"));
allKeys.append(QString("title")); allKeys.append(QString("title"));
allKeys.append(QString("dalbum"));
allKeys.append(QString("dartist"));
allKeys.append(QString("dtitle"));
allKeys.append(QString("salbum"));
allKeys.append(QString("sartist"));
allKeys.append(QString("stitle"));
// ps // ps
allKeys.append(QString("pscount")); allKeys.append(QString("pscount"));
allKeys.append(QString("pstotal")); allKeys.append(QString("pstotal"));
@ -298,16 +309,6 @@ QStringList AWKeys::dictKeys(const bool sorted) const
allKeys.append(QString("la15")); allKeys.append(QString("la15"));
allKeys.append(QString("la5")); allKeys.append(QString("la5"));
allKeys.append(QString("la1")); allKeys.append(QString("la1"));
// weather
for (int i=extWeather->items().count()-1; i>=0; i--) {
if (!extWeather->items().at(i)->isActive()) continue;
allKeys.append(extWeather->items().at(i)->tag(QString("weatherId")));
allKeys.append(extWeather->items().at(i)->tag(QString("weather")));
allKeys.append(extWeather->items().at(i)->tag(QString("humidity")));
allKeys.append(extWeather->items().at(i)->tag(QString("pressure")));
allKeys.append(extWeather->items().at(i)->tag(QString("temperature")));
allKeys.append(extWeather->items().at(i)->tag(QString("timestamp")));
}
// bars // bars
QStringList graphicalItemsKeys; QStringList graphicalItemsKeys;
foreach(GraphicalItem *item, graphicalItems->items()) foreach(GraphicalItem *item, graphicalItems->items())
@ -319,13 +320,13 @@ QStringList AWKeys::dictKeys(const bool sorted) const
// sort if required // sort if required
if (sorted) allKeys.sort(); if (sorted) allKeys.sort();
return allKeys; return allKeys.filter(QRegExp(regexp));
} }
QStringList AWKeys::getHddDevices() const QStringList AWKeys::getHddDevices() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QStringList devices = hddDevices; QStringList devices = hddDevices;
// required by ui interface // required by ui interface
@ -339,15 +340,12 @@ QStringList AWKeys::getHddDevices() const
void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data, void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
const QVariantMap params) const QVariantMap params)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Source" << sourceName; qCDebug(LOG_AW) << "Source" << sourceName;
if (debug) qDebug() << PDEBUG << ":" << "Data" << data; qCDebug(LOG_AW) << "Data" << data;
if (sourceName == QString("update")) return emit(needToBeUpdated()); if (sourceName == QString("update")) return emit(needToBeUpdated());
// checking
if (keys.isEmpty()) return;
// regular expressions // regular expressions
QRegExp cpuRegExp = QRegExp(QString("cpu/cpu.*/TotalLoad")); QRegExp cpuRegExp = QRegExp(QString("cpu/cpu.*/TotalLoad"));
QRegExp cpuclRegExp = QRegExp(QString("cpu/cpu.*/clock")); QRegExp cpuclRegExp = QRegExp(QString("cpu/cpu.*/clock"));
@ -356,9 +354,7 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
QRegExp mountFillRegExp = QRegExp(QString("partitions/.*/filllevel")); QRegExp mountFillRegExp = QRegExp(QString("partitions/.*/filllevel"));
QRegExp mountFreeRegExp = QRegExp(QString("partitions/.*/freespace")); QRegExp mountFreeRegExp = QRegExp(QString("partitions/.*/freespace"));
QRegExp mountUsedRegExp = QRegExp(QString("partitions/.*/usedspace")); QRegExp mountUsedRegExp = QRegExp(QString("partitions/.*/usedspace"));
QRegExp netRecRegExp = QRegExp(QString("network/interfaces/.*/receiver/data")); QRegExp netRegExp = QRegExp(QString("network/interfaces/.*/(receiver|transmitter)/data$"));
QRegExp netTransRegExp = QRegExp(QString("network/interfaces/.*/transmitter/data"));
QRegExp tempRegExp = QRegExp(QString("lmsensors/.*"));
if (sourceName == QString("battery")) { if (sourceName == QString("battery")) {
// battery // battery
@ -512,7 +508,7 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
// percentage // percentage
float value = 100.0 * values[QString("memmb")].toFloat() / values[QString("memtotmb")].toFloat(); float value = 100.0 * values[QString("memmb")].toFloat() / values[QString("memtotmb")].toFloat();
// notification // notification
if ((value >= 90.0) && (values[QString("mem")].toFloat() < 90.0)) if ((!isnan(value)) && (value >= 90.0) && (values[QString("mem")].toFloat() < 90.0))
AWActions::sendNotification(QString("event"), i18n("High memory usage"), enablePopup); AWActions::sendNotification(QString("event"), i18n("High memory usage"), enablePopup);
// value // value
values[QString("mem")] = QString("%1").arg(value, 5, 'f', 1); values[QString("mem")] = QString("%1").arg(value, 5, 'f', 1);
@ -525,56 +521,41 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
enablePopup); enablePopup);
// value // value
values[QString("netdev")] = data[QString("value")].toString(); values[QString("netdev")] = data[QString("value")].toString();
} else if (sourceName.contains(netRecRegExp)) { } else if (sourceName.contains(netRegExp)) {
// download speed // network speed
QString device = sourceName; QString type = sourceName.contains(QString("receiver")) ? QString("down") : QString("up");
// device name
QString device = sourceName.split(QChar('/'))[2];
// values
float value = data[QString("value")].toFloat(); float value = data[QString("value")].toFloat();
device.remove(QString("network/interfaces/")).remove(QString("/receiver/data")); QString simplifiedValue = value > 1000.0 ?
QStringList allNetworkDevices = networkDevices; QString("%1").arg(value / 1024.0, 4, 'f', 1) :
for (int i=0; i<allNetworkDevices.count(); i++) { QString("%1").arg(value, 4, 'f', 0);
if (allNetworkDevices.at(i) != device) continue; // units
if (value > 1000.0) QString units;
values[QString("down%1").arg(i)] = QString("%1").arg(value / 1024.0, 4, 'f', 1); if (translateStrings)
else units = value > 1000.0 ? i18n("MB/s") : i18n("KB/s");
values[QString("down%1").arg(i)] = QString("%1").arg(value, 4, 'f', 0); else
units = value > 1000.0 ? QString("MB/s") : QString("KB/s");
// update
for (int i=0; i<networkDevices.count(); i++) {
if (networkDevices.at(i) != device) continue;
values[QString("%1kb%2").arg(type).arg(i)] = QString("%1").arg(value, 4, 'f', 0);
values[QString("%1%2").arg(type).arg(i)] = simplifiedValue;
values[QString("%1units%2").arg(type).arg(i)] = units;
break; break;
} }
if (device == values[QString("netdev")]) { if (device == values[QString("netdev")]) {
if (value > 1000.0) values[QString("%1kb").arg(type)] = QString("%1").arg(value, 4, 'f', 0);
values[QString("down")] = QString("%1").arg(value / 1024.0, 4, 'f', 1); values[type] = simplifiedValue;
else values[QString("%1units").arg(type)] = units;
values[QString("down")] = QString("%1").arg(value, 4, 'f', 0);
}
} else if (sourceName.contains(netTransRegExp)) {
// upload speed
QString device = sourceName;
float value = data[QString("value")].toFloat();
device.remove(QString("network/interfaces/")).remove(QString("/transmitter/data"));
QStringList allNetworkDevices = networkDevices;
for (int i=0; i<allNetworkDevices.count(); i++) {
if (allNetworkDevices.at(i) != device) continue;
if (value > 1000.0)
values[QString("up%1").arg(i)] = QString("%1").arg(data[QString("value")].toFloat() / 1024.0, 4, 'f', 1);
else
values[QString("up%1").arg(i)] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
break;
}
if (device == values[QString("netdev")]) {
if (value > 1000.0)
values[QString("up")] = QString("%1").arg(value / 1024.0, 4, 'f', 1);
else
values[QString("up")] = QString("%1").arg(value, 4, 'f', 0);
} }
} else if (sourceName == QString("pkg")) { } else if (sourceName == QString("pkg")) {
// package manager // package manager
foreach(QString key, data.keys()) values[key] = QString("%1").arg(data[key].toInt(), 2); foreach(QString key, data.keys()) values[key] = QString("%1").arg(data[key].toInt(), 2);
} else if (sourceName == QString("player")) { } else if (sourceName == QString("player")) {
// player // player
values[QString("album")] = data[QString("album")].toString(); foreach(QString key, data.keys()) values[key] = data[key].toString();
values[QString("artist")] = data[QString("artist")].toString();
values[QString("duration")] = data[QString("duration")].toString();
values[QString("progress")] = data[QString("progress")].toString();
values[QString("title")] = data[QString("title")].toString();
} else if (sourceName == QString("ps")) { } else if (sourceName == QString("ps")) {
// ps // ps
values[QString("ps")] = data[QString("ps")].toString(); values[QString("ps")] = data[QString("ps")].toString();
@ -599,11 +580,11 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
// percentage // percentage
float value = 100.0 * values[QString("swapmb")].toFloat() / values[QString("swaptotmb")].toFloat(); float value = 100.0 * values[QString("swapmb")].toFloat() / values[QString("swaptotmb")].toFloat();
// notification // notification
if ((value > 0.0) && (values[QString("swap")].toFloat() == 0.0)) if ((!isnan(value)) && (value > 0.0) && (values[QString("swap")].toFloat() == 0.0))
AWActions::sendNotification(QString("event"), i18n("Swap is used"), enablePopup); AWActions::sendNotification(QString("event"), i18n("Swap is used"), enablePopup);
// value // value
values[QString("swap")] = QString("%1").arg(value, 5, 'f', 1); values[QString("swap")] = QString("%1").arg(value, 5, 'f', 1);
} else if (sourceName.contains(tempRegExp)) { } else if (sourceName.startsWith(QString("lmsensors/"))) {
// temperature devices // temperature devices
for (int i=0; i<tempDevices.count(); i++) { for (int i=0; i<tempDevices.count(); i++) {
if (sourceName != tempDevices.at(i)) continue; if (sourceName != tempDevices.at(i)) continue;
@ -614,15 +595,17 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
break; break;
} }
} else if (sourceName == QString("Local")) { } else if (sourceName == QString("Local")) {
// init locale
QLocale loc = translateStrings ? QLocale::system() : QLocale::c();
QDateTime dt = data[QString("DateTime")].toDateTime();
// time // time
values[QString("time")] = data[QString("DateTime")].toDateTime().toString(Qt::TextDate); values[QString("time")] = dt.toString(Qt::TextDate);
values[QString("isotime")] = data[QString("DateTime")].toDateTime().toString(Qt::ISODate); values[QString("isotime")] = dt.toString(Qt::ISODate);
values[QString("shorttime")] = data[QString("DateTime")].toDateTime().toString(Qt::SystemLocaleShortDate); values[QString("shorttime")] = loc.toString(dt, QLocale::ShortFormat);
values[QString("longtime")] = data[QString("DateTime")].toDateTime().toString(Qt::SystemLocaleLongDate); values[QString("longtime")] = loc.toString(dt, QLocale::LongFormat);
values[QString("ctime")] = params[QString("customTime")].toString(); values[QString("ctime")] = params[QString("customTime")].toString();
foreach(QString key, getTimeKeys()) foreach(QString key, timeKeys)
values[QString("ctime")].replace(QString("$%1").arg(key), values[QString("ctime")].replace(QString("$%1").arg(key), loc.toString(dt, key));
data[QString("DateTime")].toDateTime().toString(key));
} else if (sourceName == QString("system/uptime")) { } else if (sourceName == QString("system/uptime")) {
// uptime // uptime
int uptime = data[QString("value")].toFloat(); int uptime = data[QString("value")].toFloat();
@ -653,7 +636,7 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
temperature(data[key].toFloat(), params[QString("tempUnits")].toString()), 4, 'f', 1); temperature(data[key].toFloat(), params[QString("tempUnits")].toString()), 4, 'f', 1);
} }
} else { } else {
if (debug) qDebug() << PDEBUG << ":" << "Source" << sourceName << "not found"; qCDebug(LOG_AW) << "Source" << sourceName << "not found";
emit(dropSourceFromDataengine(sourceName)); emit(dropSourceFromDataengine(sourceName));
} }
} }
@ -661,11 +644,11 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
void AWKeys::graphicalValueByKey() const void AWKeys::graphicalValueByKey() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
bool ok; bool ok;
QString tag = QInputDialog::getItem(nullptr, i18n("Select tag"), i18n("Tag"), QString tag = QInputDialog::getItem(nullptr, i18n("Select tag"), i18n("Tag"),
dictKeys(true), 0, false, &ok); dictKeys(true), 0, true, &ok);
if ((!ok) || (tag.isEmpty())) return; if ((!ok) || (tag.isEmpty())) return;
QString message = i18n("Tag: %1", tag); QString message = i18n("Tag: %1", tag);
@ -678,8 +661,8 @@ void AWKeys::graphicalValueByKey() const
QString AWKeys::infoByKey(QString key) const QString AWKeys::infoByKey(QString key) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Requested key" << key; qCDebug(LOG_AW) << "Requested key" << key;
key.remove(QRegExp(QString("^bar[0-9]{1,}"))); key.remove(QRegExp(QString("^bar[0-9]{1,}")));
if (key.startsWith(QString("custom"))) if (key.startsWith(QString("custom")))
@ -714,28 +697,20 @@ QString AWKeys::infoByKey(QString key) const
QString AWKeys::valueByKey(QString key) const QString AWKeys::valueByKey(QString key) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Requested key" << key; qCDebug(LOG_AW) << "Requested key" << key;
key.remove(QRegExp(QString("^bar[0-9]{1,}"))); return values[key.remove(QRegExp(QString("^bar[0-9]{1,}")))];
return values[key];
} }
void AWKeys::editItem(const QString type) void AWKeys::editItem(const QString type)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Item type" << type;
if (type == QString("graphicalitem")) { if (type == QString("graphicalitem")) {
QStringList bars; graphicalItems->setConfigArgs(dictKeys(true, QString("^(cpu(?!cl).*|gpu$|mem$|swap$|hdd[0-9].*|bat.*)")));
bars.append(keys.filter((QRegExp(QString("^cpu(?!cl).*")))));
bars.append(keys.filter((QRegExp(QString("^gpu$")))));
bars.append(keys.filter((QRegExp(QString("^mem$")))));
bars.append(keys.filter((QRegExp(QString("^swap$")))));
bars.append(keys.filter((QRegExp(QString("^hdd[0-9].*")))));
bars.append(keys.filter((QRegExp(QString("^bat.*")))));
graphicalItems->setConfigArgs(bars);
return graphicalItems->editItems(); return graphicalItems->editItems();
} else if (type == QString("extquotes")) { } else if (type == QString("extquotes")) {
return extQuotes->editItems(); return extQuotes->editItems();
@ -749,10 +724,11 @@ void AWKeys::editItem(const QString type)
} }
void AWKeys::dataUpdate() const void AWKeys::dataUpdate()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
calculateLambdas();
emit(needTextToBeUpdated(parsePattern())); emit(needTextToBeUpdated(parsePattern()));
if (toolTip != nullptr) emit(toolTip->updateData(values)); if (toolTip != nullptr) emit(toolTip->updateData(values));
} }
@ -760,11 +736,11 @@ void AWKeys::dataUpdate() const
void AWKeys::loadKeysFromCache() void AWKeys::loadKeysFromCache()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QString fileName = QString("%1/awesomewidgets.ndx") QString fileName = QString("%1/awesomewidgets.ndx")
.arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)); .arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation));
if (debug) qDebug() << PDEBUG << ":" << "Cache file" << fileName; qCInfo(LOG_AW) << "Cache file" << fileName;
QSettings cache(fileName, QSettings::IniFormat); QSettings cache(fileName, QSettings::IniFormat);
cache.beginGroup(QString("Disk")); cache.beginGroup(QString("Disk"));
@ -801,22 +777,70 @@ void AWKeys::loadKeysFromCache()
void AWKeys::reinitKeys() void AWKeys::reinitKeys()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
keys = dictKeys(); // init
foundBars = findGraphicalItems(); QStringList allKeys = dictKeys();
foundKeys = findKeys();
// append lists
// bars
foundBars = [allKeys](QString pattern) {
QStringList selectedKeys;
foreach(QString key, allKeys)
if ((key.startsWith(QString("bar"))) &&
(pattern.contains(QString("$%1").arg(key)))) {
qCInfo(LOG_AW) << "Found bar" << key;
selectedKeys.append(key);
}
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No bars found";
return selectedKeys;
}(pattern);
// main key list
foundKeys = [allKeys](QString pattern) {
QStringList selectedKeys;
foreach(QString key, allKeys)
if ((!key.startsWith(QString("bar"))) &&
(pattern.contains(QString("$%1").arg(key)))) {
qCInfo(LOG_AW) << "Found key" << key;
selectedKeys.append(key);
}
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No keys found";
return selectedKeys;
}(pattern);
// lambdas
foundLambdas = [](QString pattern) {
QStringList selectedKeys;
// substring inside ${{ }} (with brackets) which should not contain ${{
QRegularExpression lambdaRegexp(QString("\\$\\{\\{((?!\\$\\{\\{).)*?\\}\\}"));
lambdaRegexp.setPatternOptions(QRegularExpression::DotMatchesEverythingOption);
QRegularExpressionMatchIterator it = lambdaRegexp.globalMatch(pattern);
while (it.hasNext()) {
QRegularExpressionMatch match = it.next();
QString lambda = match.captured();
// drop brakets
lambda.remove(QRegExp(QString("^\\$\\{\\{")));
lambda.remove(QRegExp(QString("\\}\\}$")));
// append
qCInfo(LOG_AW) << "Found lambda" << lambda;
selectedKeys.append(lambda);
}
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No lambdas found";
return selectedKeys;
}(pattern);
} }
void AWKeys::addKeyToCache(const QString type, const QString key) void AWKeys::addKeyToCache(const QString type, const QString key)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Key type" << type; qCDebug(LOG_AW) << "Key type" << type;
if (debug) qDebug() << PDEBUG << ":" << "Key" << key; qCDebug(LOG_AW) << "Key" << key;
QString fileName = QString("%1/awesomewidgets.ndx").arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)); QString fileName = QString("%1/awesomewidgets.ndx").arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation));
if (debug) qDebug() << PDEBUG << ":" << "Cache file" << fileName; qCInfo(LOG_AW) << "Cache file" << fileName;
QSettings cache(fileName, QSettings::IniFormat); QSettings cache(fileName, QSettings::IniFormat);
cache.beginGroup(type); cache.beginGroup(type);
@ -830,7 +854,7 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
foreach(QString dev, devices) { foreach(QString dev, devices) {
QString device = QString("/dev/%1").arg(dev); QString device = QString("/dev/%1").arg(dev);
if (cachedValues.contains(device)) continue; if (cachedValues.contains(device)) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found new key" << device << "for type" << type; qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device); cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device);
} }
} else if (type == QString("Network")) { } else if (type == QString("Network")) {
@ -838,12 +862,12 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
foreach(QNetworkInterface interface, rawInterfaceList) { foreach(QNetworkInterface interface, rawInterfaceList) {
QString device = interface.name(); QString device = interface.name();
if (cachedValues.contains(device)) continue; if (cachedValues.contains(device)) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found new key" << device << "for type" << type; qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device); cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device);
} }
} else { } else {
if (cachedValues.contains(key)) return; if (cachedValues.contains(key)) return;
if (debug) qDebug() << PDEBUG << ":" << "Found new key" << key << "for type" << type; qCInfo(LOG_AW) << "Found new key" << key << "for type" << type;
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), key); cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), key);
} }
cache.endGroup(); cache.endGroup();
@ -854,29 +878,67 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
} }
QString AWKeys::htmlValue(QString key) const void AWKeys::calculateLambdas()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
if (debug) qDebug() << PDEBUG << ":" << "Requested key" << key;
QString value = values[key]; foreach(QString key, foundLambdas)
if (!key.startsWith(QString("custom"))) values[key] = [this](QString key) {
value.replace(QString(" "), QString("&nbsp;")); QScriptEngine engine;
return value; // apply $this values
key.replace(QString("$this"), values[key]);
foreach(QString lambdaKey, foundKeys)
key.replace(QString("$%1").arg(lambdaKey), values[lambdaKey]);
qCInfo(LOG_AW) << "Expression" << key;
QScriptValue result = engine.evaluate(key);
if (engine.hasUncaughtException()) {
int line = engine.uncaughtExceptionLineNumber();
qCWarning(LOG_AW) << "Uncaught exception at line" << line << ":" << result.toString();
return QString();
} else
return result.toString();
}(key);
} }
int AWKeys::numberCpus() const QString AWKeys::parsePattern() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
return QThread::idealThreadCount(); QString parsed = pattern;
parsed.replace(QString("$$"), QString("$\\$\\"));
// lambdas
foreach(QString key, foundLambdas)
parsed.replace(QString("${{%1}}").arg(key), values[key]);
// main keys
foreach(QString key, foundKeys)
parsed.replace(QString("$%1").arg(key), [](QString key, QString value) {
if ((!key.startsWith(QString("custom"))) &&
(!key.startsWith(QString("weather"))))
value.replace(QString(" "), QString("&nbsp;"));
return value;
}(key, values[key]));
// bars
foreach(QString bar, foundBars)
parsed.replace(QString("$%1").arg(bar),
graphicalItems->itemByTag(bar)->image(valueByKey(bar).toFloat()));
// prepare strings
parsed.replace(QString("$\\$\\"), QString("$$"));
if (wrapNewLines) parsed.replace(QString("\n"), QString("<br>"));
return parsed;
} }
float AWKeys::temperature(const float temp, const QString units) const float AWKeys::temperature(const float temp, const QString units) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Temperature value" << temp;
qCDebug(LOG_AW) << "Temperature units" << units;
float converted = temp; float converted = temp;
if (units == QString("Celsius")) if (units == QString("Celsius"))
@ -896,79 +958,3 @@ float AWKeys::temperature(const float temp, const QString units) const
return converted; return converted;
} }
QStringList AWKeys::findGraphicalItems() const
{
if (debug) qDebug() << PDEBUG;
QStringList orderedKeys;
foreach(GraphicalItem *item, graphicalItems->items())
orderedKeys.append(item->name() + item->bar());
orderedKeys.sort();
QStringList selectedKeys;
for (int i=orderedKeys.count()-1; i>=0; i--)
if (pattern.contains(QString("$%1").arg(orderedKeys.at(i)))) {
if (debug) qDebug() << PDEBUG << ":" << "Found key" << orderedKeys.at(i);
selectedKeys.append(orderedKeys.at(i));
}
return selectedKeys;
}
QStringList AWKeys::findKeys() const
{
QStringList selectedKeys;
foreach(QString key, keys) {
if (key.startsWith(QString("bar"))) continue;
if (pattern.contains(QString("$%1").arg(key))) {
if (debug) qDebug() << PDEBUG << ":" << "Found key" << key;
selectedKeys.append(key);
}
}
return selectedKeys;
}
GraphicalItem *AWKeys::getItemByTag(const QString tag) const
{
if (debug) qDebug() << PDEBUG;
GraphicalItem *item = nullptr;
foreach(GraphicalItem *gitem, graphicalItems->items()) {
if ((gitem->name() + gitem->bar()) != tag) continue;
item = gitem;
break;
}
return item;
}
QStringList AWKeys::getTimeKeys() const
{
if (debug) qDebug() << PDEBUG;
QStringList keys;
keys.append(QString("dddd"));
keys.append(QString("ddd"));
keys.append(QString("dd"));
keys.append(QString("d"));
keys.append(QString("MMMM"));
keys.append(QString("MMM"));
keys.append(QString("MM"));
keys.append(QString("M"));
keys.append(QString("yyyy"));
keys.append(QString("yy"));
keys.append(QString("hh"));
keys.append(QString("h"));
keys.append(QString("mm"));
keys.append(QString("m"));
keys.append(QString("ss"));
keys.append(QString("s"));
return keys;
}

View File

@ -25,6 +25,7 @@
#include <QVariant> #include <QVariant>
#include "extitemaggregator.h" #include "extitemaggregator.h"
#include "version.h"
class AWToolTip; class AWToolTip;
@ -39,18 +40,19 @@ class AWKeys : public QObject
Q_OBJECT Q_OBJECT
public: public:
AWKeys(QObject *parent = nullptr); explicit AWKeys(QObject *parent = nullptr);
~AWKeys(); virtual ~AWKeys();
Q_INVOKABLE void initKeys(const QString currentPattern); Q_INVOKABLE void initKeys(const QString currentPattern);
Q_INVOKABLE void initTooltip(const QVariantMap tooltipParams); Q_INVOKABLE void initTooltip(const QVariantMap tooltipParams);
Q_INVOKABLE void setPopupEnabled(const bool popup = false); Q_INVOKABLE void setPopupEnabled(const bool popup = false);
Q_INVOKABLE void setTranslateStrings(const bool translate = false);
Q_INVOKABLE void setWrapNewLines(const bool wrap = false); Q_INVOKABLE void setWrapNewLines(const bool wrap = false);
Q_INVOKABLE QString parsePattern() const;
Q_INVOKABLE QSize toolTipSize() const; Q_INVOKABLE QSize toolTipSize() const;
// keys // keys
Q_INVOKABLE void addDevice(const QString source); Q_INVOKABLE void addDevice(const QString source);
Q_INVOKABLE QStringList dictKeys(const bool sorted = false) const; Q_INVOKABLE QStringList dictKeys(const bool sorted = false,
const QString regexp = QString()) const;
Q_INVOKABLE QStringList getHddDevices() const; Q_INVOKABLE QStringList getHddDevices() const;
Q_INVOKABLE void setDataBySource(const QString sourceName, const QVariantMap data, Q_INVOKABLE void setDataBySource(const QString sourceName, const QVariantMap data,
const QVariantMap params); const QVariantMap params);
@ -68,25 +70,20 @@ signals:
void needToBeUpdated(); void needToBeUpdated();
private slots: private slots:
void dataUpdate() const; void dataUpdate();
void loadKeysFromCache(); void loadKeysFromCache();
void reinitKeys(); void reinitKeys();
private: private:
// methods // methods
void addKeyToCache(const QString type, const QString key = QString("")); void addKeyToCache(const QString type, const QString key = QString(""));
QString htmlValue(QString key) const; void calculateLambdas();
int numberCpus() const; QString parsePattern() const;
float temperature(const float temp, const QString units) const; float temperature(const float temp, const QString units) const;
// find methods
QStringList findGraphicalItems() const;
QStringList findKeys() const;
// get methods // get methods
GraphicalItem *getItemByTag(const QString tag) const;
QStringList getTimeKeys() const;
AWToolTip *toolTip = nullptr; AWToolTip *toolTip = nullptr;
bool debug = false;
bool enablePopup = false; bool enablePopup = false;
bool translateStrings = false;
bool wrapNewLines = false; bool wrapNewLines = false;
ExtItemAggregator<GraphicalItem> *graphicalItems; ExtItemAggregator<GraphicalItem> *graphicalItems;
ExtItemAggregator<ExtQuotes> *extQuotes; ExtItemAggregator<ExtQuotes> *extQuotes;
@ -94,7 +91,8 @@ private:
ExtItemAggregator<ExtUpgrade> *extUpgrade; ExtItemAggregator<ExtUpgrade> *extUpgrade;
ExtItemAggregator<ExtWeather> *extWeather; ExtItemAggregator<ExtWeather> *extWeather;
QString pattern; QString pattern;
QStringList foundBars, foundKeys, keys; QStringList foundBars, foundKeys, foundLambdas;
QStringList timeKeys = QString(TIME_KEYS).split(QChar(','));
QHash<QString, QString> values; QHash<QString, QString> values;
QStringList diskDevices, hddDevices, mountDevices, networkDevices, tempDevices; QStringList diskDevices, hddDevices, mountDevices, networkDevices, tempDevices;
}; };

View File

@ -18,21 +18,16 @@
#include "awtooltip.h" #include "awtooltip.h"
#include <QBuffer> #include <QBuffer>
#include <QDebug>
#include <QProcessEnvironment>
#include <math.h> #include <math.h>
#include <pdebug/pdebug.h> #include "awdebug.h"
AWToolTip::AWToolTip(QObject *parent, QVariantMap settings) AWToolTip::AWToolTip(QObject *parent, QVariantMap settings)
: QObject(parent), : QObject(parent),
configuration(qvariant_cast<QVariantHash>(settings)) configuration(qvariant_cast<QVariantHash>(settings))
{ {
// debug qCDebug(LOG_AW);
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
debug = (debugEnv == QString("yes"));
toolTipScene = new QGraphicsScene(nullptr); toolTipScene = new QGraphicsScene(nullptr);
toolTipView = new QGraphicsView(toolTipScene); toolTipView = new QGraphicsView(toolTipScene);
@ -74,7 +69,7 @@ AWToolTip::AWToolTip(QObject *parent, QVariantMap settings)
AWToolTip::~AWToolTip() AWToolTip::~AWToolTip()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
delete toolTipScene; delete toolTipScene;
} }
@ -82,7 +77,7 @@ AWToolTip::~AWToolTip()
void AWToolTip::dataUpdate(QHash<QString, QString> values) void AWToolTip::dataUpdate(QHash<QString, QString> values)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
// battery update requires info is AC online or not // battery update requires info is AC online or not
setData(QString("batTooltip"), values[QString("bat")].toFloat(), setData(QString("batTooltip"), values[QString("bat")].toFloat(),
@ -92,11 +87,8 @@ void AWToolTip::dataUpdate(QHash<QString, QString> values)
setData(QString("cpuclTooltip"), values[QString("cpucl")].toFloat()); setData(QString("cpuclTooltip"), values[QString("cpucl")].toFloat());
setData(QString("memTooltip"), values[QString("mem")].toFloat()); setData(QString("memTooltip"), values[QString("mem")].toFloat());
setData(QString("swapTooltip"), values[QString("swap")].toFloat()); setData(QString("swapTooltip"), values[QString("swap")].toFloat());
// network may be showed as float (MB/s) or as int (KB/s) setData(QString("downTooltip"), values[QString("downkb")].toFloat());
setData(QString("downTooltip"), values[QString("down")].contains(QChar('.')) ? setData(QString("upTooltip"), values[QString("upkb")].toFloat());
values[QString("down")].toFloat() * 1024.0 : values[QString("down")].toFloat());
setData(QString("upTooltip"), values[QString("up")].contains(QChar('.')) ?
values[QString("up")].toFloat() * 1024.0 : values[QString("up")].toFloat());
emit(toolTipPainted(htmlImage())); emit(toolTipPainted(htmlImage()));
} }
@ -104,7 +96,7 @@ void AWToolTip::dataUpdate(QHash<QString, QString> values)
QSize AWToolTip::getSize() const QSize AWToolTip::getSize() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
return size; return size;
} }
@ -112,20 +104,21 @@ QSize AWToolTip::getSize() const
QString AWToolTip::htmlImage() QString AWToolTip::htmlImage()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
QPixmap rawImage = image(); QPixmap rawImage = image();
QByteArray byteArray; QByteArray byteArray;
QBuffer buffer(&byteArray); QBuffer buffer(&byteArray);
rawImage.save(&buffer, "PNG"); rawImage.save(&buffer, "PNG");
return QString("<img src=\"data:image/png;base64,%1\"/>").arg(QString(byteArray.toBase64())); return byteArray.isEmpty() ? QString() :
QString("<img src=\"data:image/png;base64,%1\"/>").arg(QString(byteArray.toBase64()));
} }
QPixmap AWToolTip::image() QPixmap AWToolTip::image()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
toolTipView->resize(size); toolTipView->resize(size);
// create image // create image
@ -144,6 +137,7 @@ QPixmap AWToolTip::image()
float shift = i * 100.0; float shift = i * 100.0;
if (down) shift -= 100.0; if (down) shift -= 100.0;
for (int j=0; j<data[requiredKeys.at(i)].count()-1; j++) { for (int j=0; j<data[requiredKeys.at(i)].count()-1; j++) {
// some magic here
float x1 = j * normX + shift; float x1 = j * normX + shift;
float y1 = - fabs(data[requiredKeys.at(i)].at(j)) * normY + 5.0; float y1 = - fabs(data[requiredKeys.at(i)].at(j)) * normY + 5.0;
float x2 = (j + 1) * normX + shift; float x2 = (j + 1) * normX + shift;
@ -163,9 +157,12 @@ QPixmap AWToolTip::image()
} }
void AWToolTip::setData(const QString source, float value, const bool ac) void AWToolTip::setData(const QString source, float value, const bool dontInvert)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_AW);
qCDebug(LOG_AW) << "Source" << source;
qCDebug(LOG_AW) << "Value" << value;
qCDebug(LOG_AW) << "Do not invert value" << dontInvert;
if (data[source].count() == 0) if (data[source].count() == 0)
data[source].append(0.0); data[source].append(0.0);
@ -173,19 +170,12 @@ void AWToolTip::setData(const QString source, float value, const bool ac)
data[source].takeFirst(); data[source].takeFirst();
if (isnan(value)) value = 0.0; if (isnan(value)) value = 0.0;
if (ac) // invert values for different battery colours
data[source].append(value); data[source].append(dontInvert ? value : -value);
else
data[source].append(-value);
if ((source == QString("downTooltip")) || (source == QString("upTooltip"))) { if (source == QString("downTooltip")) {
foreach(float val, data[QString("downTooltip")]) QList<float> netValues = data[QString("downTooltip")] + data[QString("upTooltip")];
if (boundaries[QString("downTooltip")] < val) boundaries[QString("downTooltip")] = 1.2 * *std::max_element(netValues.cbegin(), netValues.cend());
boundaries[QString("downTooltip")] = val;
foreach(float val, data[QString("upTooltip")])
if (boundaries[QString("downTooltip")] < val)
boundaries[QString("downTooltip")] = val;
boundaries[QString("downTooltip")] *= 1.2;
boundaries[QString("upTooltip")] = boundaries[QString("downTooltip")]; boundaries[QString("upTooltip")] = boundaries[QString("downTooltip")];
} }
} }

View File

@ -32,8 +32,8 @@ class AWToolTip : public QObject
Q_OBJECT Q_OBJECT
public: public:
AWToolTip(QObject *parent = nullptr, QVariantMap settings = QVariantMap()); explicit AWToolTip(QObject *parent = nullptr, QVariantMap settings = QVariantMap());
~AWToolTip(); virtual ~AWToolTip();
QSize getSize() const; QSize getSize() const;
QString htmlImage(); QString htmlImage();
QPixmap image(); QPixmap image();
@ -50,9 +50,8 @@ private:
QGraphicsScene *toolTipScene = nullptr; QGraphicsScene *toolTipScene = nullptr;
QGraphicsView *toolTipView = nullptr; QGraphicsView *toolTipView = nullptr;
void setData(const QString source, float value, void setData(const QString source, float value,
const bool ac = true); const bool dontInvert = true);
// variables // variables
bool debug = false;
int counts = 0; int counts = 0;
QVariantHash configuration; QVariantHash configuration;
QHash<QString, float> boundaries; QHash<QString, float> boundaries;

View File

@ -1,3 +1,2 @@
module org.kde.plasma.private.awesomewidget module org.kde.plasma.private.awesomewidget
plugin awplugin plugin awplugin

View File

@ -12,7 +12,7 @@ include_directories(
${Kf5_INCLUDE} ${Kf5_INCLUDE}
) )
file(GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/qreplytimeout/*.cpp) file(GLOB SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/qreplytimeout/*.cpp ${CMAKE_SOURCE_DIR}/*.cpp)
file(GLOB SUBPROJECT_HEADER *.h ${PROJECT_TRDPARTY_DIR}/qreplytimeout/*.h) file(GLOB SUBPROJECT_HEADER *.h ${PROJECT_TRDPARTY_DIR}/qreplytimeout/*.h)
file(GLOB SUBPROJECT_UI *.ui) file(GLOB SUBPROJECT_UI *.ui)
set(SUBPROJECT_GRAPHITEMS ${CMAKE_CURRENT_SOURCE_DIR}/desktops) set(SUBPROJECT_GRAPHITEMS ${CMAKE_CURRENT_SOURCE_DIR}/desktops)
@ -20,6 +20,11 @@ set(SUBPROJECT_QUOTES ${CMAKE_CURRENT_SOURCE_DIR}/quotes)
set(SUBPROJECT_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/scripts) set(SUBPROJECT_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/scripts)
set(SUBPROJECT_UPGRADE ${CMAKE_CURRENT_SOURCE_DIR}/upgrade) set(SUBPROJECT_UPGRADE ${CMAKE_CURRENT_SOURCE_DIR}/upgrade)
set(SUBPROJECT_WEATHER ${CMAKE_CURRENT_SOURCE_DIR}/weather) set(SUBPROJECT_WEATHER ${CMAKE_CURRENT_SOURCE_DIR}/weather)
file(GLOB SUBPROJECT_WEATHER_JSON_IN *.json)
file(RELATIVE_PATH SUBPROJECT_WEATHER_JSON ${CMAKE_SOURCE_DIR} ${SUBPROJECT_WEATHER_JSON_IN})
# prepare
configure_file(${SUBPROJECT_WEATHER_JSON_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_WEATHER_JSON})
qt5_wrap_cpp(SUBPROJECT_MOC_SOURCE ${SUBPROJECT_HEADER}) qt5_wrap_cpp(SUBPROJECT_MOC_SOURCE ${SUBPROJECT_HEADER})
qt5_wrap_ui(SUBPROJECT_UI_HEADER ${SUBPROJECT_UI}) qt5_wrap_ui(SUBPROJECT_UI_HEADER ${SUBPROJECT_UI})
@ -33,3 +38,4 @@ install(DIRECTORY ${SUBPROJECT_QUOTES} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT
install(DIRECTORY ${SUBPROJECT_SCRIPTS} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) install(DIRECTORY ${SUBPROJECT_SCRIPTS} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME})
install(DIRECTORY ${SUBPROJECT_UPGRADE} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) install(DIRECTORY ${SUBPROJECT_UPGRADE} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME})
install(DIRECTORY ${SUBPROJECT_WEATHER} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) install(DIRECTORY ${SUBPROJECT_WEATHER} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_WEATHER_JSON} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/weather)

View File

@ -17,39 +17,41 @@
#include "abstractextitem.h" #include "abstractextitem.h"
#include <QDebug>
#include <QDir> #include <QDir>
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
#include <QTime> #include <QTime>
#include <pdebug/pdebug.h> #include "awdebug.h"
#include "version.h" #include "version.h"
AbstractExtItem::AbstractExtItem(QWidget *parent, const QString desktopName, AbstractExtItem::AbstractExtItem(QWidget *parent, const QString desktopName,
const QStringList directories, const bool debugCmd) const QStringList directories)
: QDialog(parent), : QDialog(parent),
m_fileName(desktopName), m_fileName(desktopName),
m_dirs(directories), m_dirs(directories)
debug(debugCmd)
{ {
qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Desktop name" << desktopName;
qCDebug(LOG_LIB) << "Directories" << directories;
m_name = m_fileName; m_name = m_fileName;
} }
AbstractExtItem::~AbstractExtItem() AbstractExtItem::~AbstractExtItem()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
} }
template <class T> template <class T>
T *AbstractExtItem::copy(const QString fileName, const int number) T *AbstractExtItem::copy(const QString _fileName, const int _number)
{ {
Q_UNUSED(fileName) Q_UNUSED(_fileName)
Q_UNUSED(number) Q_UNUSED(_number)
qCDebug(LOG_LIB);
// an analog of pure virtual method // an analog of pure virtual method
return new T(); return new T();
@ -59,7 +61,7 @@ T *AbstractExtItem::copy(const QString fileName, const int number)
int AbstractExtItem::apiVersion() const int AbstractExtItem::apiVersion() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_apiVersion; return m_apiVersion;
} }
@ -67,7 +69,7 @@ int AbstractExtItem::apiVersion() const
QString AbstractExtItem::comment() const QString AbstractExtItem::comment() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_comment; return m_comment;
} }
@ -75,7 +77,7 @@ QString AbstractExtItem::comment() const
QStringList AbstractExtItem::directories() const QStringList AbstractExtItem::directories() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_dirs; return m_dirs;
} }
@ -83,7 +85,7 @@ QStringList AbstractExtItem::directories() const
QString AbstractExtItem::fileName() const QString AbstractExtItem::fileName() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_fileName; return m_fileName;
} }
@ -91,7 +93,7 @@ QString AbstractExtItem::fileName() const
int AbstractExtItem::interval() const int AbstractExtItem::interval() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_interval; return m_interval;
} }
@ -99,7 +101,7 @@ int AbstractExtItem::interval() const
bool AbstractExtItem::isActive() const bool AbstractExtItem::isActive() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_active; return m_active;
} }
@ -107,7 +109,7 @@ bool AbstractExtItem::isActive() const
QString AbstractExtItem::name() const QString AbstractExtItem::name() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_name; return m_name;
} }
@ -115,7 +117,7 @@ QString AbstractExtItem::name() const
int AbstractExtItem::number() const int AbstractExtItem::number() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_number; return m_number;
} }
@ -123,8 +125,8 @@ int AbstractExtItem::number() const
QString AbstractExtItem::tag(const QString _type) const QString AbstractExtItem::tag(const QString _type) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Tag type" << _type; qCDebug(LOG_LIB) << "Tag type" << _type;
return QString("%1%2").arg(_type).arg(m_number); return QString("%1%2").arg(_type).arg(m_number);
} }
@ -132,8 +134,8 @@ QString AbstractExtItem::tag(const QString _type) const
void AbstractExtItem::setApiVersion(const int _apiVersion) void AbstractExtItem::setApiVersion(const int _apiVersion)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Version" << _apiVersion; qCDebug(LOG_LIB) << "Version" << _apiVersion;
m_apiVersion = _apiVersion; m_apiVersion = _apiVersion;
} }
@ -141,8 +143,8 @@ void AbstractExtItem::setApiVersion(const int _apiVersion)
void AbstractExtItem::setActive(const bool _state) void AbstractExtItem::setActive(const bool _state)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "State" << _state; qCDebug(LOG_LIB) << "State" << _state;
m_active = _state; m_active = _state;
} }
@ -150,8 +152,8 @@ void AbstractExtItem::setActive(const bool _state)
void AbstractExtItem::setComment(const QString _comment) void AbstractExtItem::setComment(const QString _comment)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Comment" << _comment; qCDebug(LOG_LIB) << "Comment" << _comment;
m_comment = _comment; m_comment = _comment;
} }
@ -159,8 +161,8 @@ void AbstractExtItem::setComment(const QString _comment)
void AbstractExtItem::setInterval(const int _interval) void AbstractExtItem::setInterval(const int _interval)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Interval" << _interval; qCDebug(LOG_LIB) << "Interval" << _interval;
if (_interval <= 0) return; if (_interval <= 0) return;
m_interval = _interval; m_interval = _interval;
@ -169,8 +171,8 @@ void AbstractExtItem::setInterval(const int _interval)
void AbstractExtItem::setName(const QString _name) void AbstractExtItem::setName(const QString _name)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Name" << _name; qCDebug(LOG_LIB) << "Name" << _name;
m_name = _name; m_name = _name;
} }
@ -178,14 +180,16 @@ void AbstractExtItem::setName(const QString _name)
void AbstractExtItem::setNumber(int _number) void AbstractExtItem::setNumber(int _number)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Number" << _number; qCDebug(LOG_LIB) << "Number" << _number;
if (_number == -1) { if (_number == -1)
if (debug) qDebug() << PDEBUG << ":" << "Number is empty, generate new one"; _number = []() {
qsrand(QTime::currentTime().msec()); qCWarning(LOG_LIB) << "Number is empty, generate new one";
_number = qrand() % 1000; qsrand(QTime::currentTime().msec());
if (debug) qDebug() << PDEBUG << ":" << "Generated number is" << _number; int n = qrand() % 1000;
} qCInfo(LOG_LIB) << "Generated number is" << n;
return n;
}();
m_number = _number; m_number = _number;
} }
@ -193,7 +197,7 @@ void AbstractExtItem::setNumber(int _number)
void AbstractExtItem::readConfiguration() void AbstractExtItem::readConfiguration()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
for (int i=m_dirs.count()-1; i>=0; i--) { for (int i=m_dirs.count()-1; i>=0; i--) {
if (!QDir(m_dirs.at(i)).entryList(QDir::Files).contains(m_fileName)) continue; if (!QDir(m_dirs.at(i)).entryList(QDir::Files).contains(m_fileName)) continue;
@ -213,11 +217,11 @@ void AbstractExtItem::readConfiguration()
bool AbstractExtItem::tryDelete() const bool AbstractExtItem::tryDelete() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
foreach(QString dir, m_dirs) { foreach(QString dir, m_dirs) {
bool status = QFile::remove(QString("%1/%2").arg(dir).arg(m_fileName)); bool status = QFile::remove(QString("%1/%2").arg(dir).arg(m_fileName));
if (debug) qDebug() << PDEBUG << ":" << "Remove file" << QString("%1/%2").arg(dir).arg(m_fileName) << status; qCInfo(LOG_LIB) << "Remove file" << QString("%1/%2").arg(dir).arg(m_fileName) << status;
} }
// check if exists // check if exists
@ -229,10 +233,10 @@ bool AbstractExtItem::tryDelete() const
void AbstractExtItem::writeConfiguration() const void AbstractExtItem::writeConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QSettings settings(QString("%1/%2").arg(m_dirs.first()).arg(m_fileName), QSettings::IniFormat); QSettings settings(QString("%1/%2").arg(m_dirs.first()).arg(m_fileName), QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_LIB) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("Encoding"), QString("UTF-8")); settings.setValue(QString("Encoding"), QString("UTF-8"));

View File

@ -38,10 +38,9 @@ class AbstractExtItem : public QDialog
public: public:
explicit AbstractExtItem(QWidget *parent = nullptr, const QString desktopName = QString(), explicit AbstractExtItem(QWidget *parent = nullptr, const QString desktopName = QString(),
const QStringList directories = QStringList(), const QStringList directories = QStringList());
const bool debugCmd = false);
virtual ~AbstractExtItem(); virtual ~AbstractExtItem();
template <class T> T *copy(const QString fileName, const int number); template <class T> T *copy(const QString _fileName, const int _number);
// get methods // get methods
int apiVersion() const; int apiVersion() const;
QString comment() const; QString comment() const;
@ -71,7 +70,6 @@ public slots:
private: private:
QString m_fileName; QString m_fileName;
QStringList m_dirs; QStringList m_dirs;
bool debug;
virtual void translate() = 0; virtual void translate() = 0;
// properties // properties
int m_apiVersion = 0; int m_apiVersion = 0;

View File

@ -19,18 +19,18 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDebug>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QInputDialog> #include <QInputDialog>
#include <QLineEdit> #include <QLineEdit>
#include <pdebug/pdebug.h> #include "awdebug.h"
AbstractExtItemAggregator::AbstractExtItemAggregator(QWidget *parent, const bool debugCmd) AbstractExtItemAggregator::AbstractExtItemAggregator(QWidget *parent)
: QWidget(parent), : QWidget(parent)
debug(debugCmd)
{ {
qCDebug(LOG_LIB);
dialog = new QDialog(this); dialog = new QDialog(this);
widgetDialog = new QListWidget(dialog); widgetDialog = new QListWidget(dialog);
dialogButtons = new QDialogButtonBox(QDialogButtonBox::Open | QDialogButtonBox::Close, dialogButtons = new QDialogButtonBox(QDialogButtonBox::Open | QDialogButtonBox::Close,
@ -53,7 +53,7 @@ AbstractExtItemAggregator::AbstractExtItemAggregator(QWidget *parent, const bool
AbstractExtItemAggregator::~AbstractExtItemAggregator() AbstractExtItemAggregator::~AbstractExtItemAggregator()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
delete dialog; delete dialog;
} }
@ -61,7 +61,7 @@ AbstractExtItemAggregator::~AbstractExtItemAggregator()
QString AbstractExtItemAggregator::getName() QString AbstractExtItemAggregator::getName()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
bool ok; bool ok;
QString name = QInputDialog::getText(this, i18n("Enter file name"), QString name = QInputDialog::getText(this, i18n("Enter file name"),
@ -76,7 +76,7 @@ QString AbstractExtItemAggregator::getName()
QVariant AbstractExtItemAggregator::configArgs() const QVariant AbstractExtItemAggregator::configArgs() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_configArgs; return m_configArgs;
} }
@ -84,8 +84,8 @@ QVariant AbstractExtItemAggregator::configArgs() const
void AbstractExtItemAggregator::setConfigArgs(const QVariant _configArgs) void AbstractExtItemAggregator::setConfigArgs(const QVariant _configArgs)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Configuration arguments" << _configArgs; qCDebug(LOG_LIB) << "Configuration arguments" << _configArgs;
m_configArgs = _configArgs; m_configArgs = _configArgs;
} }
@ -94,7 +94,7 @@ void AbstractExtItemAggregator::setConfigArgs(const QVariant _configArgs)
void AbstractExtItemAggregator::editItemActivated(QListWidgetItem *item) void AbstractExtItemAggregator::editItemActivated(QListWidgetItem *item)
{ {
Q_UNUSED(item) Q_UNUSED(item)
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return editItem(); return editItem();
} }
@ -102,7 +102,7 @@ void AbstractExtItemAggregator::editItemActivated(QListWidgetItem *item)
void AbstractExtItemAggregator::editItemButtonPressed(QAbstractButton *button) void AbstractExtItemAggregator::editItemButtonPressed(QAbstractButton *button)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (static_cast<QPushButton *>(button) == copyButton) if (static_cast<QPushButton *>(button) == copyButton)
return copyItem(); return copyItem();

View File

@ -33,7 +33,7 @@ class AbstractExtItemAggregator : public QWidget
Q_PROPERTY(QVariant configArgs READ configArgs WRITE setConfigArgs) Q_PROPERTY(QVariant configArgs READ configArgs WRITE setConfigArgs)
public: public:
AbstractExtItemAggregator(QWidget *parent = nullptr, const bool debugCmd = false); explicit AbstractExtItemAggregator(QWidget *parent = nullptr);
virtual ~AbstractExtItemAggregator(); virtual ~AbstractExtItemAggregator();
QString getName(); QString getName();
// ui // ui
@ -53,7 +53,6 @@ private slots:
void editItemButtonPressed(QAbstractButton *button); void editItemButtonPressed(QAbstractButton *button);
private: private:
bool debug;
QVariant m_configArgs; QVariant m_configArgs;
// methods // methods
virtual void copyItem() = 0; virtual void copyItem() = 0;

View File

@ -0,0 +1,139 @@
{
"__url": "http://openweathermap.org/weather-conditions",
"image": {
"__comment": "should be described as html image with full path inside",
"default": "",
"800": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/01d.png\">",
"801": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/02d.png\">",
"802": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/03d.png\">",
"803": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/03d.png\">",
"804": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/04d.png\">",
"300": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"301": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"302": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"310": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"311": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"312": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"313": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"314": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"321": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"520": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"521": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"522": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"531": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/09d.png\">",
"500": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/10d.png\">",
"501": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/10d.png\">",
"502": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/10d.png\">",
"503": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/10d.png\">",
"504": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/10d.png\">",
"200": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"201": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"202": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"210": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"211": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"212": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"221": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"230": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"231": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"232": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/11d.png\">",
"511": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"600": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"601": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"602": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"611": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"612": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"615": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"616": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"620": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"621": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"622": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/13d.png\">",
"701": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"711": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"721": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"731": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"741": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"751": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"761": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"762": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"771": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">",
"781": "<img src=\"@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/weather/50d.png\">"
},
"text": {
"default": "\u2604",
"800": "\u2600",
"801": "\u26C5",
"802": "\u2601",
"803": "\u2601",
"804": "\u2601",
"300": "\u2602",
"301": "\u2602",
"302": "\u2602",
"310": "\u2602",
"311": "\u2602",
"312": "\u2602",
"313": "\u2602",
"314": "\u2602",
"321": "\u2602",
"520": "\u2602",
"521": "\u2602",
"522": "\u2602",
"531": "\u2602",
"500": "\u2614",
"501": "\u2614",
"502": "\u2614",
"503": "\u2614",
"504": "\u2614",
"200": "\u2608",
"201": "\u2608",
"202": "\u2608",
"210": "\u2608",
"211": "\u2608",
"212": "\u2608",
"221": "\u2608",
"230": "\u2608",
"231": "\u2608",
"232": "\u2608",
"511": "\u2603",
"600": "\u2603",
"601": "\u2603",
"602": "\u2603",
"611": "\u2603",
"612": "\u2603",
"615": "\u2603",
"616": "\u2603",
"620": "\u2603",
"621": "\u2603",
"622": "\u2603",
"701": "\u26C5",
"711": "\u26C5",
"721": "\u26C5",
"731": "\u26C5",
"741": "\u26C5",
"751": "\u26C5",
"761": "\u26C5",
"762": "\u26C5",
"771": "\u26C5",
"781": "\u26C5"
}
}

View File

@ -20,12 +20,11 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
#include <pdebug/pdebug.h> #include "awdebug.h"
#include "abstractextitemaggregator.h" #include "abstractextitemaggregator.h"
@ -34,66 +33,105 @@ template <class T>
class ExtItemAggregator : public AbstractExtItemAggregator class ExtItemAggregator : public AbstractExtItemAggregator
{ {
public: public:
explicit ExtItemAggregator(QWidget *parent, const QString type, explicit ExtItemAggregator(QWidget *parent, const QString type)
const bool debugCmd = false) : AbstractExtItemAggregator(parent),
: AbstractExtItemAggregator(parent, debugCmd),
debug(debugCmd),
m_type(type) m_type(type)
{ {
qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Type" << type;
qSetMessagePattern(LOG_FORMAT);
initItems(); initItems();
}; };
~ExtItemAggregator() virtual ~ExtItemAggregator()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
m_items.clear(); m_items.clear();
} }
void editItems() void editItems()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
repaint(); repaint();
int ret = dialog->exec(); int ret = dialog->exec();
if (debug) qDebug() << PDEBUG << ":" << "Dialog returns" << ret; qCInfo(LOG_LIB) << "Dialog returns" << ret;
}; };
void initItems() void initItems()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
m_items.clear(); m_items.clear();
m_items = getItems(); m_items = getItems();
}; };
T *itemFromWidget() const T *itemByTag(const QString _tag) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Tag" << _tag;
QListWidgetItem *item = widgetDialog->currentItem(); T *found = nullptr;
if (item == nullptr) return nullptr; foreach(T *item, m_items) {
if (item->tag() != _tag) continue;
int originalItem = -1; found = item;
for (int i=0; i<m_items.count(); i++) {
if (m_items.at(i)->fileName() != item->text()) continue;
originalItem = i;
break; break;
} }
if (found == nullptr)
qCWarning(LOG_LIB) << "Could not find item by tag" << _tag;
return originalItem == -1 ? nullptr : m_items[originalItem]; return found;
}
T *itemByTagNumber(const int _number) const
{
qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Number" << _number;
T *found = nullptr;
foreach(T *item, m_items) {
if (item->number() != _number) continue;
found = item;
break;
}
if (found == nullptr)
qCWarning(LOG_LIB) << "Could not find item by number" << _number;
return found;
}
T *itemFromWidget() const
{
qCDebug(LOG_LIB);
QListWidgetItem *widgetItem = widgetDialog->currentItem();
if (widgetItem == nullptr) return nullptr;
T *found = nullptr;
foreach(T *item, m_items) {
if (item->fileName() != widgetItem->text()) continue;
found = item;
break;
}
if (found == nullptr)
qCWarning(LOG_LIB) << "Could not find item by name" << widgetItem->text();
return found;
}; };
QList<T *> items() const QList<T *> items() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_items; return m_items;
}; };
int uniqNumber() const int uniqNumber() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QList<int> tagList; QList<int> tagList;
foreach(T *item, m_items) tagList.append(item->number()); foreach(T *item, m_items) tagList.append(item->number());
@ -104,14 +142,13 @@ public:
}; };
private: private:
bool debug;
QList<T *> m_items; QList<T *> m_items;
QString m_type; QString m_type;
// init method // init method
QList<T *> getItems() QList<T *> getItems()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
// create directory at $HOME // create directory at $HOME
QString localDir = QString("%1/awesomewidgets/%2") QString localDir = QString("%1/awesomewidgets/%2")
@ -119,7 +156,7 @@ private:
.arg(m_type); .arg(m_type);
QDir localDirectory; QDir localDirectory;
if (localDirectory.mkpath(localDir)) if (localDirectory.mkpath(localDir))
if (debug) qDebug() << PDEBUG << ":" << "Created directory" << localDir; qCInfo(LOG_LIB) << "Created directory" << localDir;
QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QString("awesomewidgets/%1").arg(m_type), QString("awesomewidgets/%1").arg(m_type),
@ -131,17 +168,23 @@ private:
foreach(QString file, files) { foreach(QString file, files) {
if (!file.endsWith(QString(".desktop"))) continue; if (!file.endsWith(QString(".desktop"))) continue;
if (names.contains(file)) continue; if (names.contains(file)) continue;
if (debug) qDebug() << PDEBUG << ":" << "Found file" << file << "in" << dir; qCInfo(LOG_LIB) << "Found file" << file << "in" << dir;
names.append(file); names.append(file);
items.append(new T(this, file, dirs, debug)); items.append(new T(this, file, dirs));
} }
} }
// sort items
std::sort(items.begin(), items.end(), [](const T *lhs, const T *rhs){
return lhs->number() < rhs->number();
});
return items; return items;
}; };
void repaint() void repaint()
{ {
qCDebug(LOG_LIB);
widgetDialog->clear(); widgetDialog->clear();
foreach(T *_item, m_items) { foreach(T *_item, m_items) {
QListWidgetItem *item = new QListWidgetItem(_item->fileName(), widgetDialog); QListWidgetItem *item = new QListWidgetItem(_item->fileName(), widgetDialog);
@ -157,12 +200,15 @@ private:
// methods // methods
void copyItem() void copyItem()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
T *source = itemFromWidget(); T *source = itemFromWidget();
QString fileName = getName(); QString fileName = getName();
int number = uniqNumber(); int number = uniqNumber();
if ((source == nullptr) || (fileName.isEmpty())) return; if ((source == nullptr) || (fileName.isEmpty())) {
qCWarning(LOG_LIB) << "Nothing to copy";
return;
}
T *newItem = source->copy(fileName, number); T *newItem = source->copy(fileName, number);
if (newItem->showConfiguration(configArgs()) == 1) { if (newItem->showConfiguration(configArgs()) == 1) {
@ -173,16 +219,19 @@ private:
void createItem() void createItem()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QString fileName = getName(); QString fileName = getName();
int number = uniqNumber(); int number = uniqNumber();
QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QString("awesomewidgets/%1").arg(m_type), QString("awesomewidgets/%1").arg(m_type),
QStandardPaths::LocateDirectory); QStandardPaths::LocateDirectory);
if (fileName.isEmpty()) return; if (fileName.isEmpty()) {
qCWarning(LOG_LIB) << "Nothing to create";
return;
};
T *newItem = new T(this, fileName, dirs, debug); T *newItem = new T(this, fileName, dirs);
newItem->setNumber(number); newItem->setNumber(number);
if (newItem->showConfiguration(configArgs()) == 1) { if (newItem->showConfiguration(configArgs()) == 1) {
initItems(); initItems();
@ -192,10 +241,13 @@ private:
void deleteItem() void deleteItem()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
T *source = itemFromWidget(); T *source = itemFromWidget();
if (source == nullptr) return; if (source == nullptr) {
qCWarning(LOG_LIB) << "Nothing to delete";
return;
};
if (source->tryDelete()) { if (source->tryDelete()) {
initItems(); initItems();
@ -205,10 +257,13 @@ private:
void editItem() void editItem()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
T *source = itemFromWidget(); T *source = itemFromWidget();
if (source == nullptr) return; if (source == nullptr) {
qCWarning(LOG_LIB) << "Nothing to edit";
return;
};
if (source->showConfiguration(configArgs()) == 1) { if (source->showConfiguration(configArgs()) == 1) {
initItems(); initItems();

View File

@ -20,7 +20,6 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonParseError> #include <QJsonParseError>
@ -28,18 +27,19 @@
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QSettings> #include <QSettings>
#include <pdebug/pdebug.h>
#include <qreplytimeout/qreplytimeout.h> #include <qreplytimeout/qreplytimeout.h>
#include "awdebug.h"
#include "version.h" #include "version.h"
ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName, ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName,
const QStringList directories, const bool debugCmd) const QStringList directories)
: AbstractExtItem(parent, quotesName, directories, debugCmd), : AbstractExtItem(parent, quotesName, directories),
debug(debugCmd),
ui(new Ui::ExtQuotes) ui(new Ui::ExtQuotes)
{ {
qCDebug(LOG_LIB);
readConfiguration(); readConfiguration();
ui->setupUi(this); ui->setupUi(this);
translate(); translate();
@ -62,7 +62,7 @@ ExtQuotes::ExtQuotes(QWidget *parent, const QString quotesName,
ExtQuotes::~ExtQuotes() ExtQuotes::~ExtQuotes()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
disconnect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(quotesReplyReceived(QNetworkReply *))); disconnect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(quotesReplyReceived(QNetworkReply *)));
@ -71,18 +71,19 @@ ExtQuotes::~ExtQuotes()
} }
ExtQuotes *ExtQuotes::copy(const QString fileName, const int number) ExtQuotes *ExtQuotes::copy(const QString _fileName, const int _number)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "File" << _fileName;
qCDebug(LOG_LIB) << "Number" << _number;
ExtQuotes *item = new ExtQuotes(static_cast<QWidget *>(parent()), fileName, ExtQuotes *item = new ExtQuotes(static_cast<QWidget *>(parent()), _fileName, directories());
directories(), debug);
item->setActive(isActive()); item->setActive(isActive());
item->setApiVersion(apiVersion()); item->setApiVersion(apiVersion());
item->setComment(comment()); item->setComment(comment());
item->setInterval(interval()); item->setInterval(interval());
item->setName(name()); item->setName(name());
item->setNumber(number); item->setNumber(_number);
item->setTicker(ticker()); item->setTicker(ticker());
return item; return item;
@ -91,7 +92,7 @@ ExtQuotes *ExtQuotes::copy(const QString fileName, const int number)
QString ExtQuotes::ticker() const QString ExtQuotes::ticker() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_ticker; return m_ticker;
} }
@ -99,7 +100,7 @@ QString ExtQuotes::ticker() const
QString ExtQuotes::uniq() const QString ExtQuotes::uniq() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_ticker; return m_ticker;
} }
@ -107,8 +108,8 @@ QString ExtQuotes::uniq() const
void ExtQuotes::setTicker(const QString _ticker) void ExtQuotes::setTicker(const QString _ticker)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Ticker" << _ticker; qCDebug(LOG_LIB) << "Ticker" << _ticker;
m_ticker = _ticker; m_ticker = _ticker;
} }
@ -116,7 +117,7 @@ void ExtQuotes::setTicker(const QString _ticker)
void ExtQuotes::readConfiguration() void ExtQuotes::readConfiguration()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::readConfiguration(); AbstractExtItem::readConfiguration();
for (int i=directories().count()-1; i>=0; i--) { for (int i=directories().count()-1; i>=0; i--) {
@ -130,6 +131,7 @@ void ExtQuotes::readConfiguration()
// update for current API // update for current API
if ((apiVersion() > 0) && (apiVersion() < AWEQAPI)) { if ((apiVersion() > 0) && (apiVersion() < AWEQAPI)) {
qCWarning(LOG_LIB) << "Bump API version from" << apiVersion() << "to" << AWEQAPI;
setApiVersion(AWEQAPI); setApiVersion(AWEQAPI);
writeConfiguration(); writeConfiguration();
} }
@ -138,11 +140,11 @@ void ExtQuotes::readConfiguration()
QVariantHash ExtQuotes::run() QVariantHash ExtQuotes::run()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if ((!isActive()) || (isRunning)) return values; if ((!isActive()) || (isRunning)) return values;
if (times == 1) { if (times == 1) {
if (debug) qDebug() << PDEBUG << ":" << "Send request"; qCInfo(LOG_LIB) << "Send request";
isRunning = true; isRunning = true;
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url()))); QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url())));
new QReplyTimeout(reply, 1000); new QReplyTimeout(reply, 1000);
@ -159,7 +161,7 @@ QVariantHash ExtQuotes::run()
int ExtQuotes::showConfiguration(const QVariant args) int ExtQuotes::showConfiguration(const QVariant args)
{ {
Q_UNUSED(args) Q_UNUSED(args)
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->lineEdit_name->setText(name()); ui->lineEdit_name->setText(name());
ui->lineEdit_comment->setText(comment()); ui->lineEdit_comment->setText(comment());
@ -185,11 +187,11 @@ int ExtQuotes::showConfiguration(const QVariant args)
void ExtQuotes::writeConfiguration() const void ExtQuotes::writeConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::writeConfiguration(); AbstractExtItem::writeConfiguration();
QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat); QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_LIB) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("X-AW-Ticker"), m_ticker); settings.setValue(QString("X-AW-Ticker"), m_ticker);
@ -200,17 +202,17 @@ void ExtQuotes::writeConfiguration() const
void ExtQuotes::quotesReplyReceived(QNetworkReply *reply) void ExtQuotes::quotesReplyReceived(QNetworkReply *reply)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Return code" << reply->error(); qCDebug(LOG_LIB) << "Return code" << reply->error();
if (debug) qDebug() << PDEBUG << ":" << "Reply error message" << reply->errorString(); qCDebug(LOG_LIB) << "Reply error message" << reply->errorString();
isRunning = false; isRunning = false;
QJsonParseError error; QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error); QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error);
reply->deleteLater(); reply->deleteLater();
if (debug) qDebug() << PDEBUG << ":" << "Json parse error" << error.errorString();
if ((reply->error() != QNetworkReply::NoError) || if ((reply->error() != QNetworkReply::NoError) ||
(error.error != QJsonParseError::NoError)) { (error.error != QJsonParseError::NoError)) {
qCWarning(LOG_LIB) << "Parse error" << error.errorString();
return; return;
} }
QVariantMap jsonQuotes = jsonDoc.toVariant().toMap()[QString("query")].toMap(); QVariantMap jsonQuotes = jsonDoc.toVariant().toMap()[QString("query")].toMap();
@ -220,21 +222,21 @@ void ExtQuotes::quotesReplyReceived(QNetworkReply *reply)
// ask // ask
value = jsonQuotes[QString("Ask")].toString().toFloat(); value = jsonQuotes[QString("Ask")].toString().toFloat();
values[tag(QString("askchg"))] = values[QString("ask")].toFloat() == 0.0 ? 0.0 : values[tag(QString("askchg"))] = values[QString("ask")].toFloat() == 0.0 ? 0.0 :
value - values[QString("ask")].toFloat(); value - values[QString("ask")].toFloat();
values[tag(QString("percaskchg"))] = 100.0 * values[QString("askchg")].toFloat() / values[QString("ask")].toFloat(); values[tag(QString("percaskchg"))] = 100.0 * values[QString("askchg")].toFloat() / values[QString("ask")].toFloat();
values[tag(QString("ask"))] = value; values[tag(QString("ask"))] = value;
// bid // bid
value = jsonQuotes[QString("Bid")].toString().toFloat(); value = jsonQuotes[QString("Bid")].toString().toFloat();
values[tag(QString("bidchg"))] = values[QString("bid")].toFloat() == 0.0 ? 0.0 : values[tag(QString("bidchg"))] = values[QString("bid")].toFloat() == 0.0 ? 0.0 :
value - values[QString("bid")].toFloat(); value - values[QString("bid")].toFloat();
values[tag(QString("percbidchg"))] = 100.0 * values[QString("bidchg")].toFloat() / values[QString("bid")].toFloat(); values[tag(QString("percbidchg"))] = 100.0 * values[QString("bidchg")].toFloat() / values[QString("bid")].toFloat();
values[tag(QString("bid"))] = value; values[tag(QString("bid"))] = value;
// last trade // last trade
value = jsonQuotes[QString("LastTradePriceOnly")].toString().toFloat(); value = jsonQuotes[QString("LastTradePriceOnly")].toString().toFloat();
values[tag(QString("pricechg"))] = values[QString("price")].toFloat() == 0.0 ? 0.0 : values[tag(QString("pricechg"))] = values[QString("price")].toFloat() == 0.0 ? 0.0 :
value - values[QString("price")].toFloat(); value - values[QString("price")].toFloat();
values[tag(QString("percpricechg"))] = 100.0 * values[QString("pricechg")].toFloat() / values[QString("price")].toFloat(); values[tag(QString("percpricechg"))] = 100.0 * values[QString("pricechg")].toFloat() / values[QString("price")].toFloat();
values[tag(QString("price"))] = value; values[tag(QString("price"))] = value;
} }
@ -242,7 +244,7 @@ void ExtQuotes::quotesReplyReceived(QNetworkReply *reply)
void ExtQuotes::translate() void ExtQuotes::translate()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->label_name->setText(i18n("Name")); ui->label_name->setText(i18n("Name"));
ui->label_comment->setText(i18n("Comment")); ui->label_comment->setText(i18n("Comment"));
@ -256,11 +258,11 @@ void ExtQuotes::translate()
QString ExtQuotes::url() const QString ExtQuotes::url() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QString apiUrl = QString(YAHOO_URL); QString apiUrl = QString(YAHOO_URL);
apiUrl.replace(QString("$TICKER"), m_ticker); apiUrl.replace(QString("$TICKER"), m_ticker);
if (debug) qDebug() << PDEBUG << ":" << "API url" << apiUrl; qCInfo(LOG_LIB) << "API url" << apiUrl;
return apiUrl; return apiUrl;
} }

View File

@ -37,10 +37,9 @@ class ExtQuotes : public AbstractExtItem
public: public:
explicit ExtQuotes(QWidget *parent = nullptr, const QString quotesName = QString(), explicit ExtQuotes(QWidget *parent = nullptr, const QString quotesName = QString(),
const QStringList directories = QStringList(), const QStringList directories = QStringList());
const bool debugCmd = false); virtual ~ExtQuotes();
~ExtQuotes(); ExtQuotes *copy(const QString _fileName, const int _number);
ExtQuotes *copy(const QString fileName, const int number);
// get methods // get methods
QString ticker() const; QString ticker() const;
QString uniq() const; QString uniq() const;
@ -57,7 +56,6 @@ private slots:
void quotesReplyReceived(QNetworkReply *reply); void quotesReplyReceived(QNetworkReply *reply);
private: private:
bool debug;
QNetworkAccessManager *manager; QNetworkAccessManager *manager;
bool isRunning = false; bool isRunning = false;
Ui::ExtQuotes *ui; Ui::ExtQuotes *ui;

View File

@ -20,7 +20,6 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonParseError> #include <QJsonParseError>
@ -28,17 +27,17 @@
#include <QStandardPaths> #include <QStandardPaths>
#include <QTextCodec> #include <QTextCodec>
#include <pdebug/pdebug.h> #include "awdebug.h"
#include "version.h" #include "version.h"
ExtScript::ExtScript(QWidget *parent, const QString scriptName, ExtScript::ExtScript(QWidget *parent, const QString scriptName,
const QStringList directories, const bool debugCmd) const QStringList directories)
: AbstractExtItem(parent, scriptName, directories, debugCmd), : AbstractExtItem(parent, scriptName, directories),
debug(debugCmd),
ui(new Ui::ExtScript) ui(new Ui::ExtScript)
{ {
qCDebug(LOG_LIB);
readConfiguration(); readConfiguration();
readJsonFilters(); readJsonFilters();
ui->setupUi(this); ui->setupUi(this);
@ -54,7 +53,7 @@ ExtScript::ExtScript(QWidget *parent, const QString scriptName,
ExtScript::~ExtScript() ExtScript::~ExtScript()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
process->kill(); process->kill();
delete process; delete process;
@ -62,12 +61,13 @@ ExtScript::~ExtScript()
} }
ExtScript *ExtScript::copy(const QString fileName, const int number) ExtScript *ExtScript::copy(const QString _fileName, const int _number)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "File" << _fileName;
qCDebug(LOG_LIB) << "Number" << _number;
ExtScript *item = new ExtScript(static_cast<QWidget *>(parent()), fileName, ExtScript *item = new ExtScript(static_cast<QWidget *>(parent()), _fileName, directories());
directories(), debug);
item->setActive(isActive()); item->setActive(isActive());
item->setApiVersion(apiVersion()); item->setApiVersion(apiVersion());
item->setComment(comment()); item->setComment(comment());
@ -75,7 +75,7 @@ ExtScript *ExtScript::copy(const QString fileName, const int number)
item->setHasOutput(hasOutput()); item->setHasOutput(hasOutput());
item->setInterval(interval()); item->setInterval(interval());
item->setName(name()); item->setName(name());
item->setNumber(number); item->setNumber(_number);
item->setPrefix(prefix()); item->setPrefix(prefix());
item->setRedirect(redirect()); item->setRedirect(redirect());
@ -85,7 +85,7 @@ ExtScript *ExtScript::copy(const QString fileName, const int number)
QString ExtScript::executable() const QString ExtScript::executable() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_executable; return m_executable;
} }
@ -93,7 +93,7 @@ QString ExtScript::executable() const
QStringList ExtScript::filters() const QStringList ExtScript::filters() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_filters; return m_filters;
} }
@ -101,7 +101,7 @@ QStringList ExtScript::filters() const
bool ExtScript::hasOutput() const bool ExtScript::hasOutput() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_output; return m_output;
} }
@ -109,7 +109,7 @@ bool ExtScript::hasOutput() const
QString ExtScript::prefix() const QString ExtScript::prefix() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_prefix; return m_prefix;
} }
@ -117,7 +117,7 @@ QString ExtScript::prefix() const
ExtScript::Redirect ExtScript::redirect() const ExtScript::Redirect ExtScript::redirect() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_redirect; return m_redirect;
} }
@ -125,7 +125,7 @@ ExtScript::Redirect ExtScript::redirect() const
QString ExtScript::uniq() const QString ExtScript::uniq() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_executable; return m_executable;
} }
@ -133,7 +133,7 @@ QString ExtScript::uniq() const
QString ExtScript::strRedirect() const QString ExtScript::strRedirect() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QString value; QString value;
switch (m_redirect) { switch (m_redirect) {
@ -155,8 +155,8 @@ QString ExtScript::strRedirect() const
void ExtScript::setExecutable(const QString _executable) void ExtScript::setExecutable(const QString _executable)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Executable" << _executable; qCDebug(LOG_LIB) << "Executable" << _executable;
m_executable = _executable; m_executable = _executable;
} }
@ -164,18 +164,20 @@ void ExtScript::setExecutable(const QString _executable)
void ExtScript::setFilters(const QStringList _filters) void ExtScript::setFilters(const QStringList _filters)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Filters" << _filters; qCDebug(LOG_LIB) << "Filters" << _filters;
foreach(QString filter, _filters) std::for_each(_filters.cbegin(), _filters.cend(),
updateFilter(filter); [this](QString filter) { return updateFilter(filter); });
// foreach(QString filter, _filters)
// updateFilter(filter);
} }
void ExtScript::setHasOutput(const bool _state) void ExtScript::setHasOutput(const bool _state)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "State" << _state; qCDebug(LOG_LIB) << "State" << _state;
m_output = _state; m_output = _state;
} }
@ -183,8 +185,8 @@ void ExtScript::setHasOutput(const bool _state)
void ExtScript::setPrefix(const QString _prefix) void ExtScript::setPrefix(const QString _prefix)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Prefix" << _prefix; qCDebug(LOG_LIB) << "Prefix" << _prefix;
m_prefix = _prefix; m_prefix = _prefix;
} }
@ -192,8 +194,8 @@ void ExtScript::setPrefix(const QString _prefix)
void ExtScript::setRedirect(const Redirect _redirect) void ExtScript::setRedirect(const Redirect _redirect)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Redirect" << _redirect; qCDebug(LOG_LIB) << "Redirect" << _redirect;
m_redirect = _redirect; m_redirect = _redirect;
} }
@ -201,8 +203,8 @@ void ExtScript::setRedirect(const Redirect _redirect)
void ExtScript::setStrRedirect(const QString _redirect) void ExtScript::setStrRedirect(const QString _redirect)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Redirect" << _redirect; qCDebug(LOG_LIB) << "Redirect" << _redirect;
if (_redirect == QString("stdout2sdterr")) if (_redirect == QString("stdout2sdterr"))
m_redirect = stdout2stderr; m_redirect = stdout2stderr;
@ -215,14 +217,14 @@ void ExtScript::setStrRedirect(const QString _redirect)
QString ExtScript::applyFilters(QString _value) const QString ExtScript::applyFilters(QString _value) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Value" << _value; qCDebug(LOG_LIB) << "Value" << _value;
foreach(QString filt, m_filters) { foreach(QString filt, m_filters) {
if (debug) qDebug() << PDEBUG << ":" << "Found filter" << filt; qCInfo(LOG_LIB) << "Found filter" << filt;
QVariantMap filter = jsonFilters[filt].toMap(); QVariantMap filter = jsonFilters[filt].toMap();
if (filter.isEmpty()) { if (filter.isEmpty()) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find filter in the json"; qCWarning(LOG_LIB) << "Could not find filter" << _value << "in the json";
continue; continue;
} }
foreach(QString f, filter.keys()) foreach(QString f, filter.keys())
@ -235,9 +237,9 @@ QString ExtScript::applyFilters(QString _value) const
void ExtScript::updateFilter(const QString _filter, const bool _add) void ExtScript::updateFilter(const QString _filter, const bool _add)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Filter" << _filter; qCDebug(LOG_LIB) << "Filter" << _filter;
if (debug) qDebug() << PDEBUG << ":" << "Should be added" << _add; qCDebug(LOG_LIB) << "Should be added" << _add;
if (_add) { if (_add) {
if (m_filters.contains(_filter)) return; if (m_filters.contains(_filter)) return;
@ -250,7 +252,7 @@ void ExtScript::updateFilter(const QString _filter, const bool _add)
void ExtScript::readConfiguration() void ExtScript::readConfiguration()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::readConfiguration(); AbstractExtItem::readConfiguration();
for (int i=directories().count()-1; i>=0; i--) { for (int i=directories().count()-1; i>=0; i--) {
@ -273,6 +275,7 @@ void ExtScript::readConfiguration()
// update for current API // update for current API
if ((apiVersion() > 0) && (apiVersion() < AWESAPI)) { if ((apiVersion() > 0) && (apiVersion() < AWESAPI)) {
qCWarning(LOG_LIB) << "Bump API version from" << apiVersion() << "to" << AWESAPI;
setApiVersion(AWESAPI); setApiVersion(AWESAPI);
writeConfiguration(); writeConfiguration();
} }
@ -281,37 +284,41 @@ void ExtScript::readConfiguration()
void ExtScript::readJsonFilters() void ExtScript::readJsonFilters()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QString("awesomewidgets/scripts/awesomewidgets-extscripts-filters.json")); QString("awesomewidgets/scripts/awesomewidgets-extscripts-filters.json"));
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName; qCInfo(LOG_LIB) << "Filters file" << fileName;
QFile jsonFile(fileName); QFile jsonFile(fileName);
if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
qCWarning(LOG_LIB) << "Could not open" << fileName;
return; return;
}
QString jsonText = jsonFile.readAll(); QString jsonText = jsonFile.readAll();
jsonFile.close(); jsonFile.close();
QJsonParseError error; QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonText.toUtf8(), &error); QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonText.toUtf8(), &error);
if (debug) qDebug() << PDEBUG << ":" << "Json parse error" << error.errorString(); if (error.error != QJsonParseError::NoError) {
if (error.error != QJsonParseError::NoError) return; qCWarning(LOG_LIB) << "Parse error" << error.errorString();
return;
}
jsonFilters = jsonDoc.toVariant().toMap(); jsonFilters = jsonDoc.toVariant().toMap();
if (debug) qDebug() << PDEBUG << ":" << "Filters" << jsonFilters; qCInfo(LOG_LIB) << "Filters" << jsonFilters;
} }
QVariantHash ExtScript::run() QVariantHash ExtScript::run()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (!isActive()) return value; if (!isActive()) return value;
if ((times == 1) && (process->state() == QProcess::NotRunning)) { if ((times == 1) && (process->state() == QProcess::NotRunning)) {
QStringList cmdList; QStringList cmdList;
if (!m_prefix.isEmpty()) cmdList.append(m_prefix); if (!m_prefix.isEmpty()) cmdList.append(m_prefix);
cmdList.append(m_executable); cmdList.append(m_executable);
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmdList.join(QChar(' ')); qCInfo(LOG_LIB) << "Run cmd" << cmdList.join(QChar(' '));
process->start(cmdList.join(QChar(' '))); process->start(cmdList.join(QChar(' ')));
} else if (times >= interval()) } else if (times >= interval())
times = 0; times = 0;
@ -324,7 +331,7 @@ QVariantHash ExtScript::run()
int ExtScript::showConfiguration(const QVariant args) int ExtScript::showConfiguration(const QVariant args)
{ {
Q_UNUSED(args) Q_UNUSED(args)
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->lineEdit_name->setText(name()); ui->lineEdit_name->setText(name());
ui->lineEdit_comment->setText(comment()); ui->lineEdit_comment->setText(comment());
@ -364,11 +371,11 @@ int ExtScript::showConfiguration(const QVariant args)
void ExtScript::writeConfiguration() const void ExtScript::writeConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::writeConfiguration(); AbstractExtItem::writeConfiguration();
QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat); QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_LIB) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("Exec"), m_executable); settings.setValue(QString("Exec"), m_executable);
@ -384,25 +391,23 @@ void ExtScript::writeConfiguration() const
void ExtScript::updateValue() void ExtScript::updateValue()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process->exitCode(); qCInfo(LOG_LIB) << "Cmd returns" << process->exitCode();
QString qdebug = QTextCodec::codecForMib(106)->toUnicode(process->readAllStandardError()).trimmed(); QString qdebug = QTextCodec::codecForMib(106)->toUnicode(process->readAllStandardError()).trimmed();
if (debug) qDebug() << PDEBUG << ":" << "Error" << qdebug; qCInfo(LOG_LIB) << "Error" << qdebug;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process->readAllStandardOutput()).trimmed(); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process->readAllStandardOutput()).trimmed();
qCInfo(LOG_LIB) << "Error" << qoutput;
QString strValue; QString strValue;
switch (m_redirect) { switch (m_redirect) {
case stdout2stderr: case stdout2stderr:
if (debug) qDebug() << PDEBUG << ":" << "Debug" << qdebug;
if (debug) qDebug() << PDEBUG << ":" << "Output" << qoutput;
break; break;
case stderr2stdout: case stderr2stdout:
strValue = QString("%1\n%2").arg(qdebug).arg(qoutput); strValue = QString("%1\n%2").arg(qdebug).arg(qoutput);
break; break;
case nothing: case nothing:
default: default:
if (debug) qDebug() << PDEBUG << ":" << "Debug" << qdebug;
strValue = qoutput; strValue = qoutput;
break; break;
} }
@ -414,7 +419,7 @@ void ExtScript::updateValue()
void ExtScript::translate() void ExtScript::translate()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->label_name->setText(i18n("Name")); ui->label_name->setText(i18n("Name"));
ui->label_comment->setText(i18n("Comment")); ui->label_comment->setText(i18n("Comment"));

View File

@ -45,10 +45,9 @@ public:
}; };
explicit ExtScript(QWidget *parent = nullptr, const QString scriptName = QString(), explicit ExtScript(QWidget *parent = nullptr, const QString scriptName = QString(),
const QStringList directories = QStringList(), const QStringList directories = QStringList());
const bool debugCmd = false); virtual ~ExtScript();
~ExtScript(); ExtScript *copy(const QString _fileName, const int _number);
ExtScript *copy(const QString fileName, const int number);
// get methods // get methods
QString executable() const; QString executable() const;
QStringList filters() const; QStringList filters() const;
@ -80,7 +79,6 @@ private slots:
void updateValue(); void updateValue();
private: private:
bool debug;
QProcess *process = nullptr; QProcess *process = nullptr;
Ui::ExtScript *ui; Ui::ExtScript *ui;
void translate(); void translate();

View File

@ -20,22 +20,22 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QRegExp>
#include <QSettings> #include <QSettings>
#include <QTextCodec> #include <QTextCodec>
#include <pdebug/pdebug.h> #include "awdebug.h"
#include "version.h" #include "version.h"
ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName, ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName,
const QStringList directories, const bool debugCmd) const QStringList directories)
: AbstractExtItem(parent, upgradeName, directories, debugCmd), : AbstractExtItem(parent, upgradeName, directories),
debug(debugCmd),
ui(new Ui::ExtUpgrade) ui(new Ui::ExtUpgrade)
{ {
qCDebug(LOG_LIB);
readConfiguration(); readConfiguration();
ui->setupUi(this); ui->setupUi(this);
translate(); translate();
@ -50,7 +50,7 @@ ExtUpgrade::ExtUpgrade(QWidget *parent, const QString upgradeName,
ExtUpgrade::~ExtUpgrade() ExtUpgrade::~ExtUpgrade()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
process->kill(); process->kill();
delete process; delete process;
@ -58,19 +58,21 @@ ExtUpgrade::~ExtUpgrade()
} }
ExtUpgrade *ExtUpgrade::copy(const QString fileName, const int number) ExtUpgrade *ExtUpgrade::copy(const QString _fileName, const int _number)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "File" << _fileName;
qCDebug(LOG_LIB) << "Number" << _number;
ExtUpgrade *item = new ExtUpgrade(static_cast<QWidget *>(parent()), fileName, ExtUpgrade *item = new ExtUpgrade(static_cast<QWidget *>(parent()), _fileName, directories());
directories(), debug);
item->setActive(isActive()); item->setActive(isActive());
item->setApiVersion(apiVersion()); item->setApiVersion(apiVersion());
item->setComment(comment()); item->setComment(comment());
item->setExecutable(executable()); item->setExecutable(executable());
item->setFilter(filter());
item->setInterval(interval()); item->setInterval(interval());
item->setName(name()); item->setName(name());
item->setNumber(number); item->setNumber(_number);
item->setNull(null()); item->setNull(null());
return item; return item;
@ -79,15 +81,23 @@ ExtUpgrade *ExtUpgrade::copy(const QString fileName, const int number)
QString ExtUpgrade::executable() const QString ExtUpgrade::executable() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_executable; return m_executable;
} }
QString ExtUpgrade::filter() const
{
qCDebug(LOG_LIB);
return m_filter;
}
int ExtUpgrade::null() const int ExtUpgrade::null() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_null; return m_null;
} }
@ -95,7 +105,7 @@ int ExtUpgrade::null() const
QString ExtUpgrade::uniq() const QString ExtUpgrade::uniq() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_executable; return m_executable;
} }
@ -103,17 +113,26 @@ QString ExtUpgrade::uniq() const
void ExtUpgrade::setExecutable(const QString _executable) void ExtUpgrade::setExecutable(const QString _executable)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Executable" << _executable; qCDebug(LOG_LIB) << "Executable" << _executable;
m_executable = _executable; m_executable = _executable;
} }
void ExtUpgrade::setFilter(const QString _filter)
{
qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Filter" << _filter;
m_filter = _filter;
}
void ExtUpgrade::setNull(const int _null) void ExtUpgrade::setNull(const int _null)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Null lines" << _null; qCDebug(LOG_LIB) << "Null lines" << _null;
if (_null < 0) return; if (_null < 0) return;
m_null = _null; m_null = _null;
@ -122,7 +141,7 @@ void ExtUpgrade::setNull(const int _null)
void ExtUpgrade::readConfiguration() void ExtUpgrade::readConfiguration()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::readConfiguration(); AbstractExtItem::readConfiguration();
for (int i=directories().count()-1; i>=0; i--) { for (int i=directories().count()-1; i>=0; i--) {
@ -132,11 +151,14 @@ void ExtUpgrade::readConfiguration()
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
setExecutable(settings.value(QString("Exec"), m_executable).toString()); setExecutable(settings.value(QString("Exec"), m_executable).toString());
setNull(settings.value(QString("X-AW-Null"), m_null).toInt()); setNull(settings.value(QString("X-AW-Null"), m_null).toInt());
// api == 3
setFilter(settings.value(QString("X-AW-Filter"), m_filter).toString());
settings.endGroup(); settings.endGroup();
} }
// update for current API // update for current API
if ((apiVersion() > 0) && (apiVersion() < AWEUAPI)) { if ((apiVersion() > 0) && (apiVersion() < AWEUAPI)) {
qCWarning(LOG_LIB) << "Bump API version from" << apiVersion() << "to" << AWEUAPI;
setApiVersion(AWEUAPI); setApiVersion(AWEUAPI);
writeConfiguration(); writeConfiguration();
} }
@ -145,12 +167,14 @@ void ExtUpgrade::readConfiguration()
QVariantHash ExtUpgrade::run() QVariantHash ExtUpgrade::run()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (!isActive()) return value; if (!isActive()) return value;
if ((times == 1) && (process->state() == QProcess::NotRunning)) if ((times == 1) && (process->state() == QProcess::NotRunning)) {
process->start(QString("sh -c \"%1\"").arg(m_executable)); QString cmd = QString("sh -c \"%1\"").arg(m_executable);
else if (times >= interval()) qCInfo(LOG_LIB) << "Run cmd" << cmd;
process->start(cmd);
} else if (times >= interval())
times = 0; times = 0;
times++; times++;
@ -161,12 +185,13 @@ QVariantHash ExtUpgrade::run()
int ExtUpgrade::showConfiguration(const QVariant args) int ExtUpgrade::showConfiguration(const QVariant args)
{ {
Q_UNUSED(args) Q_UNUSED(args)
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->lineEdit_name->setText(name()); ui->lineEdit_name->setText(name());
ui->lineEdit_comment->setText(comment()); ui->lineEdit_comment->setText(comment());
ui->label_numberValue->setText(QString("%1").arg(number())); ui->label_numberValue->setText(QString("%1").arg(number()));
ui->lineEdit_command->setText(m_executable); ui->lineEdit_command->setText(m_executable);
ui->lineEdit_filter->setText(m_filter);
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked : Qt::Unchecked); ui->checkBox_active->setCheckState(isActive() ? Qt::Checked : Qt::Unchecked);
ui->spinBox_null->setValue(m_null); ui->spinBox_null->setValue(m_null);
ui->spinBox_interval->setValue(interval()); ui->spinBox_interval->setValue(interval());
@ -178,6 +203,7 @@ int ExtUpgrade::showConfiguration(const QVariant args)
setNumber(ui->label_numberValue->text().toInt()); setNumber(ui->label_numberValue->text().toInt());
setApiVersion(AWEUAPI); setApiVersion(AWEUAPI);
setExecutable(ui->lineEdit_command->text()); setExecutable(ui->lineEdit_command->text());
setFilter(ui->lineEdit_filter->text());
setActive(ui->checkBox_active->checkState() == Qt::Checked); setActive(ui->checkBox_active->checkState() == Qt::Checked);
setNull(ui->spinBox_null->value()); setNull(ui->spinBox_null->value());
setInterval(ui->spinBox_interval->value()); setInterval(ui->spinBox_interval->value());
@ -189,14 +215,15 @@ int ExtUpgrade::showConfiguration(const QVariant args)
void ExtUpgrade::writeConfiguration() const void ExtUpgrade::writeConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::writeConfiguration(); AbstractExtItem::writeConfiguration();
QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat); QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_LIB) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("Exec"), m_executable); settings.setValue(QString("Exec"), m_executable);
settings.setValue(QString("X-AW-Filter"), m_filter);
settings.setValue(QString("X-AW-Null"), m_null); settings.setValue(QString("X-AW-Null"), m_null);
settings.endGroup(); settings.endGroup();
@ -206,24 +233,29 @@ void ExtUpgrade::writeConfiguration() const
void ExtUpgrade::updateValue() void ExtUpgrade::updateValue()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process->exitCode(); qCInfo(LOG_LIB) << "Cmd returns" << process->exitCode();
if (debug) qDebug() << PDEBUG << ":" << "Error" << process->readAllStandardError(); qCInfo(LOG_LIB) << "Error" << process->readAllStandardError();
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process->readAllStandardOutput()).trimmed(); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process->readAllStandardOutput()).trimmed();
value[tag(QString("pkgcount"))] = qoutput.split(QChar('\n'), QString::SkipEmptyParts).count() - m_null; value[tag(QString("pkgcount"))] = [this](QString output) {
return m_filter.isEmpty() ?
output.split(QChar('\n'), QString::SkipEmptyParts).count() - m_null :
output.split(QChar('\n'), QString::SkipEmptyParts).filter(QRegExp(m_filter)).count();
}(qoutput);
} }
void ExtUpgrade::translate() void ExtUpgrade::translate()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->label_name->setText(i18n("Name")); ui->label_name->setText(i18n("Name"));
ui->label_comment->setText(i18n("Comment")); ui->label_comment->setText(i18n("Comment"));
ui->label_number->setText(i18n("Tag")); ui->label_number->setText(i18n("Tag"));
ui->label_command->setText(i18n("Command")); ui->label_command->setText(i18n("Command"));
ui->label_filter->setText(i18n("Filter"));
ui->checkBox_active->setText(i18n("Active")); ui->checkBox_active->setText(i18n("Active"));
ui->label_null->setText(i18n("Null")); ui->label_null->setText(i18n("Null"));
ui->label_interval->setText(i18n("Interval")); ui->label_interval->setText(i18n("Interval"));

View File

@ -31,20 +31,22 @@ class ExtUpgrade : public AbstractExtItem
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString executable READ executable WRITE setExecutable) Q_PROPERTY(QString executable READ executable WRITE setExecutable)
Q_PROPERTY(QString filter READ filter WRITE setFilter)
Q_PROPERTY(int null READ null WRITE setNull) Q_PROPERTY(int null READ null WRITE setNull)
public: public:
explicit ExtUpgrade(QWidget *parent = nullptr, const QString upgradeName = QString(), explicit ExtUpgrade(QWidget *parent = nullptr, const QString upgradeName = QString(),
const QStringList directories = QStringList(), const QStringList directories = QStringList());
const bool debugCmd = false); virtual ~ExtUpgrade();
~ExtUpgrade(); ExtUpgrade *copy(const QString _fileName, const int _number);
ExtUpgrade *copy(const QString fileName, const int number);
// get methods // get methods
QString executable() const; QString executable() const;
QString filter() const;
int null() const; int null() const;
QString uniq() const; QString uniq() const;
// set methods // set methods
void setExecutable(const QString _executable = QString("/usr/bin/true")); void setExecutable(const QString _executable = QString("/usr/bin/true"));
void setFilter(const QString _filter = QString());
void setNull(const int _null = 0); void setNull(const int _null = 0);
public slots: public slots:
@ -57,12 +59,12 @@ private slots:
void updateValue(); void updateValue();
private: private:
bool debug;
QProcess *process = nullptr; QProcess *process = nullptr;
Ui::ExtUpgrade *ui; Ui::ExtUpgrade *ui;
void translate(); void translate();
// properties // properties
QString m_executable = QString("/usr/bin/true"); QString m_executable = QString("/usr/bin/true");
QString m_filter = QString("");
int m_null = 0; int m_null = 0;
// internal properties // internal properties
int times = 0; int times = 0;

View File

@ -104,6 +104,29 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_filter">
<item>
<widget class="QLabel" name="label_filter">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Filter</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_filter"/>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_active"> <layout class="QHBoxLayout" name="layout_active">
<item> <item>

View File

@ -20,27 +20,29 @@
#include <KI18n/KLocalizedString> #include <KI18n/KLocalizedString>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonParseError> #include <QJsonParseError>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QSettings> #include <QSettings>
#include <QStandardPaths>
#include <pdebug/pdebug.h>
#include <qreplytimeout/qreplytimeout.h> #include <qreplytimeout/qreplytimeout.h>
#include "awdebug.h"
#include "version.h" #include "version.h"
ExtWeather::ExtWeather(QWidget *parent, const QString weatherName, ExtWeather::ExtWeather(QWidget *parent, const QString weatherName,
const QStringList directories, const bool debugCmd) const QStringList directories)
: AbstractExtItem(parent, weatherName, directories, debugCmd), : AbstractExtItem(parent, weatherName, directories),
debug(debugCmd),
ui(new Ui::ExtWeather) ui(new Ui::ExtWeather)
{ {
qCDebug(LOG_LIB);
readConfiguration(); readConfiguration();
readJsonMap();
ui->setupUi(this); ui->setupUi(this);
translate(); translate();
@ -58,7 +60,7 @@ ExtWeather::ExtWeather(QWidget *parent, const QString weatherName,
ExtWeather::~ExtWeather() ExtWeather::~ExtWeather()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
disconnect(manager, SIGNAL(finished(QNetworkReply *)), disconnect(manager, SIGNAL(finished(QNetworkReply *)),
this, SLOT(weatherReplyReceived(QNetworkReply *))); this, SLOT(weatherReplyReceived(QNetworkReply *)));
@ -68,20 +70,22 @@ ExtWeather::~ExtWeather()
} }
ExtWeather *ExtWeather::copy(const QString fileName, const int number) ExtWeather *ExtWeather::copy(const QString _fileName, const int _number)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "File" << _fileName;
qCDebug(LOG_LIB) << "Number" << _number;
ExtWeather *item = new ExtWeather(static_cast<QWidget *>(parent()), fileName, ExtWeather *item = new ExtWeather(static_cast<QWidget *>(parent()), _fileName, directories());
directories(), debug);
item->setActive(isActive()); item->setActive(isActive());
item->setApiVersion(apiVersion()); item->setApiVersion(apiVersion());
item->setCity(city()); item->setCity(city());
item->setComment(comment()); item->setComment(comment());
item->setCountry(country()); item->setCountry(country());
item->setInterval(interval()); item->setInterval(interval());
item->setImage(image());
item->setName(name()); item->setName(name());
item->setNumber(number); item->setNumber(_number);
item->setTs(ts()); item->setTs(ts());
return item; return item;
@ -90,107 +94,17 @@ ExtWeather *ExtWeather::copy(const QString fileName, const int number)
QString ExtWeather::weatherFromInt(const int _id) const QString ExtWeather::weatherFromInt(const int _id) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "ID" << _id; qCDebug(LOG_LIB) << "Weather ID" << _id;
// refer to http://openweathermap.org/weather-conditions
QString weather; QVariantMap map = jsonMap[m_image ? QString("image") : QString("text")].toMap();
switch (_id) { return map.value(QString::number(_id), map[QString("default")]).toString();
case 800:
// 01d
weather = QString("\u2600");
break;
case 801:
// 02d
weather = QString("\u26C5");
break;
case 802:
case 803:
// 03d
weather = QString("\u2601");
break;
case 804:
// 04d
weather = QString("\u2601");
break;
case 300:
case 301:
case 302:
case 310:
case 311:
case 312:
case 313:
case 314:
case 321:
case 520:
case 521:
case 522:
case 531:
// 09d
weather = QString("\u2602");
break;
case 500:
case 501:
case 502:
case 503:
case 504:
// 10d
weather = QString("\u2614");
break;
case 200:
case 201:
case 202:
case 210:
case 211:
case 212:
case 221:
case 230:
case 231:
case 232:
// 11d
weather = QString("\u2608");
break;
case 511:
case 600:
case 601:
case 602:
case 611:
case 612:
case 615:
case 616:
case 620:
case 621:
case 622:
// 13d
weather = QString("\u2603");
// weather = QString("\u26C4");
break;
case 701:
case 711:
case 721:
case 731:
case 741:
case 751:
case 761:
case 762:
case 771:
case 781:
// 50d
weather = QString("\u26C5");
break;
default:
// extreme other conditions
weather = QString("\u2604");
break;
}
return weather;
} }
QString ExtWeather::city() const QString ExtWeather::city() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_city; return m_city;
} }
@ -198,15 +112,23 @@ QString ExtWeather::city() const
QString ExtWeather::country() const QString ExtWeather::country() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_country; return m_country;
} }
bool ExtWeather::image() const
{
qCDebug(LOG_LIB);
return m_image;
}
int ExtWeather::ts() const int ExtWeather::ts() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_ts; return m_ts;
} }
@ -214,7 +136,7 @@ int ExtWeather::ts() const
QString ExtWeather::uniq() const QString ExtWeather::uniq() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return QString("%1 (%2) at %3").arg(m_city).arg(m_country).arg(m_ts); return QString("%1 (%2) at %3").arg(m_city).arg(m_country).arg(m_ts);
} }
@ -222,8 +144,8 @@ QString ExtWeather::uniq() const
void ExtWeather::setCity(const QString _city) void ExtWeather::setCity(const QString _city)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "City" << _city; qCDebug(LOG_LIB) << "City" << _city;
m_city = _city; m_city = _city;
} }
@ -231,17 +153,26 @@ void ExtWeather::setCity(const QString _city)
void ExtWeather::setCountry(const QString _country) void ExtWeather::setCountry(const QString _country)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Country" << _country; qCDebug(LOG_LIB) << "Country" << _country;
m_country = _country; m_country = _country;
} }
void ExtWeather::setImage(const bool _image)
{
qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Use image" << _image;
m_image = _image;
}
void ExtWeather::setTs(const int _ts) void ExtWeather::setTs(const int _ts)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Timestamp" << _ts; qCDebug(LOG_LIB) << "Timestamp" << _ts;
m_ts = _ts; m_ts = _ts;
} }
@ -249,7 +180,7 @@ void ExtWeather::setTs(const int _ts)
void ExtWeather::readConfiguration() void ExtWeather::readConfiguration()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::readConfiguration(); AbstractExtItem::readConfiguration();
for (int i=directories().count()-1; i>=0; i--) { for (int i=directories().count()-1; i>=0; i--) {
@ -260,24 +191,54 @@ void ExtWeather::readConfiguration()
setCity(settings.value(QString("X-AW-City"), m_city).toString()); setCity(settings.value(QString("X-AW-City"), m_city).toString());
setCountry(settings.value(QString("X-AW-Country"), m_country).toString()); setCountry(settings.value(QString("X-AW-Country"), m_country).toString());
setTs(settings.value(QString("X-AW-TS"), m_ts).toInt()); setTs(settings.value(QString("X-AW-TS"), m_ts).toInt());
// api == 2
setImage(settings.value(QString("X-AW-Image"), QVariant(m_image)).toString() == QString("true"));
settings.endGroup(); settings.endGroup();
} }
// update for current API // update for current API
if ((apiVersion() > 0) && (apiVersion() < AWEWAPI)) { if ((apiVersion() > 0) && (apiVersion() < AWEWAPI)) {
qCWarning(LOG_LIB) << "Bump API version from" << apiVersion() << "to" << AWEWAPI;
setApiVersion(AWEWAPI); setApiVersion(AWEWAPI);
writeConfiguration(); writeConfiguration();
} }
} }
void ExtWeather::readJsonMap()
{
qCDebug(LOG_LIB);
QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QString("awesomewidgets/weather/awesomewidgets-extweather-ids.json"));
qCInfo(LOG_LIB) << "Map file" << fileName;
QFile jsonFile(fileName);
if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
qCWarning(LOG_LIB) << "Could not open" << fileName;
return;
}
QString jsonText = jsonFile.readAll();
jsonFile.close();
QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonText.toUtf8(), &error);
if (error.error != QJsonParseError::NoError) {
qCWarning(LOG_LIB) << "Parse error" << error.errorString();
return;
}
jsonMap = jsonDoc.toVariant().toMap();
qCInfo(LOG_LIB) << "Weather map" << jsonMap;
}
QVariantHash ExtWeather::run() QVariantHash ExtWeather::run()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if ((!isActive()) || (isRunning)) return values; if ((!isActive()) || (isRunning)) return values;
if (times == 1) { if (times == 1) {
if (debug) qDebug() << PDEBUG << ":" << "Send request"; qCInfo(LOG_LIB) << "Send request";
isRunning = true; isRunning = true;
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url(m_ts != 0)))); QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url(m_ts != 0))));
new QReplyTimeout(reply, 1000); new QReplyTimeout(reply, 1000);
@ -294,7 +255,7 @@ QVariantHash ExtWeather::run()
int ExtWeather::showConfiguration(const QVariant args) int ExtWeather::showConfiguration(const QVariant args)
{ {
Q_UNUSED(args) Q_UNUSED(args)
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->lineEdit_name->setText(name()); ui->lineEdit_name->setText(name());
ui->lineEdit_comment->setText(comment()); ui->lineEdit_comment->setText(comment());
@ -302,6 +263,7 @@ int ExtWeather::showConfiguration(const QVariant args)
ui->lineEdit_city->setText(m_city); ui->lineEdit_city->setText(m_city);
ui->lineEdit_country->setText(m_country); ui->lineEdit_country->setText(m_country);
ui->spinBox_timestamp->setValue(m_ts); ui->spinBox_timestamp->setValue(m_ts);
ui->checkBox_image->setCheckState(m_image ? Qt::Checked : Qt::Unchecked);
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked : Qt::Unchecked); ui->checkBox_active->setCheckState(isActive() ? Qt::Checked : Qt::Unchecked);
ui->spinBox_interval->setValue(interval()); ui->spinBox_interval->setValue(interval());
@ -314,6 +276,7 @@ int ExtWeather::showConfiguration(const QVariant args)
setCity(ui->lineEdit_city->text()); setCity(ui->lineEdit_city->text());
setCountry(ui->lineEdit_country->text()); setCountry(ui->lineEdit_country->text());
setTs(ui->spinBox_timestamp->value()); setTs(ui->spinBox_timestamp->value());
setImage(ui->checkBox_image->checkState() == Qt::Checked);
setActive(ui->checkBox_active->checkState() == Qt::Checked); setActive(ui->checkBox_active->checkState() == Qt::Checked);
setInterval(ui->spinBox_interval->value()); setInterval(ui->spinBox_interval->value());
@ -324,15 +287,16 @@ int ExtWeather::showConfiguration(const QVariant args)
void ExtWeather::writeConfiguration() const void ExtWeather::writeConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::writeConfiguration(); AbstractExtItem::writeConfiguration();
QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat); QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_LIB) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("X-AW-City"), m_city); settings.setValue(QString("X-AW-City"), m_city);
settings.setValue(QString("X-AW-Country"), m_country); settings.setValue(QString("X-AW-Country"), m_country);
settings.setValue(QString("X-AW-Image"), m_image);
settings.setValue(QString("X-AW-TS"), m_ts); settings.setValue(QString("X-AW-TS"), m_ts);
settings.endGroup(); settings.endGroup();
@ -342,24 +306,24 @@ void ExtWeather::writeConfiguration() const
void ExtWeather::weatherReplyReceived(QNetworkReply *reply) void ExtWeather::weatherReplyReceived(QNetworkReply *reply)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Return code" << reply->error(); qCDebug(LOG_LIB) << "Return code" << reply->error();
if (debug) qDebug() << PDEBUG << ":" << "Reply error message" << reply->errorString(); qCDebug(LOG_LIB) << "Reply error message" << reply->errorString();
isRunning = false; isRunning = false;
QJsonParseError error; QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error); QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &error);
reply->deleteLater(); reply->deleteLater();
if (debug) qDebug() << PDEBUG << ":" << "Json parse error" << error.errorString();
if ((reply->error() != QNetworkReply::NoError) || if ((reply->error() != QNetworkReply::NoError) ||
(error.error != QJsonParseError::NoError)) { (error.error != QJsonParseError::NoError)) {
qCWarning(LOG_LIB) << "Parse error" << error.errorString();
return; return;
} }
// convert to map // convert to map
QVariantMap json = jsonDoc.toVariant().toMap(); QVariantMap json = jsonDoc.toVariant().toMap();
if (json[QString("cod")].toInt() != 200) { if (json[QString("cod")].toInt() != 200) {
if (debug) qDebug() << PDEBUG << ":" << "Invalid return code"; qCWarning(LOG_LIB) << "Invalid return code";
return; return;
} }
@ -376,7 +340,8 @@ void ExtWeather::weatherReplyReceived(QNetworkReply *reply)
QVariantHash ExtWeather::parseSingleJson(const QVariantMap json) const QVariantHash ExtWeather::parseSingleJson(const QVariantMap json) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Single json data" << json;
QVariantHash output; QVariantHash output;
@ -402,7 +367,7 @@ QVariantHash ExtWeather::parseSingleJson(const QVariantMap json) const
void ExtWeather::translate() void ExtWeather::translate()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->label_name->setText(i18n("Name")); ui->label_name->setText(i18n("Name"));
ui->label_comment->setText(i18n("Comment")); ui->label_comment->setText(i18n("Comment"));
@ -410,6 +375,7 @@ void ExtWeather::translate()
ui->label_city->setText(i18n("City")); ui->label_city->setText(i18n("City"));
ui->label_country->setText(i18n("Country")); ui->label_country->setText(i18n("Country"));
ui->label_timestamp->setText(i18n("Timestamp")); ui->label_timestamp->setText(i18n("Timestamp"));
ui->checkBox_image->setText(i18n("Use images"));
ui->checkBox_active->setText(i18n("Active")); ui->checkBox_active->setText(i18n("Active"));
ui->label_interval->setText(i18n("Interval")); ui->label_interval->setText(i18n("Interval"));
} }
@ -417,13 +383,13 @@ void ExtWeather::translate()
QString ExtWeather::url(const bool isForecast) const QString ExtWeather::url(const bool isForecast) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << "Is forecast" << isForecast; qCDebug(LOG_LIB) << "Is forecast" << isForecast;
QString apiUrl = isForecast ? QString(OWM_FORECAST_URL) : QString(OWM_URL); QString apiUrl = isForecast ? QString(OWM_FORECAST_URL) : QString(OWM_URL);
apiUrl.replace(QString("$CITY"), m_city); apiUrl.replace(QString("$CITY"), m_city);
apiUrl.replace(QString("$COUNTRY"), m_country); apiUrl.replace(QString("$COUNTRY"), m_country);
if (debug) qDebug() << PDEBUG << ":" << "API url" << apiUrl; qCInfo(LOG_LIB) << "API url" << apiUrl;
return apiUrl; return apiUrl;
} }

View File

@ -36,27 +36,30 @@ class ExtWeather : public AbstractExtItem
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString city READ city WRITE setCity) Q_PROPERTY(QString city READ city WRITE setCity)
Q_PROPERTY(QString country READ country WRITE setCountry) Q_PROPERTY(QString country READ country WRITE setCountry)
Q_PROPERTY(bool image READ image WRITE setImage)
Q_PROPERTY(int ts READ ts WRITE setTs) Q_PROPERTY(int ts READ ts WRITE setTs)
public: public:
explicit ExtWeather(QWidget *parent = nullptr, const QString weatherName = QString(), explicit ExtWeather(QWidget *parent = nullptr, const QString weatherName = QString(),
const QStringList directories = QStringList(), const QStringList directories = QStringList());
const bool debugCmd = false); virtual ~ExtWeather();
~ExtWeather(); ExtWeather *copy(const QString _fileName, const int _number);
ExtWeather *copy(const QString fileName, const int number);
QString weatherFromInt(const int _id) const; QString weatherFromInt(const int _id) const;
// get methods // get methods
QString city() const; QString city() const;
QString country() const; QString country() const;
bool image() const;
int ts() const; int ts() const;
QString uniq() const; QString uniq() const;
// set methods // set methods
void setCity(const QString _city = QString("London")); void setCity(const QString _city = QString("London"));
void setCountry(const QString _country = QString("uk")); void setCountry(const QString _country = QString("uk"));
void setImage(const bool _image = false);
void setTs(const int _ts = 0); void setTs(const int _ts = 0);
public slots: public slots:
void readConfiguration(); void readConfiguration();
void readJsonMap();
QVariantHash run(); QVariantHash run();
int showConfiguration(const QVariant args = QVariant()); int showConfiguration(const QVariant args = QVariant());
void writeConfiguration() const; void writeConfiguration() const;
@ -65,7 +68,6 @@ private slots:
void weatherReplyReceived(QNetworkReply *reply); void weatherReplyReceived(QNetworkReply *reply);
private: private:
bool debug;
QNetworkAccessManager *manager; QNetworkAccessManager *manager;
bool isRunning = false; bool isRunning = false;
Ui::ExtWeather *ui; Ui::ExtWeather *ui;
@ -75,7 +77,9 @@ private:
// properties // properties
QString m_city = QString("London"); QString m_city = QString("London");
QString m_country = QString("uk"); QString m_country = QString("uk");
bool m_image = false;
int m_ts = 0; int m_ts = 0;
QVariantMap jsonMap = QVariantMap();
// values // values
int times = 0; int times = 0;
QVariantHash values; QVariantHash values;

View File

@ -148,6 +148,36 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_image">
<item>
<spacer name="spacer_image">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_image">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Use images</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_active"> <layout class="QHBoxLayout" name="layout_active">
<item> <item>

View File

@ -22,24 +22,23 @@
#include <QBuffer> #include <QBuffer>
#include <QColorDialog> #include <QColorDialog>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QGraphicsEllipseItem> #include <QGraphicsEllipseItem>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QSettings> #include <QSettings>
#include <pdebug/pdebug.h> #include "awdebug.h"
#include "version.h" #include "version.h"
GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName, GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,
const QStringList directories, const bool debugCmd) const QStringList directories)
: AbstractExtItem(parent, desktopName, directories, debugCmd), : AbstractExtItem(parent, desktopName, directories),
debug(debugCmd),
ui(new Ui::GraphicalItem) ui(new Ui::GraphicalItem)
{ {
qCDebug(LOG_LIB);
readConfiguration(); readConfiguration();
ui->setupUi(this); ui->setupUi(this);
translate(); translate();
@ -51,18 +50,19 @@ GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,
GraphicalItem::~GraphicalItem() GraphicalItem::~GraphicalItem()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
delete ui; delete ui;
} }
GraphicalItem *GraphicalItem::copy(const QString fileName, const int number) GraphicalItem *GraphicalItem::copy(const QString _fileName, const int _number)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "File" << _fileName;
qCDebug(LOG_LIB) << "Number" << _number;
GraphicalItem *item = new GraphicalItem(static_cast<QWidget *>(parent()), GraphicalItem *item = new GraphicalItem(static_cast<QWidget *>(parent()), _fileName, directories());
fileName, directories(), debug);
item->setActive(isActive()); item->setActive(isActive());
item->setActiveColor(activeColor()); item->setActiveColor(activeColor());
item->setApiVersion(apiVersion()); item->setApiVersion(apiVersion());
@ -72,8 +72,8 @@ GraphicalItem *GraphicalItem::copy(const QString fileName, const int number)
item->setHeight(height()); item->setHeight(height());
item->setInactiveColor(inactiveColor()); item->setInactiveColor(inactiveColor());
item->setInterval(interval()); item->setInterval(interval());
item->setName(QString("bar%1").arg(number)); item->setName(QString("bar%1").arg(_number));
item->setNumber(number); item->setNumber(_number);
item->setType(type()); item->setType(type());
item->setWidth(width()); item->setWidth(width());
@ -83,14 +83,14 @@ GraphicalItem *GraphicalItem::copy(const QString fileName, const int number)
QString GraphicalItem::image(const float value) const QString GraphicalItem::image(const float value) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Value" << value; qCDebug(LOG_LIB) << "Value" << value;
if (m_bar == QString("none")) return QString(""); if (m_bar == QString("none")) return QString("");
QColor active = stringToColor(m_activeColor); QColor active = stringToColor(m_activeColor);
QColor inactive = stringToColor(m_inactiveColor); QColor inactive = stringToColor(m_inactiveColor);
float percent = value / 100.0; float percent = value / 100.0;
int scale[2] = {1, 1}; int scale[2] = { 1, 1 };
QPen pen = QPen(); QPen pen = QPen();
QGraphicsScene *scene = new QGraphicsScene(); QGraphicsScene *scene = new QGraphicsScene();
scene->setBackgroundBrush(QBrush(Qt::NoBrush)); scene->setBackgroundBrush(QBrush(Qt::NoBrush));
@ -163,7 +163,7 @@ QString GraphicalItem::image(const float value) const
QString GraphicalItem::bar() const QString GraphicalItem::bar() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_bar; return m_bar;
} }
@ -171,7 +171,7 @@ QString GraphicalItem::bar() const
QString GraphicalItem::activeColor() const QString GraphicalItem::activeColor() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_activeColor; return m_activeColor;
} }
@ -179,15 +179,23 @@ QString GraphicalItem::activeColor() const
QString GraphicalItem::inactiveColor() const QString GraphicalItem::inactiveColor() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_inactiveColor; return m_inactiveColor;
} }
QString GraphicalItem::tag() const
{
qCDebug(LOG_LIB);
return name() + m_bar;
}
GraphicalItem::Type GraphicalItem::type() const GraphicalItem::Type GraphicalItem::type() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_type; return m_type;
} }
@ -195,7 +203,7 @@ GraphicalItem::Type GraphicalItem::type() const
QString GraphicalItem::strType() const QString GraphicalItem::strType() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QString value; QString value;
switch (m_type) { switch (m_type) {
@ -216,7 +224,7 @@ QString GraphicalItem::strType() const
GraphicalItem::Direction GraphicalItem::direction() const GraphicalItem::Direction GraphicalItem::direction() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_direction; return m_direction;
} }
@ -224,7 +232,7 @@ GraphicalItem::Direction GraphicalItem::direction() const
QString GraphicalItem::strDirection() const QString GraphicalItem::strDirection() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QString value; QString value;
switch (m_direction) { switch (m_direction) {
@ -242,7 +250,7 @@ QString GraphicalItem::strDirection() const
int GraphicalItem::height() const int GraphicalItem::height() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_height; return m_height;
} }
@ -250,7 +258,7 @@ int GraphicalItem::height() const
int GraphicalItem::width() const int GraphicalItem::width() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_width; return m_width;
} }
@ -258,7 +266,7 @@ int GraphicalItem::width() const
QString GraphicalItem::uniq() const QString GraphicalItem::uniq() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
return m_bar; return m_bar;
} }
@ -266,25 +274,21 @@ QString GraphicalItem::uniq() const
void GraphicalItem::setBar(const QString _bar) void GraphicalItem::setBar(const QString _bar)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Bar" << _bar; qCDebug(LOG_LIB) << "Bar" << _bar;
if ((!_bar.contains(QRegExp(QString("cpu(?!cl).*")))) && if (!_bar.contains(QRegExp(QString("^(cpu(?!cl).*|gpu$|mem$|swap$|hdd[0-9].*|bat.*)")))) {
(!_bar.contains(QRegExp(QString("gpu")))) && qCWarning(LOG_LIB) << "Unsupported bar type" << _bar;
(!_bar.contains(QRegExp(QString("mem")))) &&
(!_bar.contains(QRegExp(QString("swap")))) &&
(!_bar.contains(QRegExp(QString("hdd[0-9].*")))) &&
(!_bar.contains(QRegExp(QString("bat.*")))))
m_bar = QString("none"); m_bar = QString("none");
else } else
m_bar = _bar; m_bar = _bar;
} }
void GraphicalItem::setActiveColor(const QString _color) void GraphicalItem::setActiveColor(const QString _color)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Color" << _color; qCDebug(LOG_LIB) << "Color" << _color;
m_activeColor = _color; m_activeColor = _color;
} }
@ -292,8 +296,8 @@ void GraphicalItem::setActiveColor(const QString _color)
void GraphicalItem::setInactiveColor(const QString _color) void GraphicalItem::setInactiveColor(const QString _color)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Color" << _color; qCDebug(LOG_LIB) << "Color" << _color;
m_inactiveColor = _color; m_inactiveColor = _color;
} }
@ -301,8 +305,8 @@ void GraphicalItem::setInactiveColor(const QString _color)
void GraphicalItem::setType(const Type _type) void GraphicalItem::setType(const Type _type)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Type" << _type; qCDebug(LOG_LIB) << "Type" << _type;
m_type = _type; m_type = _type;
} }
@ -310,8 +314,8 @@ void GraphicalItem::setType(const Type _type)
void GraphicalItem::setStrType(const QString _type) void GraphicalItem::setStrType(const QString _type)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Type" << _type; qCDebug(LOG_LIB) << "Type" << _type;
if (_type == QString("Vertical")) if (_type == QString("Vertical"))
setType(Vertical); setType(Vertical);
@ -324,8 +328,8 @@ void GraphicalItem::setStrType(const QString _type)
void GraphicalItem::setDirection(const Direction _direction) void GraphicalItem::setDirection(const Direction _direction)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Direction" << _direction; qCDebug(LOG_LIB) << "Direction" << _direction;
m_direction = _direction; m_direction = _direction;
} }
@ -333,8 +337,8 @@ void GraphicalItem::setDirection(const Direction _direction)
void GraphicalItem::setStrDirection(const QString _direction) void GraphicalItem::setStrDirection(const QString _direction)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Direction" << _direction; qCDebug(LOG_LIB) << "Direction" << _direction;
if (_direction == QString("RightToLeft")) if (_direction == QString("RightToLeft"))
setDirection(RightToLeft); setDirection(RightToLeft);
@ -345,8 +349,8 @@ void GraphicalItem::setStrDirection(const QString _direction)
void GraphicalItem::setHeight(const int _height) void GraphicalItem::setHeight(const int _height)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Height" << _height; qCDebug(LOG_LIB) << "Height" << _height;
if (_height <= 0) return; if (_height <= 0) return;
m_height = _height; m_height = _height;
@ -355,8 +359,8 @@ void GraphicalItem::setHeight(const int _height)
void GraphicalItem::setWidth(const int _width) void GraphicalItem::setWidth(const int _width)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Width" << _width; qCDebug(LOG_LIB) << "Width" << _width;
if (_width <= 0) return; if (_width <= 0) return;
m_width = _width; m_width = _width;
@ -365,7 +369,7 @@ void GraphicalItem::setWidth(const int _width)
void GraphicalItem::readConfiguration() void GraphicalItem::readConfiguration()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::readConfiguration(); AbstractExtItem::readConfiguration();
for (int i=directories().count()-1; i>=0; i--) { for (int i=directories().count()-1; i>=0; i--) {
@ -387,6 +391,7 @@ void GraphicalItem::readConfiguration()
// update for current API // update for current API
if ((apiVersion() > 0) && (apiVersion() < AWGIAPI)) { if ((apiVersion() > 0) && (apiVersion() < AWGIAPI)) {
qCWarning(LOG_LIB) << "Bump API version from" << apiVersion() << "to" << AWGIAPI;
setApiVersion(AWGIAPI); setApiVersion(AWGIAPI);
writeConfiguration(); writeConfiguration();
} }
@ -395,7 +400,7 @@ void GraphicalItem::readConfiguration()
QVariantHash GraphicalItem::run() QVariantHash GraphicalItem::run()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
// required by abstract class // required by abstract class
return QVariantHash(); return QVariantHash();
@ -404,7 +409,8 @@ QVariantHash GraphicalItem::run()
int GraphicalItem::showConfiguration(const QVariant args) int GraphicalItem::showConfiguration(const QVariant args)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
qCDebug(LOG_LIB) << "Combobox arguments" << args;
QStringList tags = args.toStringList(); QStringList tags = args.toStringList();
ui->label_nameValue->setText(name()); ui->label_nameValue->setText(name());
@ -440,11 +446,11 @@ int GraphicalItem::showConfiguration(const QVariant args)
void GraphicalItem::writeConfiguration() const void GraphicalItem::writeConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
AbstractExtItem::writeConfiguration(); AbstractExtItem::writeConfiguration();
QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat); QSettings settings(QString("%1/%2").arg(directories().first()).arg(fileName()), QSettings::IniFormat);
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << settings.fileName(); qCInfo(LOG_LIB) << "Configuration file" << settings.fileName();
settings.beginGroup(QString("Desktop Entry")); settings.beginGroup(QString("Desktop Entry"));
settings.setValue(QString("X-AW-Value"), m_bar); settings.setValue(QString("X-AW-Value"), m_bar);
@ -462,26 +468,28 @@ void GraphicalItem::writeConfiguration() const
void GraphicalItem::changeColor() void GraphicalItem::changeColor()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
QColor color = stringToColor((static_cast<QPushButton *>(sender()))->text()); QColor color = stringToColor((static_cast<QPushButton *>(sender()))->text());
QColor newColor = QColorDialog::getColor(color, this, tr("Select color"), QColor newColor = QColorDialog::getColor(color, this, tr("Select color"),
QColorDialog::ShowAlphaChannel); QColorDialog::ShowAlphaChannel);
if (!newColor.isValid()) return; if (!newColor.isValid()) return;
qCInfo(LOG_LIB) << "Selected color" << newColor;
QStringList colorText; QStringList colorText;
colorText.append(QString("%1").arg(newColor.red())); colorText.append(QString("%1").arg(newColor.red()));
colorText.append(QString("%1").arg(newColor.green())); colorText.append(QString("%1").arg(newColor.green()));
colorText.append(QString("%1").arg(newColor.blue())); colorText.append(QString("%1").arg(newColor.blue()));
colorText.append(QString("%1").arg(newColor.alpha())); colorText.append(QString("%1").arg(newColor.alpha()));
static_cast<QPushButton *>(sender())->setText(colorText.join(QChar(',')));
return static_cast<QPushButton *>(sender())->setText(colorText.join(QChar(',')));
} }
QColor GraphicalItem::stringToColor(const QString _color) const QColor GraphicalItem::stringToColor(const QString _color) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
if (debug) qDebug() << PDEBUG << ":" << "Color" << _color; qCDebug(LOG_LIB) << "Color" << _color;
QColor qcolor; QColor qcolor;
QStringList listColor = _color.split(QChar(',')); QStringList listColor = _color.split(QChar(','));
@ -498,7 +506,7 @@ QColor GraphicalItem::stringToColor(const QString _color) const
void GraphicalItem::translate() void GraphicalItem::translate()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_LIB);
ui->label_name->setText(i18n("Name")); ui->label_name->setText(i18n("Name"));
ui->label_comment->setText(i18n("Comment")); ui->label_comment->setText(i18n("Comment"));

View File

@ -50,15 +50,15 @@ public:
}; };
explicit GraphicalItem(QWidget *parent = nullptr, const QString desktopName = QString(), explicit GraphicalItem(QWidget *parent = nullptr, const QString desktopName = QString(),
const QStringList directories = QStringList(), const QStringList directories = QStringList());
const bool debugCmd = false); virtual ~GraphicalItem();
~GraphicalItem(); GraphicalItem *copy(const QString _fileName, const int _number);
GraphicalItem *copy(const QString fileName, const int number);
QString image(const float value) const; QString image(const float value) const;
// get methods // get methods
QString bar() const; QString bar() const;
QString activeColor() const; QString activeColor() const;
QString inactiveColor() const; QString inactiveColor() const;
QString tag() const;
Type type() const; Type type() const;
QString strType() const; QString strType() const;
Direction direction() const; Direction direction() const;
@ -89,14 +89,10 @@ private slots:
private: private:
QString m_fileName; QString m_fileName;
QStringList m_dirs; QStringList m_dirs;
bool debug;
Ui::GraphicalItem *ui; Ui::GraphicalItem *ui;
QColor stringToColor(const QString _color) const; QColor stringToColor(const QString _color) const;
void translate(); void translate();
// properties // properties
int m_apiVersion = 0;
QString m_name = QString("none");
QString m_comment = QString("empty");
QString m_bar = QString("cpu"); QString m_bar = QString("cpu");
QString m_activeColor = QString("0,0,0,130"); QString m_activeColor = QString("0,0,0,130");
QString m_inactiveColor = QString("255,255,255,130"); QString m_inactiveColor = QString("255,255,255,130");

View File

@ -4,7 +4,7 @@ Name=aw-get-external-ip
Comment=Custom command to get external IP Comment=Custom command to get external IP
Exec=curl ip4.telize.com Exec=curl ip4.telize.com
X-AW-Prefix= X-AW-Prefix=
X-AW-Active=true X-AW-Active=false
X-AW-Output=true X-AW-Output=true
X-AW-Redirect=nothing X-AW-Redirect=nothing
X-AW-Interval=1 X-AW-Interval=1

View File

@ -4,7 +4,8 @@ Name=default-arch
Comment=Archlinux upgrade info Comment=Archlinux upgrade info
Exec=pacman -Qu Exec=pacman -Qu
X-AW-Active=false X-AW-Active=false
X-AW-Filter=
X-AW-Null=0 X-AW-Null=0
X-AW-Interval=3600 X-AW-Interval=3600
X-AW-ApiVersion=2 X-AW-ApiVersion=3
X-AW-Number=0 X-AW-Number=0

View File

@ -4,7 +4,8 @@ Name=default-debian
Comment=Debian upgrade info Comment=Debian upgrade info
Exec=apt-show-versions -u -b Exec=apt-show-versions -u -b
X-AW-Active=false X-AW-Active=false
X-AW-Filter=
X-AW-Null=0 X-AW-Null=0
X-AW-Interval=3600 X-AW-Interval=3600
X-AW-ApiVersion=2 X-AW-ApiVersion=3
X-AW-Number=1 X-AW-Number=1

View File

@ -4,7 +4,8 @@ Name=default-fedora
Comment=Fedora upgrade info Comment=Fedora upgrade info
Exec=yum list updates Exec=yum list updates
X-AW-Active=false X-AW-Active=false
X-AW-Filter=
X-AW-Null=3 X-AW-Null=3
X-AW-Interval=3600 X-AW-Interval=3600
X-AW-ApiVersion=2 X-AW-ApiVersion=3
X-AW-Number=2 X-AW-Number=2

View File

@ -4,7 +4,8 @@ Name=default-mandriva
Comment=Mandriva upgrade info Comment=Mandriva upgrade info
Exec=urpmq --auto-select Exec=urpmq --auto-select
X-AW-Active=false X-AW-Active=false
X-AW-Filter=
X-AW-Null=0 X-AW-Null=0
X-AW-Interval=3600 X-AW-Interval=3600
X-AW-ApiVersion=2 X-AW-ApiVersion=3
X-AW-Number=3 X-AW-Number=3

View File

@ -4,7 +4,8 @@ Name=default-ubuntu
Comment=Ubuntu upgrade info Comment=Ubuntu upgrade info
Exec=aptitude search '~U' Exec=aptitude search '~U'
X-AW-Active=false X-AW-Active=false
X-AW-Filter=
X-AW-Null=0 X-AW-Null=0
X-AW-Interval=3600 X-AW-Interval=3600
X-AW-ApiVersion=2 X-AW-ApiVersion=3
X-AW-Number=4 X-AW-Number=4

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -3,9 +3,10 @@ Comment=London current weather
Encoding=UTF-8 Encoding=UTF-8
Name=London current Name=London current
X-AW-Active=false X-AW-Active=false
X-AW-ApiVersion=1 X-AW-ApiVersion=2
X-AW-City=London X-AW-City=London
X-AW-Country=uk X-AW-Country=uk
X-AW-Image=false
X-AW-Interval=3600 X-AW-Interval=3600
X-AW-Number=0 X-AW-Number=0
X-AW-TS=0 X-AW-TS=0

View File

@ -38,9 +38,6 @@
<entry name="mark" type="string"> <entry name="mark" type="string">
<default>¤</default> <default>¤</default>
</entry> </entry>
<entry name="panels" type="int">
<default>-1</default>
</entry>
</group> </group>
<group name="Appearance"> <group name="Appearance">

View File

@ -111,6 +111,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[about::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -69,6 +69,7 @@ Item {
width: parent.width * 2 / 3 width: parent.width * 2 / 3
text: plasmoid.configuration.currentFontFamily text: plasmoid.configuration.currentFontFamily
onClicked: { onClicked: {
if (debug) console.debug()
fontDialog.setFont() fontDialog.setFont()
fontDialog.visible = true fontDialog.visible = true
} }
@ -133,8 +134,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_currentFontWeight = model[currentIndex]["name"] onCurrentIndexChanged: cfg_currentFontWeight = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.currentFontWeight) { if (model[i]["name"] == plasmoid.configuration.currentFontWeight) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontWeight.currentIndex = i; fontWeight.currentIndex = i;
} }
} }
@ -168,8 +171,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_currentFontStyle = model[currentIndex]["name"] onCurrentIndexChanged: cfg_currentFontStyle = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.currentFontStyle) { if (model[i]["name"] == plasmoid.configuration.currentFontStyle) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontStyle.currentIndex = i; fontStyle.currentIndex = i;
} }
} }
@ -214,12 +219,14 @@ Item {
signal setFont signal setFont
onAccepted: { onAccepted: {
if (debug) console.debug()
selectFont.text = fontDialog.font.family selectFont.text = fontDialog.font.family
fontSize.value = fontDialog.font.pointSize fontSize.value = fontDialog.font.pointSize
fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0 fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0
fontWeight.currentIndex = weight[fontDialog.font.weight] fontWeight.currentIndex = weight[fontDialog.font.weight]
} }
onSetFont: { onSetFont: {
if (debug) console.debug()
fontDialog.font = Qt.font({ fontDialog.font = Qt.font({
family: selectFont.text, family: selectFont.text,
pointSize: fontSize.value > 0 ? fontSize.value : 12, pointSize: fontSize.value > 0 ? fontSize.value : 12,
@ -230,6 +237,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[activeapp::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -29,7 +29,7 @@ Item {
DPAdds { DPAdds {
id: dpAdds; id: dpAdds;
} }
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
implicitWidth: pageColumn.implicitWidth implicitWidth: pageColumn.implicitWidth
@ -128,8 +128,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_tooltipType = model[currentIndex]["name"] onCurrentIndexChanged: cfg_tooltipType = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.tooltipType) { if (model[i]["name"] == plasmoid.configuration.tooltipType) {
if (debug) console.info("Found", model[i]["name"], "on", i)
tooltipType.currentIndex = i; tooltipType.currentIndex = i;
} }
} }
@ -228,23 +230,6 @@ Item {
onCurrentIndexChanged: cfg_mark = currentText onCurrentIndexChanged: cfg_mark = currentText
} }
} }
// Row {
// height: implicitHeight
// width: parent.width
// QtControls.Label {
// height: parent.height
// width: parent.width * 2 / 5
// horizontalAlignment: Text.AlignRight
// verticalAlignment: Text.AlignVCenter
// text: i18n("Panels to be hidden")
// }
// QtControls.Button {
// width: parent.width * 3 / 5
// text: i18n("Edit panels")
// onClicked: cfg_panels = dpAdds.editPanelsToContol(plasmoid.configuration.panels)
// }
// }
} }
QtDialogs.ColorDialog { QtDialogs.ColorDialog {
@ -255,6 +240,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[advanced::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -69,6 +69,7 @@ Item {
width: parent.width * 2 / 3 width: parent.width * 2 / 3
text: plasmoid.configuration.fontFamily text: plasmoid.configuration.fontFamily
onClicked: { onClicked: {
if (debug) console.debug()
fontDialog.setFont() fontDialog.setFont()
fontDialog.visible = true fontDialog.visible = true
} }
@ -133,8 +134,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_fontWeight = model[currentIndex]["name"] onCurrentIndexChanged: cfg_fontWeight = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.fontWeight) { if (model[i]["name"] == plasmoid.configuration.fontWeight) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontWeight.currentIndex = i; fontWeight.currentIndex = i;
} }
} }
@ -168,8 +171,10 @@ Item {
] ]
onCurrentIndexChanged: cfg_fontStyle = model[currentIndex]["name"] onCurrentIndexChanged: cfg_fontStyle = model[currentIndex]["name"]
Component.onCompleted: { Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) { for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.fontStyle) { if (model[i]["name"] == plasmoid.configuration.fontStyle) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontStyle.currentIndex = i; fontStyle.currentIndex = i;
} }
} }
@ -214,12 +219,14 @@ Item {
signal setFont signal setFont
onAccepted: { onAccepted: {
if (debug) console.debug()
selectFont.text = fontDialog.font.family selectFont.text = fontDialog.font.family
fontSize.value = fontDialog.font.pointSize fontSize.value = fontDialog.font.pointSize
fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0 fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0
fontWeight.currentIndex = weight[fontDialog.font.weight] fontWeight.currentIndex = weight[fontDialog.font.weight]
} }
onSetFont: { onSetFont: {
if (debug) console.debug()
fontDialog.font = Qt.font({ fontDialog.font = Qt.font({
family: selectFont.text, family: selectFont.text,
pointSize: fontSize.value > 0 ? fontSize.value : 12, pointSize: fontSize.value > 0 ? fontSize.value : 12,
@ -230,6 +237,6 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[inactiveapp::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -108,11 +108,11 @@ Item {
} }
onNeedUpdate: { onNeedUpdate: {
if (debug) console.log("[main::onNeedUpdate]") if (debug) console.debug()
for (var i=0; i<repeater.count; i++) { for (var i=0; i<repeater.count; i++) {
if (!repeater.itemAt(i)) { if (!repeater.itemAt(i)) {
if (debug) console.log("[main::onNeedUpdate] : Nothing to do here " + i) if (debug) console.info("Nothing to do here", i)
timer.start() timer.start()
return return
} }
@ -138,7 +138,7 @@ Item {
} }
onNeedTooltipUpdate: { onNeedTooltipUpdate: {
if (debug) console.log("[main::onNeedTooltipUpdate]") if (debug) console.debug()
for (var i=0; i<repeater.count; i++) { for (var i=0; i<repeater.count; i++) {
repeater.itemAt(i).tooltip.text = dpAdds.toolTipImage(i + 1) repeater.itemAt(i).tooltip.text = dpAdds.toolTipImage(i + 1)
@ -146,7 +146,7 @@ Item {
} }
onSizeUpdate: { onSizeUpdate: {
if (debug) console.log("[main::onSizeUpdate]") if (debug) console.debug()
if (plasmoid.configuration.height == 0) { if (plasmoid.configuration.height == 0) {
var newHeight = 0 var newHeight = 0
@ -170,25 +170,18 @@ Item {
} }
} }
Plasmoid.onActivated: {
if (debug) console.log("[main::onActivated]")
// dpAdds.changePanelsState()
}
Plasmoid.onUserConfiguringChanged: { Plasmoid.onUserConfiguringChanged: {
if (plasmoid.userConfiguring) return if (plasmoid.userConfiguring) return
if (debug) console.log("[main::onUserConfiguringChanged]") if (debug) console.debug()
dpAdds.setMark(plasmoid.configuration.mark) dpAdds.setMark(plasmoid.configuration.mark)
dpAdds.setPanelsToControl(plasmoid.configuration.panels)
dpAdds.setToolTipData(tooltipSettings) dpAdds.setToolTipData(tooltipSettings)
needUpdate() needUpdate()
} }
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[main::onCompleted]") if (debug) console.debug()
// init submodule // init submodule
Plasmoid.userConfiguringChanged(false) Plasmoid.userConfiguringChanged(false)

View File

@ -1 +1 @@
singleton general general.qml singleton general 1.0 general.qml

View File

@ -59,8 +59,7 @@ Item {
iconName: "font" iconName: "font"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Font button") if (debug) console.debug("Font button")
var defaultFont = { var defaultFont = {
"color": plasmoid.configuration.fontColor, "color": plasmoid.configuration.fontColor,
"family": plasmoid.configuration.fontFamily, "family": plasmoid.configuration.fontFamily,
@ -81,8 +80,7 @@ Item {
iconName: "format-indent-more" iconName: "format-indent-more"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Indent button") if (debug) console.debug("Indent button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -95,8 +93,7 @@ Item {
iconName: "format-text-bold" iconName: "format-text-bold"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Bold button") if (debug) console.debug("Bold button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -108,8 +105,7 @@ Item {
iconName: "format-text-italic" iconName: "format-text-italic"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Italic button") if (debug) console.debug("Italic button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -121,8 +117,7 @@ Item {
iconName: "format-text-underline" iconName: "format-text-underline"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Underline button") if (debug) console.debug("Underline button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -134,8 +129,7 @@ Item {
iconName: "format-text-strikethrough" iconName: "format-text-strikethrough"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Strike button") if (debug) console.debug("Strike button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -148,8 +142,7 @@ Item {
iconName: "format-justify-left" iconName: "format-justify-left"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Left button") if (debug) console.debug("Left button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -161,8 +154,7 @@ Item {
iconName: "format-justify-center" iconName: "format-justify-center"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Center button") if (debug) console.debug("Center button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -174,8 +166,7 @@ Item {
iconName: "format-justify-right" iconName: "format-justify-right"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Right button") if (debug) console.debug("Right button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -187,8 +178,7 @@ Item {
iconName: "format-justify-fill" iconName: "format-justify-fill"
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Justify button") if (debug) console.debug("Justify button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -210,8 +200,7 @@ Item {
text: i18n("Add") text: i18n("Add")
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Add tag button") if (debug) console.debug("Add tag button")
var pos = textPattern.cursorPosition var pos = textPattern.cursorPosition
var selected = textPattern.selectedText var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd) textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
@ -223,8 +212,7 @@ Item {
text: i18n("Show value") text: i18n("Show value")
onClicked: { onClicked: {
if (debug) console.log("[widget::onClicked] : Show tag button") if (debug) console.debug("Show tag button")
var message = i18n("Tag: %1", tags.currentText) var message = i18n("Tag: %1", tags.currentText)
message += "<br>" message += "<br>"
message += i18n("Value: %1", dpAdds.valueByKey(tags.currentText)) message += i18n("Value: %1", dpAdds.valueByKey(tags.currentText))
@ -244,6 +232,6 @@ Item {
Component.onCompleted: { Component.onCompleted: {
if (debug) console.log("[widget::onCompleted]") if (debug) console.debug()
} }
} }

View File

@ -11,8 +11,7 @@ include_directories(
${Kf5_INCLUDE} ${Kf5_INCLUDE}
) )
file(GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp file(GLOB SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp ${CMAKE_SOURCE_DIR}/*.cpp)
${PROJECT_TRDPARTY_DIR}/pdebug/*.cpp)
file(GLOB SUBPROJECT_NOTIFY *.notifyrc) file(GLOB SUBPROJECT_NOTIFY *.notifyrc)
add_library(${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE}) add_library(${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE})

View File

@ -22,7 +22,6 @@
#include <KWindowSystem/KWindowSystem> #include <KWindowSystem/KWindowSystem>
#include <QBuffer> #include <QBuffer>
#include <QDebug>
#include <QGraphicsPixmapItem> #include <QGraphicsPixmapItem>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
@ -30,49 +29,45 @@
#include <QListWidget> #include <QListWidget>
#include <QMessageBox> #include <QMessageBox>
#include <QPixmap> #include <QPixmap>
#include <QProcessEnvironment>
#include <QScreen> #include <QScreen>
#include <fontdialog/fontdialog.h> #include <fontdialog/fontdialog.h>
#include <pdebug/pdebug.h>
#include <pdebug/pdebug-time.h>
#include "awdebug.h"
#include "version.h" #include "version.h"
DPAdds::DPAdds(QObject *parent) DPAdds::DPAdds(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
qInstallMessageHandler(debugString); qCDebug(LOG_DP);
// debug // logging
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); qSetMessagePattern(LOG_FORMAT);
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
debug = (debugEnv == QString("yes"));
connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SLOT(changeDesktop(int))); connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SIGNAL(desktopChanged()));
connect(KWindowSystem::self(), SIGNAL(windowAdded(WId)), this, SLOT(changeWindowList(WId))); connect(KWindowSystem::self(), SIGNAL(windowAdded(WId)), this, SIGNAL(windowListChanged()));
connect(KWindowSystem::self(), SIGNAL(windowRemoved(WId)), this, SLOT(changeWindowList(WId))); connect(KWindowSystem::self(), SIGNAL(windowRemoved(WId)), this, SIGNAL(windowListChanged()));
} }
DPAdds::~DPAdds() DPAdds::~DPAdds()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
} }
bool DPAdds::isDebugEnabled() const bool DPAdds::isDebugEnabled() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
return debug; return LOG_DP().isDebugEnabled();
} }
int DPAdds::currentDesktop() const int DPAdds::currentDesktop() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
return KWindowSystem::currentDesktop(); return KWindowSystem::currentDesktop();
} }
@ -80,7 +75,7 @@ int DPAdds::currentDesktop() const
QStringList DPAdds::dictKeys() const QStringList DPAdds::dictKeys() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
QStringList allKeys; QStringList allKeys;
allKeys.append(QString("mark")); allKeys.append(QString("mark"));
@ -94,7 +89,7 @@ QStringList DPAdds::dictKeys() const
int DPAdds::numberOfDesktops() const int DPAdds::numberOfDesktops() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
return KWindowSystem::numberOfDesktops(); return KWindowSystem::numberOfDesktops();
} }
@ -102,15 +97,16 @@ int DPAdds::numberOfDesktops() const
QString DPAdds::toolTipImage(const int desktop) const QString DPAdds::toolTipImage(const int desktop) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop; qCDebug(LOG_DP) << "Desktop" << desktop;
if (tooltipType == QString("none")) return QString(); if (tooltipType == QString("none")) return QString();
// prepare // prepare
DesktopWindowsInfo info = getInfoByDesktop(desktop); DesktopWindowsInfo info = getInfoByDesktop(desktop);
if (tooltipType == QString("names")) { if (tooltipType == QString("names")) {
QStringList windowList; QStringList windowList;
foreach(WindowData data, info.windowsData) windowList.append(data.name); std::for_each(info.windowsData.cbegin(), info.windowsData.cend(),
[&windowList](WindowData data) { windowList.append(data.name); });
return QString("<ul><li>%1</li></ul>").arg(windowList.join(QString("</li><li>"))); return QString("<ul><li>%1</li></ul>").arg(windowList.join(QString("</li><li>")));
} }
// init // init
@ -151,20 +147,23 @@ QString DPAdds::toolTipImage(const int desktop) const
} }
} else if (tooltipType == QString("clean")) { } else if (tooltipType == QString("clean")) {
QScreen *screen = QGuiApplication::primaryScreen(); QScreen *screen = QGuiApplication::primaryScreen();
foreach(WindowData data, info.desktopsData) { std::for_each(info.desktopsData.cbegin(), info.desktopsData.cend(),
QPixmap desktop = screen->grabWindow(data.id); [&toolTipScene, &screen](WindowData data) {
toolTipScene->addPixmap(desktop)->setOffset(data.rect.left(), data.rect.top()); QPixmap desktop = screen->grabWindow(data.id);
} toolTipScene->addPixmap(desktop)->setOffset(data.rect.left(), data.rect.top());
});
} else if (tooltipType == QString("windows")) { } else if (tooltipType == QString("windows")) {
QScreen *screen = QGuiApplication::primaryScreen(); QScreen *screen = QGuiApplication::primaryScreen();
foreach(WindowData data, info.desktopsData) { std::for_each(info.desktopsData.cbegin(), info.desktopsData.cend(),
QPixmap desktop = screen->grabWindow(data.id); [&toolTipScene, &screen](WindowData data) {
toolTipScene->addPixmap(desktop)->setOffset(data.rect.left(), data.rect.top()); QPixmap desktop = screen->grabWindow(data.id);
} toolTipScene->addPixmap(desktop)->setOffset(data.rect.left(), data.rect.top());
foreach(WindowData data, info.windowsData) { });
QPixmap window = screen->grabWindow(data.id); std::for_each(info.windowsData.cbegin(), info.windowsData.cend(),
toolTipScene->addPixmap(window)->setOffset(data.rect.left(), data.rect.top()); [&toolTipScene, &screen](WindowData data) {
} QPixmap window = screen->grabWindow(data.id);
toolTipScene->addPixmap(window)->setOffset(data.rect.left(), data.rect.top());
});
} }
QPixmap image = toolTipView->grab().scaledToWidth(tooltipWidth); QPixmap image = toolTipView->grab().scaledToWidth(tooltipWidth);
@ -181,7 +180,9 @@ QString DPAdds::toolTipImage(const int desktop) const
QString DPAdds::parsePattern(const QString pattern, const int desktop) const QString DPAdds::parsePattern(const QString pattern, const int desktop) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
qCDebug(LOG_DP) << "Pattern" << pattern;
qCDebug(LOG_DP) << "Desktop number" << desktop;
QString parsed = pattern; QString parsed = pattern;
parsed.replace(QString("$$"), QString("$\\$\\")); parsed.replace(QString("$$"), QString("$\\$\\"));
@ -195,33 +196,17 @@ QString DPAdds::parsePattern(const QString pattern, const int desktop) const
void DPAdds::setMark(const QString newMark) void DPAdds::setMark(const QString newMark)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Mark" << newMark; qCDebug(LOG_DP) << "Mark" << newMark;
mark = newMark; mark = newMark;
} }
void DPAdds::setPanelsToControl(const QString newPanels)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Panels" << newPanels;
panelsToControl.clear();
if (newPanels == QString("-1")) {
int count = getPanels().count();
for (int i=0; i<count; i++)
panelsToControl.append(i);
} else
foreach(QString panel, newPanels.split(QChar(',')))
panelsToControl.append(panel.toInt());
}
void DPAdds::setToolTipData(const QVariantMap tooltipData) void DPAdds::setToolTipData(const QVariantMap tooltipData)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Data" << tooltipData; qCDebug(LOG_DP) << "Data" << tooltipData;
tooltipColor = tooltipData[QString("tooltipColor")].toString(); tooltipColor = tooltipData[QString("tooltipColor")].toString();
tooltipType = tooltipData[QString("tooltipType")].toString(); tooltipType = tooltipData[QString("tooltipType")].toString();
@ -231,8 +216,9 @@ void DPAdds::setToolTipData(const QVariantMap tooltipData)
QString DPAdds::valueByKey(const QString key, int desktop) const QString DPAdds::valueByKey(const QString key, int desktop) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Requested key" << key; qCDebug(LOG_DP) << "Requested key" << key;
qCDebug(LOG_DP) << "Desktop number" << desktop;
if (desktop == -1) desktop = currentDesktop(); if (desktop == -1) desktop = currentDesktop();
QString currentMark = currentDesktop() == desktop ? mark : QString(""); QString currentMark = currentDesktop() == desktop ? mark : QString("");
@ -250,60 +236,10 @@ QString DPAdds::valueByKey(const QString key, int desktop) const
} }
QString DPAdds::editPanelsToContol(const QString current)
{
if (debug) qDebug() << PDEBUG;
// paint
QDialog *dialog = new QDialog(nullptr);
QListWidget *widget = new QListWidget(dialog);
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Open | QDialogButtonBox::Close,
Qt::Vertical, dialog);
QHBoxLayout *layout = new QHBoxLayout(dialog);
layout->addWidget(widget);
layout->addWidget(buttons);
dialog->setLayout(layout);
connect(buttons, SIGNAL(rejected()), dialog, SLOT(reject()));
connect(buttons, SIGNAL(accepted()), dialog, SLOT(accept()));
// fill
QList<Plasma::Containment *> panels = getPanels();
for (int i=0; i<panels.count(); i++) {
QListWidgetItem *item = new QListWidgetItem(panelLocationToStr(panels.at(i)->location()), widget);
if ((current.split(QChar(',')).contains(QString::number(i))) ||
(current == QString("-1")))
item->setCheckState(Qt::Checked);
else
item->setCheckState(Qt::Unchecked);
}
// exec
QString value;
QStringList indexes;
int ret = dialog->exec();
switch (ret) {
case QDialog::Accepted:
for (int i=0; i<widget->count(); i++)
if (widget->item(i)->checkState() == Qt::Checked)
indexes.append(QString::number(i));
if (indexes.count() == widget->count())
value = QString("-1");
else
value = indexes.join(QChar(','));
break;
default:
value = current;
break;
}
return value;
}
QString DPAdds::getAboutText(const QString type) const QString DPAdds::getAboutText(const QString type) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Type" << type; qCDebug(LOG_DP) << "Type" << type;
QString text; QString text;
if (type == QString("header")) if (type == QString("header"))
@ -341,7 +277,8 @@ QString DPAdds::getAboutText(const QString type) const
QVariantMap DPAdds::getFont(const QVariantMap defaultFont) const QVariantMap DPAdds::getFont(const QVariantMap defaultFont) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
qCDebug(LOG_DP) << "Default font is" << defaultFont;
QVariantMap fontMap; QVariantMap fontMap;
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(), CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
@ -357,35 +294,12 @@ QVariantMap DPAdds::getFont(const QVariantMap defaultFont) const
} }
void DPAdds::changePanelsState() const
{
if (debug) qDebug() << PDEBUG;
if (panelsToControl.isEmpty()) return;
// QList<Plasma::Containment *> panels = getPanels();
// for (int i=0; i<panels.count(); i++) {
// if (!panelsToControl.contains(i)) continue;
// bool wasVisible = panels.at(i)->view()->isVisible();
// int winId = panels.at(i)->view()->winId();
// if (wasVisible) {
// if (debug) qDebug() << PDEBUG << ":" << "Hide panel";
// KWindowInfo oldInfo = KWindowSystem::windowInfo(winId, NET::WMState);
// oldState = oldInfo.state();
// panels.at(i)->view()->setVisible(false);
// } else {
// if (debug) qDebug() << PDEBUG << ":" << "Show panel";
// panels.at(i)->view()->setVisible(true);
// KWindowSystem::clearState(winId, NET::KeepAbove);
// KWindowSystem::setState(winId, oldState | NET::StaysOnTop);
// KWindowSystem::setOnAllDesktops(winId, true);
// }
// }
// panels.clear();
}
void DPAdds::sendNotification(const QString eventId, const QString message) void DPAdds::sendNotification(const QString eventId, const QString message)
{ {
qCDebug(LOG_DP);
qCDebug(LOG_DP) << "Event" << eventId;
qCDebug(LOG_DP) << "Message" << message;
KNotification *notification = KNotification::event(eventId, QString("Desktop Panel ::: %1").arg(eventId), message); KNotification *notification = KNotification::event(eventId, QString("Desktop Panel ::: %1").arg(eventId), message);
notification->setComponentName(QString("plasma-applet-org.kde.plasma.desktop-panel")); notification->setComponentName(QString("plasma-applet-org.kde.plasma.desktop-panel"));
} }
@ -393,35 +307,17 @@ void DPAdds::sendNotification(const QString eventId, const QString message)
void DPAdds::setCurrentDesktop(const int desktop) const void DPAdds::setCurrentDesktop(const int desktop) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop; qCDebug(LOG_DP) << "Desktop" << desktop;
KWindowSystem::setCurrentDesktop(desktop); KWindowSystem::setCurrentDesktop(desktop);
} }
void DPAdds::changeDesktop(const int desktop) const
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop;
emit(desktopChanged());
}
void DPAdds::changeWindowList(const WId window) const
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Window" << window;
emit(windowListChanged());
}
DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop) const DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_DP);
if (debug) qDebug() << PDEBUG << ":" << "Desktop" << desktop; qCDebug(LOG_DP) << "Desktop" << desktop;
DesktopWindowsInfo info; DesktopWindowsInfo info;
@ -447,39 +343,3 @@ DPAdds::DesktopWindowsInfo DPAdds::getInfoByDesktop(const int desktop) const
return info; return info;
} }
QList<Plasma::Containment *> DPAdds::getPanels() const
{
if (debug) qDebug() << PDEBUG;
// Plasma::Corona *corona = new Plasma::Corona(this);
QList<Plasma::Containment *> panels;
// foreach(Plasma::Containment *cont, corona->containments()) {
// if (cont->containmentType() != Plasma::Types::ContainmentType::PanelContainment) continue
// panels.append(cont);
// }
// delete corona;
return panels;
}
QString DPAdds::panelLocationToStr(Plasma::Types::Location location) const
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Location" << location;
switch (location) {
case Plasma::Types::Location::TopEdge:
return i18n("Top Edge");
case Plasma::Types::Location::BottomEdge:
return i18n("Bottom Edge");
case Plasma::Types::Location::LeftEdge:
return i18n("Left Edge");
case Plasma::Types::Location::RightEdge:
return i18n("Right Edge");
default:
return i18n("Unknown location (%1)", location);
}
}

View File

@ -43,8 +43,8 @@ class DPAdds : public QObject
} DesktopWindowsInfo; } DesktopWindowsInfo;
public: public:
DPAdds(QObject *parent = nullptr); explicit DPAdds(QObject *parent = nullptr);
~DPAdds(); virtual ~DPAdds();
Q_INVOKABLE bool isDebugEnabled() const; Q_INVOKABLE bool isDebugEnabled() const;
Q_INVOKABLE int currentDesktop() const; Q_INVOKABLE int currentDesktop() const;
@ -54,11 +54,9 @@ public:
Q_INVOKABLE QString parsePattern(const QString pattern, const int desktop) const; Q_INVOKABLE QString parsePattern(const QString pattern, const int desktop) const;
// values // values
Q_INVOKABLE void setMark(const QString newMark); Q_INVOKABLE void setMark(const QString newMark);
Q_INVOKABLE void setPanelsToControl(const QString newPanels);
Q_INVOKABLE void setToolTipData(const QVariantMap tooltipData); Q_INVOKABLE void setToolTipData(const QVariantMap tooltipData);
Q_INVOKABLE QString valueByKey(const QString key, int desktop = -1) const; Q_INVOKABLE QString valueByKey(const QString key, int desktop = -1) const;
// configuration slots // configuration slots
Q_INVOKABLE QString editPanelsToContol(const QString current);
Q_INVOKABLE QString getAboutText(const QString type = "header") const; Q_INVOKABLE QString getAboutText(const QString type = "header") const;
Q_INVOKABLE QVariantMap getFont(const QVariantMap defaultFont) const; Q_INVOKABLE QVariantMap getFont(const QVariantMap defaultFont) const;
@ -67,25 +65,16 @@ signals:
void windowListChanged() const; void windowListChanged() const;
public slots: public slots:
Q_INVOKABLE void changePanelsState() const;
Q_INVOKABLE static void sendNotification(const QString eventId, const QString message); Q_INVOKABLE static void sendNotification(const QString eventId, const QString message);
Q_INVOKABLE void setCurrentDesktop(const int desktop) const; Q_INVOKABLE void setCurrentDesktop(const int desktop) const;
private slots:
void changeDesktop(const int desktop) const;
void changeWindowList(const WId window) const;
private: private:
DesktopWindowsInfo getInfoByDesktop(const int desktop) const; DesktopWindowsInfo getInfoByDesktop(const int desktop) const;
QList<Plasma::Containment *> getPanels() const;
QString panelLocationToStr(Plasma::Types::Location location) const;
// variables // variables
bool debug = false; int tooltipWidth = 200;
int oldState, tooltipWidth = 200;
QString mark = QString("*"); QString mark = QString("*");
QString tooltipColor = QString("#000000"); QString tooltipColor = QString("#000000");
QString tooltipType = QString("none"); QString tooltipType = QString("none");
QList<int> panelsToControl;
}; };

View File

@ -1,3 +1,2 @@
module org.kde.plasma.private.desktoppanel module org.kde.plasma.private.desktoppanel
plugin dpplugin plugin dpplugin

View File

@ -16,10 +16,10 @@ include_directories(
file(GLOB SUBPROJECT_DESKTOP_IN *.desktop) file(GLOB SUBPROJECT_DESKTOP_IN *.desktop)
file(RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN}) file(RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_IN})
file(GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp file(GLOB SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp ${CMAKE_SOURCE_DIR}/*.cpp)
${PROJECT_TRDPARTY_DIR}/pdebug/*.cpp)
set(TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h) set(TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
file(GLOB SUBPROJECT_CONF *.conf) file(GLOB SUBPROJECT_CONF *.conf)
file(GLOB SUBPROJECT_INI *.ini)
# prepare # prepare
configure_file(${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) configure_file(${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP})
@ -35,3 +35,4 @@ kcoreaddons_desktop_to_json(${PLUGIN_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJ
install(TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine) install(TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR}) install(FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR})
install(FILES ${SUBPROJECT_INI} DESTINATION ${CONFIG_INSTALL_DIR})

View File

@ -0,0 +1,17 @@
[Rules]
org.kde.plasma.awesomewidget.debug=true
org.kde.plasma.awesomewidget.info=true
org.kde.plasma.awesomewidget.warning=true
org.kde.plasma.awesomewidget.critical=true
org.kde.plasma.desktoppanel.debug=true
org.kde.plasma.desktoppanel.info=true
org.kde.plasma.desktoppanel.warning=true
org.kde.plasma.desktoppanel.critical=true
org.kde.plasma.extsysmon.debug=true
org.kde.plasma.extsysmon.info=true
org.kde.plasma.extsysmon.warning=true
org.kde.plasma.extsysmon.critical=true
org.kde.plasma.awesomewidgets.debug=true
org.kde.plasma.awesomewidgets.info=true
org.kde.plasma.awesomewidgets.warning=true
org.kde.plasma.awesomewidgets.critical=true

View File

@ -24,20 +24,17 @@
#include <QDBusConnection> #include <QDBusConnection>
#include <QDBusConnectionInterface> #include <QDBusConnectionInterface>
#include <QDBusMessage> #include <QDBusMessage>
#include <QDebug>
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
#include <QNetworkInterface> #include <QNetworkInterface>
#include <QProcessEnvironment>
#include <QRegExp> #include <QRegExp>
#include <QTextCodec> #include <QTextCodec>
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
#include <pdebug/pdebug.h>
#include <pdebug/pdebug-time.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "awdebug.h"
#include "extquotes.h" #include "extquotes.h"
#include "extscript.h" #include "extscript.h"
#include "extupgrade.h" #include "extupgrade.h"
@ -45,186 +42,40 @@
#include "version.h" #include "version.h"
ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList &args) ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)
: Plasma::DataEngine(parent, args) : Plasma::DataEngine(parent, args)
{ {
Q_UNUSED(args) Q_UNUSED(args)
qInstallMessageHandler(debugString); qCDebug(LOG_ESM);
// debug // logging
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); qSetMessagePattern(LOG_FORMAT);
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
debug = (debugEnv == QString("yes"));
setMinimumPollingInterval(333); setMinimumPollingInterval(333);
readConfiguration(); readConfiguration();
externalQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"), debug); extQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"));
externalScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"), debug); extScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"));
externalUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"), debug); extUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"));
externalWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"), debug); extWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"));
} }
ExtendedSysMon::~ExtendedSysMon() ExtendedSysMon::~ExtendedSysMon()
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
delete externalQuotes; delete extQuotes;
delete externalScripts; delete extScripts;
delete externalUpgrade; delete extUpgrade;
delete externalWeather; delete extWeather;
}
QStringList ExtendedSysMon::getAllHdd() const
{
if (debug) qDebug() << PDEBUG;
QStringList allDevices = QDir(QString("/dev")).entryList(QDir::System, QDir::Name);
QStringList devices = allDevices.filter(QRegExp(QString("^[hms]d[a-z]$")));
for (int i=0; i<devices.count(); i++)
devices[i] = QString("/dev/%1").arg(devices.at(i));
if (debug) qDebug() << PDEBUG << ":" << "Device list" << devices;
return devices;
}
QString ExtendedSysMon::getAutoGpu() const
{
if (debug) qDebug() << PDEBUG;
QString gpu = QString("disable");
QFile moduleFile(QString("/proc/modules"));
if (!moduleFile.open(QIODevice::ReadOnly)) return gpu;
QString output = moduleFile.readAll();
if (output.contains(QString("fglrx")))
gpu = QString("ati");
else if (output.contains(QString("nvidia")))
gpu = QString("nvidia");
if (debug) qDebug() << PDEBUG << ":" << "Device" << gpu;
return gpu;
}
QString ExtendedSysMon::getAutoMpris() const
{
if (debug) qDebug() << PDEBUG;
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(QDBus::BlockWithGui, QString("ListNames"));
if (listServices.arguments().isEmpty()) return QString();
QStringList arguments = listServices.arguments().first().toStringList();
foreach(QString arg, arguments) {
if (debug) qDebug() << PDEBUG << ":" << "Service found" << arg;
if (!arg.startsWith(QString("org.mpris.MediaPlayer2."))) continue;
QString service = arg;
service.remove(QString("org.mpris.MediaPlayer2."));
return service;
}
return QString();
}
QStringList ExtendedSysMon::sources() const
{
if (debug) qDebug() << PDEBUG;
QStringList source;
source.append(QString("battery"));
source.append(QString("custom"));
source.append(QString("desktop"));
source.append(QString("netdev"));
source.append(QString("gpu"));
source.append(QString("gputemp"));
source.append(QString("hddtemp"));
source.append(QString("pkg"));
source.append(QString("player"));
source.append(QString("ps"));
source.append(QString("quotes"));
source.append(QString("update"));
source.append(QString("weather"));
if (debug) qDebug() << PDEBUG << ":" << "Sources" << source;
return source;
}
void ExtendedSysMon::readConfiguration()
{
if (debug) qDebug() << PDEBUG;
QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation,
QString("plasma-dataengine-extsysmon.conf"));
if (debug) qDebug() << PDEBUG << ":" << "Configuration file" << fileName;
QSettings settings(fileName, QSettings::IniFormat);
QHash<QString, QString> rawConfig;
settings.beginGroup(QString("Configuration"));
rawConfig[QString("ACPIPATH")] = settings.value(QString("ACPIPATH"), QString("/sys/class/power_supply/")).toString();
rawConfig[QString("GPUDEV")] = settings.value(QString("GPUDEV"), QString("auto")).toString();
rawConfig[QString("HDDDEV")] = settings.value(QString("HDDDEV"), QString("all")).toString();
rawConfig[QString("HDDTEMPCMD")] = settings.value(QString("HDDTEMPCMD"), QString("sudo smartctl -a")).toString();
rawConfig[QString("MPDADDRESS")] = settings.value(QString("MPDADDRESS"), QString("localhost")).toString();
rawConfig[QString("MPDPORT")] = settings.value(QString("MPDPORT"), QString("6600")).toString();
rawConfig[QString("MPRIS")] = settings.value(QString("MPRIS"), QString("auto")).toString();
rawConfig[QString("PLAYER")] = settings.value(QString("PLAYER"), QString("mpris")).toString();
settings.endGroup();
configuration = updateConfiguration(rawConfig);
}
QHash<QString, QString> ExtendedSysMon::updateConfiguration(QHash<QString, QString> rawConfig) const
{
if (debug) qDebug() << PDEBUG;
// gpudev
if (rawConfig[QString("GPUDEV")] == QString("disable"))
rawConfig[QString("GPUDEV")] = QString("disable");
else if (rawConfig[QString("GPUDEV")] == QString("auto"))
rawConfig[QString("GPUDEV")] = getAutoGpu();
else if ((rawConfig[QString("GPUDEV")] != QString("ati")) &&
(rawConfig[QString("GPUDEV")] != QString("nvidia")))
rawConfig[QString("GPUDEV")] = getAutoGpu();
// hdddev
QStringList allHddDevices = getAllHdd();
if (rawConfig[QString("HDDDEV")] == QString("all"))
rawConfig[QString("HDDDEV")] = allHddDevices.join(QChar(','));
else if (rawConfig[QString("HDDDEV")] == QString("disable"))
rawConfig[QString("HDDDEV")] = QString("");
else {
QStringList deviceList = rawConfig[QString("HDDDEV")].split(QChar(','), QString::SkipEmptyParts);
QStringList devices;
QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$");
foreach(QString device, deviceList)
if ((QFile::exists(device)) && (diskRegexp.indexIn(device) > -1))
devices.append(device);
if (devices.isEmpty())
rawConfig[QString("HDDDEV")] = allHddDevices.join(QChar(','));
else
rawConfig[QString("HDDDEV")] = devices.join(QChar(','));
}
// player
if ((rawConfig[QString("PLAYER")] != QString("mpd")) &&
(rawConfig[QString("PLAYER")] != QString("mpris")) &&
(rawConfig[QString("PLAYER")] != QString("disable")))
rawConfig[QString("PLAYER")] = QString("mpris");
foreach(QString key, rawConfig.keys())
if (debug) qDebug() << PDEBUG << ":" << key << "=" << rawConfig[key];
return rawConfig;
} }
QVariantHash ExtendedSysMon::getBattery(const QString acpiPath) const QVariantHash ExtendedSysMon::getBattery(const QString acpiPath) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "ACPI path" << acpiPath; qCDebug(LOG_ESM) << "ACPI path" << acpiPath;
QVariantHash battery; QVariantHash battery;
battery[QString("ac")] = false; battery[QString("ac")] = false;
@ -266,7 +117,7 @@ QVariantHash ExtendedSysMon::getBattery(const QString acpiPath) const
QVariantHash ExtendedSysMon::getCurrentDesktop() const QVariantHash ExtendedSysMon::getCurrentDesktop() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
int number = KWindowSystem::currentDesktop(); int number = KWindowSystem::currentDesktop();
int total = KWindowSystem::numberOfDesktops(); int total = KWindowSystem::numberOfDesktops();
@ -284,8 +135,8 @@ QVariantHash ExtendedSysMon::getCurrentDesktop() const
float ExtendedSysMon::getGpu(const QString device) const float ExtendedSysMon::getGpu(const QString device) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "Device" << device; qCDebug(LOG_ESM) << "Device" << device;
float value = 0.0; float value = 0.0;
if ((device != QString("nvidia")) && (device != QString("ati"))) if ((device != QString("nvidia")) && (device != QString("ati")))
@ -295,10 +146,10 @@ float ExtendedSysMon::getGpu(const QString device) const
cmd = QString("nvidia-smi -q -x"); cmd = QString("nvidia-smi -q -x");
else if (device == QString("ati")) else if (device == QString("ati"))
cmd = QString("aticonfig --od-getclocks"); cmd = QString("aticonfig --od-getclocks");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; qCInfo(LOG_ESM) << "cmd" << cmd;
TaskResult process = runTask(cmd); TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; qCInfo(LOG_ESM) << "Cmd returns" << process.exitCode;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; qCInfo(LOG_ESM) << "Error" << process.error;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed(); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
if (configuration[QString("GPUDEV")] == QString("nvidia")) if (configuration[QString("GPUDEV")] == QString("nvidia"))
@ -324,8 +175,8 @@ float ExtendedSysMon::getGpu(const QString device) const
float ExtendedSysMon::getGpuTemp(const QString device) const float ExtendedSysMon::getGpuTemp(const QString device) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "Device" << device; qCDebug(LOG_ESM) << "Device" << device;
float value = 0.0; float value = 0.0;
if ((device != QString("nvidia")) && (device != QString("ati"))) if ((device != QString("nvidia")) && (device != QString("ati")))
@ -335,10 +186,10 @@ float ExtendedSysMon::getGpuTemp(const QString device) const
cmd = QString("nvidia-smi -q -x"); cmd = QString("nvidia-smi -q -x");
else if (device == QString("ati")) else if (device == QString("ati"))
cmd = QString("aticonfig --od-gettemperature"); cmd = QString("aticonfig --od-gettemperature");
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; qCInfo(LOG_ESM) << "cmd" << cmd;
TaskResult process = runTask(cmd); TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; qCInfo(LOG_ESM) << "Cmd returns" << process.exitCode;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; qCInfo(LOG_ESM) << "Error" << process.error;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output);
if (configuration[QString("GPUDEV")] == QString("nvidia")) if (configuration[QString("GPUDEV")] == QString("nvidia"))
@ -362,17 +213,17 @@ float ExtendedSysMon::getGpuTemp(const QString device) const
float ExtendedSysMon::getHddTemp(const QString cmd, const QString device) const float ExtendedSysMon::getHddTemp(const QString cmd, const QString device) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; qCDebug(LOG_ESM) << "cmd" << cmd;
if (debug) qDebug() << PDEBUG << ":" << "Device" << device; qCDebug(LOG_ESM) << "Device" << device;
float value = 0.0; float value = 0.0;
TaskResult process = runTask(QString("%1 %2").arg(cmd).arg(device)); TaskResult process = runTask(QString("%1 %2").arg(cmd).arg(device));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; qCInfo(LOG_ESM) << "Cmd returns" << process.exitCode;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; qCInfo(LOG_ESM) << "Error" << process.error;
bool smartctl = cmd.contains(QString("smartctl")); bool smartctl = cmd.contains(QString("smartctl"));
if (debug) qDebug() << PDEBUG << ":" << "Define smartctl" << smartctl; qCInfo(LOG_ESM) << "Parse as smartctl" << smartctl;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed(); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
if (smartctl) { if (smartctl) {
@ -396,10 +247,11 @@ float ExtendedSysMon::getHddTemp(const QString cmd, const QString device) const
QString ExtendedSysMon::getNetworkDevice() const QString ExtendedSysMon::getNetworkDevice() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
QString device = QString("lo"); QString device = QString("lo");
QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces(); QList<QNetworkInterface> rawInterfaceList = QNetworkInterface::allInterfaces();
qCInfo(LOG_ESM) << "Devices" << rawInterfaceList;
foreach(QNetworkInterface interface, rawInterfaceList) foreach(QNetworkInterface interface, rawInterfaceList)
if ((interface.flags().testFlag(QNetworkInterface::IsUp)) && if ((interface.flags().testFlag(QNetworkInterface::IsUp)) &&
(!interface.flags().testFlag(QNetworkInterface::IsLoopBack)) && (!interface.flags().testFlag(QNetworkInterface::IsLoopBack)) &&
@ -413,12 +265,12 @@ QString ExtendedSysMon::getNetworkDevice() const
QVariantHash ExtendedSysMon::getPlayerInfo(const QString playerName, const QString mpdAddress, QVariantHash ExtendedSysMon::getPlayerInfo(const QString playerName, const QString mpdAddress,
const QString mpdPort, QString mpris) const const QString mpdPort, QString mpris) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "player" << playerName; qCDebug(LOG_ESM) << "player" << playerName;
if (debug) qDebug() << PDEBUG << ":" << "MPD" << QString("%1:%2").arg(mpdAddress).arg(mpdPort); qCDebug(LOG_ESM) << "MPD" << QString("%1:%2").arg(mpdAddress).arg(mpdPort);
if (debug) qDebug() << PDEBUG << ":" << "MPRIS" << mpris; qCDebug(LOG_ESM) << "MPRIS" << mpris;
QVariantHash info; QVariantHash info;
info[QString("album")] = QString("unknown"); info[QString("album")] = QString("unknown");
@ -429,22 +281,37 @@ QVariantHash ExtendedSysMon::getPlayerInfo(const QString playerName, const QStri
if (playerName == QString("mpd")) if (playerName == QString("mpd"))
// mpd // mpd
return getPlayerMpdInfo(mpdAddress, mpdPort); info = getPlayerMpdInfo(mpdAddress, mpdPort);
else if (playerName == QString("mpris")) { else if (playerName == QString("mpris")) {
// players which supports mpris // players which supports mpris
if (mpris == QString("auto")) mpris = getAutoMpris(); if (mpris == QString("auto")) mpris = getAutoMpris();
if (mpris.isEmpty()) return info; if (mpris.isEmpty()) return info;
return getPlayerMprisInfo(mpris); info = getPlayerMprisInfo(mpris);
} }
// dymanic properties
// solid
info[QString("salbum")] = stripString(info[QString("album")].toString(), symbols);
info[QString("sartist")] = stripString(info[QString("artist")].toString(), symbols);
info[QString("stitle")] = stripString(info[QString("title")].toString(), symbols);
// dynamic
Plasma::DataContainer *playerDC = containerDict()["player"];
QVariantHash data = playerDC == nullptr ? info : qvariant_cast<QVariantHash>(playerDC->data());
info[QString("dalbum")] = buildString(data[QString("dalbum")].toString(),
info[QString("album")].toString(), symbols);
info[QString("dartist")] = buildString(data[QString("dartist")].toString(),
info[QString("artist")].toString(), symbols);
info[QString("dtitle")] = buildString(data[QString("dtitle")].toString(),
info[QString("title")].toString(), symbols);
return info; return info;
} }
QVariantHash ExtendedSysMon::getPlayerMpdInfo(const QString mpdAddress, const QString mpdPort) const QVariantHash ExtendedSysMon::getPlayerMpdInfo(const QString mpdAddress, const QString mpdPort) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "MPD" << QString("%1:%2").arg(mpdAddress).arg(mpdPort); qCDebug(LOG_ESM) << "MPD" << QString("%1:%2").arg(mpdAddress).arg(mpdPort);
QVariantHash info; QVariantHash info;
info[QString("album")] = QString("unknown"); info[QString("album")] = QString("unknown");
@ -456,10 +323,10 @@ QVariantHash ExtendedSysMon::getPlayerMpdInfo(const QString mpdAddress, const QS
QString cmd = QString("bash -c \"echo 'currentsong\nstatus\nclose' | curl --connect-timeout 1 -fsm 3 telnet://%1:%2\"") QString cmd = QString("bash -c \"echo 'currentsong\nstatus\nclose' | curl --connect-timeout 1 -fsm 3 telnet://%1:%2\"")
.arg(mpdAddress) .arg(mpdAddress)
.arg(mpdPort); .arg(mpdPort);
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; qCInfo(LOG_ESM) << "cmd" << cmd;
TaskResult process = runTask(cmd); TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; qCInfo(LOG_ESM) << "Cmd returns" << process.exitCode;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; qCInfo(LOG_ESM) << "Error" << process.error;
QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed(); QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed();
foreach(QString str, qoutput.split(QChar('\n'), QString::SkipEmptyParts)) { foreach(QString str, qoutput.split(QChar('\n'), QString::SkipEmptyParts)) {
@ -482,8 +349,8 @@ QVariantHash ExtendedSysMon::getPlayerMpdInfo(const QString mpdAddress, const QS
QVariantHash ExtendedSysMon::getPlayerMprisInfo(const QString mpris) const QVariantHash ExtendedSysMon::getPlayerMprisInfo(const QString mpris) const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << "MPRIS" << mpris; qCDebug(LOG_ESM) << "MPRIS" << mpris;
QVariantHash info; QVariantHash info;
info[QString("album")] = QString("unknown"); info[QString("album")] = QString("unknown");
@ -505,7 +372,7 @@ QVariantHash ExtendedSysMon::getPlayerMprisInfo(const QString mpris) const
request.setArguments(args); request.setArguments(args);
QDBusMessage response = bus.call(request, QDBus::BlockWithGui); QDBusMessage response = bus.call(request, QDBus::BlockWithGui);
if ((response.type() != QDBusMessage::ReplyMessage) || (response.arguments().isEmpty())) { if ((response.type() != QDBusMessage::ReplyMessage) || (response.arguments().isEmpty())) {
if (debug) qDebug() << PDEBUG << ":" << "Error message" << response.errorMessage(); qCWarning(LOG_ESM) << "Error message" << response.errorMessage();
} else { } else {
// another portion of dirty magic // another portion of dirty magic
QVariantHash map = qdbus_cast<QVariantHash>(response.arguments().first() QVariantHash map = qdbus_cast<QVariantHash>(response.arguments().first()
@ -523,7 +390,7 @@ QVariantHash ExtendedSysMon::getPlayerMprisInfo(const QString mpris) const
request.setArguments(args); request.setArguments(args);
response = bus.call(request, QDBus::BlockWithGui); response = bus.call(request, QDBus::BlockWithGui);
if ((response.type() != QDBusMessage::ReplyMessage) || (response.arguments().isEmpty())) { if ((response.type() != QDBusMessage::ReplyMessage) || (response.arguments().isEmpty())) {
if (debug) qDebug() << PDEBUG << ":" << "Error message" << response.errorMessage(); qCWarning(LOG_ESM) << "Error message" << response.errorMessage();
} else } else
// this cast is simpler than the previous one ;) // this cast is simpler than the previous one ;)
info[QString("progress")] = response.arguments().first().value<QDBusVariant>() info[QString("progress")] = response.arguments().first().value<QDBusVariant>()
@ -535,7 +402,7 @@ QVariantHash ExtendedSysMon::getPlayerMprisInfo(const QString mpris) const
QVariantHash ExtendedSysMon::getPsStats() const QVariantHash ExtendedSysMon::getPsStats() const
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
QStringList allDirectories = QDir(QString("/proc")).entryList(QDir::Dirs | QDir::NoDotAndDotDot, QStringList allDirectories = QDir(QString("/proc")).entryList(QDir::Dirs | QDir::NoDotAndDotDot,
QDir::Name); QDir::Name);
@ -554,17 +421,41 @@ QVariantHash ExtendedSysMon::getPsStats() const
QVariantHash psStats; QVariantHash psStats;
psStats[QString("pscount")] = running.count(); psStats[QString("pscount")] = running.count();
psStats[QString("ps")] = running.join(QString(",")); psStats[QString("ps")] = running.join(QChar(','));
psStats[QString("pstotal")] = directories.count(); psStats[QString("pstotal")] = directories.count();
return psStats; return psStats;
} }
QStringList ExtendedSysMon::sources() const
{
qCDebug(LOG_ESM);
QStringList source;
source.append(QString("battery"));
source.append(QString("custom"));
source.append(QString("desktop"));
source.append(QString("netdev"));
source.append(QString("gpu"));
source.append(QString("gputemp"));
source.append(QString("hddtemp"));
source.append(QString("pkg"));
source.append(QString("player"));
source.append(QString("ps"));
source.append(QString("quotes"));
source.append(QString("update"));
source.append(QString("weather"));
qCInfo(LOG_ESM) << "Sources" << source;
return source;
}
bool ExtendedSysMon::sourceRequestEvent(const QString &source) bool ExtendedSysMon::sourceRequestEvent(const QString &source)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "Source" << source; qCDebug(LOG_ESM) << "Source" << source;
return updateSourceEvent(source); return updateSourceEvent(source);
} }
@ -572,14 +463,14 @@ bool ExtendedSysMon::sourceRequestEvent(const QString &source)
bool ExtendedSysMon::updateSourceEvent(const QString &source) bool ExtendedSysMon::updateSourceEvent(const QString &source)
{ {
if (debug) qDebug() << PDEBUG; qCDebug(LOG_ESM);
if (debug) qDebug() << PDEBUG << ":" << "Source" << source; qCDebug(LOG_ESM) << "Source" << source;
if (source == QString("battery")) { if (source == QString("battery")) {
QVariantHash battery = getBattery(configuration[QString("ACPIPATH")]); QVariantHash battery = getBattery(configuration[QString("ACPIPATH")]);
foreach(QString key, battery.keys()) setData(source, key, battery[key]); foreach(QString key, battery.keys()) setData(source, key, battery[key]);
} else if (source == QString("custom")) { } else if (source == QString("custom")) {
foreach(ExtScript *script, externalScripts->items()) { foreach(ExtScript *script, extScripts->items()) {
QVariantHash data = script->run(); QVariantHash data = script->run();
foreach(QString key, data.keys()) setData(source, key, data[key]); foreach(QString key, data.keys()) setData(source, key, data[key]);
} }
@ -599,7 +490,7 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
} else if (source == QString("netdev")) { } else if (source == QString("netdev")) {
setData(source, QString("value"), getNetworkDevice()); setData(source, QString("value"), getNetworkDevice());
} else if (source == QString("pkg")) { } else if (source == QString("pkg")) {
foreach(ExtUpgrade *upgrade, externalUpgrade->items()) { foreach(ExtUpgrade *upgrade, extUpgrade->items()) {
QVariantHash data = upgrade->run(); QVariantHash data = upgrade->run();
foreach(QString key, data.keys()) setData(source, key, data[key]); foreach(QString key, data.keys()) setData(source, key, data[key]);
} }
@ -613,23 +504,179 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
QVariantHash ps = getPsStats(); QVariantHash ps = getPsStats();
foreach(QString key, ps.keys()) setData(source, key, ps[key]); foreach(QString key, ps.keys()) setData(source, key, ps[key]);
} else if (source == QString("quotes")) { } else if (source == QString("quotes")) {
foreach(ExtQuotes *quote, externalQuotes->items()) { foreach(ExtQuotes *quote, extQuotes->items()) {
QVariantHash data = quote->run(); QVariantHash data = quote->run();
foreach(QString key, data.keys()) setData(source, key, data[key]); foreach(QString key, data.keys()) setData(source, key, data[key]);
} }
} else if (source == QString("update")) { } else if (source == QString("update")) {
setData(source, QString("value"), true); setData(source, QString("value"), true);
} else if (source == QString("weather")) { } else if (source == QString("weather")) {
foreach(ExtWeather *weather, externalWeather->items()) { foreach(ExtWeather *weather, extWeather->items()) {
QVariantHash data = weather->run(); QVariantHash data = weather->run();
foreach(QString key, data.keys()) setData(source, key, data[key]); foreach(QString key, data.keys()) setData(source, key, data[key]);
} }
} else {
qCWarning(LOG_ESM) << "Unknown source" << source;
return false;
} }
return true; return true;
} }
QString ExtendedSysMon::buildString(const QString current, const QString value,
const int s) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Current value" << current;
qCDebug(LOG_ESM) << "New value" << value;
qCDebug(LOG_ESM) << "Strip after" << s;
int index = value.indexOf(current);
if ((current.isEmpty()) || ((index + s + 1) > value.count()))
return QString("%1").arg(value.left(s), s, QLatin1Char(' '));
else
return QString("%1").arg(value.mid(index + 1, s), s, QLatin1Char(' '));
}
QStringList ExtendedSysMon::getAllHdd() const
{
qCDebug(LOG_ESM);
QStringList allDevices = QDir(QString("/dev")).entryList(QDir::System, QDir::Name);
QStringList devices = allDevices.filter(QRegExp(QString("^[hms]d[a-z]$")));
for (int i=0; i<devices.count(); i++)
devices[i] = QString("/dev/%1").arg(devices.at(i));
qCInfo(LOG_ESM) << "Device list" << devices;
return devices;
}
QString ExtendedSysMon::getAutoGpu() const
{
qCDebug(LOG_ESM);
QString gpu = QString("disable");
QFile moduleFile(QString("/proc/modules"));
if (!moduleFile.open(QIODevice::ReadOnly)) return gpu;
QString output = moduleFile.readAll();
if (output.contains(QString("fglrx")))
gpu = QString("ati");
else if (output.contains(QString("nvidia")))
gpu = QString("nvidia");
qCInfo(LOG_ESM) << "Device" << gpu;
return gpu;
}
QString ExtendedSysMon::getAutoMpris() const
{
qCDebug(LOG_ESM);
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(QDBus::BlockWithGui, QString("ListNames"));
if (listServices.arguments().isEmpty()) return QString();
QStringList arguments = listServices.arguments().first().toStringList();
foreach(QString arg, arguments) {
qCInfo(LOG_ESM) << "Service found" << arg;
if (!arg.startsWith(QString("org.mpris.MediaPlayer2."))) continue;
QString service = arg;
service.remove(QString("org.mpris.MediaPlayer2."));
return service;
}
return QString();
}
void ExtendedSysMon::readConfiguration()
{
qCDebug(LOG_ESM);
QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation,
QString("plasma-dataengine-extsysmon.conf"));
qCInfo(LOG_ESM) << "Configuration file" << fileName;
QSettings settings(fileName, QSettings::IniFormat);
QHash<QString, QString> rawConfig;
settings.beginGroup(QString("Configuration"));
rawConfig[QString("ACPIPATH")] = settings.value(QString("ACPIPATH"), QString("/sys/class/power_supply/")).toString();
rawConfig[QString("GPUDEV")] = settings.value(QString("GPUDEV"), QString("auto")).toString();
rawConfig[QString("HDDDEV")] = settings.value(QString("HDDDEV"), QString("all")).toString();
rawConfig[QString("HDDTEMPCMD")] = settings.value(QString("HDDTEMPCMD"), QString("sudo smartctl -a")).toString();
rawConfig[QString("MPDADDRESS")] = settings.value(QString("MPDADDRESS"), QString("localhost")).toString();
rawConfig[QString("MPDPORT")] = settings.value(QString("MPDPORT"), QString("6600")).toString();
rawConfig[QString("MPRIS")] = settings.value(QString("MPRIS"), QString("auto")).toString();
rawConfig[QString("PLAYER")] = settings.value(QString("PLAYER"), QString("mpris")).toString();
rawConfig[QString("PLAYERSYMBOLS")] = settings.value(QString("PLAYERSYMBOLS"), QString("10")).toString();
settings.endGroup();
configuration = updateConfiguration(rawConfig);
symbols = configuration[QString("PLAYERSYMBOLS")].toInt();
}
QString ExtendedSysMon::stripString(const QString value, const int s) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "New value" << value;
qCDebug(LOG_ESM) << "Strip after" << s;
return value.count() > s ? QString("%1\u2026").arg(value.left(s - 1)) :
QString("%1").arg(value, s, QLatin1Char(' '));
}
QHash<QString, QString> ExtendedSysMon::updateConfiguration(QHash<QString, QString> rawConfig) const
{
qCDebug(LOG_ESM);
qCDebug(LOG_ESM) << "Raw configuration" << rawConfig;
// gpudev
if (rawConfig[QString("GPUDEV")] == QString("disable"))
rawConfig[QString("GPUDEV")] = QString("disable");
else if (rawConfig[QString("GPUDEV")] == QString("auto"))
rawConfig[QString("GPUDEV")] = getAutoGpu();
else if ((rawConfig[QString("GPUDEV")] != QString("ati")) &&
(rawConfig[QString("GPUDEV")] != QString("nvidia")))
rawConfig[QString("GPUDEV")] = getAutoGpu();
// hdddev
QStringList allHddDevices = getAllHdd();
if (rawConfig[QString("HDDDEV")] == QString("all"))
rawConfig[QString("HDDDEV")] = allHddDevices.join(QChar(','));
else if (rawConfig[QString("HDDDEV")] == QString("disable"))
rawConfig[QString("HDDDEV")] = QString("");
else {
QStringList deviceList = rawConfig[QString("HDDDEV")].split(QChar(','), QString::SkipEmptyParts);
QStringList devices;
QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$");
foreach(QString device, deviceList)
if ((QFile::exists(device)) && (device.contains(diskRegexp)))
devices.append(device);
if (devices.isEmpty())
rawConfig[QString("HDDDEV")] = allHddDevices.join(QChar(','));
else
rawConfig[QString("HDDDEV")] = devices.join(QChar(','));
}
// player
if ((rawConfig[QString("PLAYER")] != QString("mpd")) &&
(rawConfig[QString("PLAYER")] != QString("mpris")) &&
(rawConfig[QString("PLAYER")] != QString("disable")))
rawConfig[QString("PLAYER")] = QString("mpris");
// player symbols
if (rawConfig[QString("PLAYERSYMBOLS")].toInt() <= 0)
rawConfig[QString("PLAYERSYMBOLS")] = QString("10");
foreach(QString key, rawConfig.keys())
qCInfo(LOG_ESM) << key << "=" << rawConfig[key];
return rawConfig;
}
K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(extsysmon, ExtendedSysMon, "plasma-dataengine-extsysmon.json") K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(extsysmon, ExtendedSysMon, "plasma-dataengine-extsysmon.json")
#include "extsysmon.moc" #include "extsysmon.moc"

View File

@ -34,7 +34,7 @@ class ExtendedSysMon : public Plasma::DataEngine
public: public:
explicit ExtendedSysMon(QObject *parent, const QVariantList &args); explicit ExtendedSysMon(QObject *parent, const QVariantList &args);
~ExtendedSysMon(); virtual ~ExtendedSysMon();
// update functions // update functions
QVariantHash getBattery(const QString acpiPath) const; QVariantHash getBattery(const QString acpiPath) const;
QVariantHash getCurrentDesktop() const; QVariantHash getCurrentDesktop() const;
@ -52,23 +52,25 @@ public:
QVariantHash getPsStats() const; QVariantHash getPsStats() const;
protected: protected:
QStringList sources() const;
bool sourceRequestEvent(const QString &source); bool sourceRequestEvent(const QString &source);
bool updateSourceEvent(const QString &source); bool updateSourceEvent(const QString &source);
QStringList sources() const;
private: private:
// configuration // configuration
QHash<QString, QString> configuration; QHash<QString, QString> configuration;
ExtItemAggregator<ExtQuotes> *externalQuotes; int symbols = 10;
ExtItemAggregator<ExtScript> *externalScripts; ExtItemAggregator<ExtQuotes> *extQuotes;
ExtItemAggregator<ExtUpgrade> *externalUpgrade; ExtItemAggregator<ExtScript> *extScripts;
ExtItemAggregator<ExtWeather> *externalWeather; ExtItemAggregator<ExtUpgrade> *extUpgrade;
bool debug; ExtItemAggregator<ExtWeather> *extWeather;
// reread configuration // methods
QString buildString(const QString current, const QString value, const int s) const;
QStringList getAllHdd() const; QStringList getAllHdd() const;
QString getAutoGpu() const; QString getAutoGpu() const;
QString getAutoMpris() const; QString getAutoMpris() const;
void readConfiguration(); void readConfiguration();
QString stripString(const QString value, const int s) const;
QHash<QString, QString> updateConfiguration(QHash<QString, QString> rawConfig) const; QHash<QString, QString> updateConfiguration(QHash<QString, QString> rawConfig) const;
}; };

View File

@ -16,3 +16,5 @@ MPDPORT=6600
MPRIS=auto MPRIS=auto
# Player name. Supported players are 'mpd', 'mpris', 'disable' # Player name. Supported players are 'mpd', 'mpris', 'disable'
PLAYER=mpris PLAYER=mpris
# Show only this symbols count for dynamic player tags
PLAYERSYMBOLS=10

View File

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Encoding=UTF-8 Encoding=UTF-8
Name=Extended SystemMonitor DataEngine Name=Extended SystemMonitor
Comment=Adds some additional functions to System DataEngine Comment=Adds some additional functions to System DataEngine
ServiceTypes=Plasma/DataEngine ServiceTypes=Plasma/DataEngine
Type=Service Type=Service

View File

@ -1,5 +1,5 @@
find_package(Gettext REQUIRED) find_package(Gettext REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Network Qml Widgets) find_package(Qt5 REQUIRED COMPONENTS Core DBus Network Script Qml Widgets)
find_package(ECM 0.0.11 REQUIRED NO_MODULE) find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(KF5 REQUIRED COMPONENTS I18n Notifications Plasma Service WindowSystem) find_package(KF5 REQUIRED COMPONENTS I18n Notifications Plasma Service WindowSystem)
@ -10,16 +10,16 @@ include(KDECompilerSettings)
add_definitions( add_definitions(
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS} ${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS} ${Qt5Script_DEFINITIONS} ${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
) )
set(Qt_INCLUDE set(Qt_INCLUDE
${Qt5Core_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Script_INCLUDE_DIRS} ${Qt5Qml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}
) )
set(Kf5_INCLUDE ${I18n_INCLUDE_DIR} ${Notifications_INCLUDE_DIR} ${Plasma_INCLUDE_DIR}) set(Kf5_INCLUDE ${I18n_INCLUDE_DIR} ${Notifications_INCLUDE_DIR} ${Plasma_INCLUDE_DIR})
set(Qt_LIBRARIES set(Qt_LIBRARIES
${Qt5Core_LIBRARIES} ${Qt5DBus_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5DBus_LIBRARIES} ${Qt5Network_LIBRARIES}
${Qt5Qml_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Script_LIBRARIES} ${Qt5Qml_LIBRARIES} ${Qt5Widgets_LIBRARIES}
) )
set(Kf5_LIBRARIES KF5::I18n KF5::Notifications KF5::Plasma KF5::WindowSystem) set(Kf5_LIBRARIES KF5::I18n KF5::Notifications KF5::Plasma KF5::WindowSystem)

View File

@ -0,0 +1,37 @@
# generators
if(BUILD_DEB_PACKAGE)
set(CPACK_GENERATOR ${CPACK_GENERATOR} "DEB")
endif()
if(BUILD_RPM_PACKAGE)
set(CPACK_GENERATOR ${CPACK_GENERATOR} "RPM")
endif()
# build properties
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# general metadata
set(CPACK_PACKAGE_NAME "plasma-widget-awesome-widgets")
set(CPACK_PACKAGE_CONTACT "${PROJECT_AUTHOR}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_RELEASE "1")
# doesn't match to official arch :/
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
# deb specific
set(CPACK_DEBIAN_PACKAGE_DEPENDS "plasma-framework")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)")
set(CPACK_DEBIAN_PACKAGE_ENHANCES "mpd, smartmontools")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://arcanis.name/projects/awesome-widgets")
set(CPACK_DEBIAN_PACKAGE_SECTION "KDE")
# rpm specific
set(CPACK_RPM_PACKAGE_DESCRIPTION "Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)")
set(CPACK_RPM_PACKAGE_GROUP "User Interface/Desktops")
set(CPACK_RPM_PACKAGE_LICENSE "${PROJECT_LICENSE}")
set(CPACK_RPM_PACKAGE_REQUIRES "plasma-framework")
set(CPACK_RPM_PACKAGE_SUGGESTS "mpd, smartmontools")
set(CPACK_RPM_PACKAGE_URL "https://arcanis.name/projects/awesome-widgets")
if(BUILD_DEB_PACKAGE OR BUILD_RPM_PACKAGE)
include(CPack)
endif()

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,467 +17,403 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "" msgstr ""
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "" msgstr ""
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "" msgstr ""
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "" msgstr ""
#, kde-format
msgid "About" msgid "About"
msgstr "" msgstr ""
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "" msgstr ""
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "" msgstr ""
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "" msgstr ""
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "" msgstr ""
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "" msgstr ""
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "" msgstr ""
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "" msgstr ""
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "" msgstr ""
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "" msgstr ""
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "" msgstr ""
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "" msgstr ""
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "" msgstr ""
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "" msgstr ""
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "" msgstr ""
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "" msgstr ""
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "" msgstr ""
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "" msgstr ""
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "" msgstr ""
#, kde-format msgid "Check updates on startup"
msgstr ""
msgid "Translate strings"
msgstr ""
msgid "Drop key cache" msgid "Drop key cache"
msgstr "" msgstr ""
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "" msgstr ""
#, kde-format
msgid "Font" msgid "Font"
msgstr "" msgstr ""
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "" msgstr ""
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "" msgstr ""
#, kde-format
msgid "light" msgid "light"
msgstr "" msgstr ""
#, kde-format
msgid "normal" msgid "normal"
msgstr "" msgstr ""
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "" msgstr ""
#, kde-format
msgid "bold" msgid "bold"
msgstr "" msgstr ""
#, kde-format
msgid "black" msgid "black"
msgstr "" msgstr ""
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "" msgstr ""
#, kde-format
msgid "italic" msgid "italic"
msgstr "" msgstr ""
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "" msgstr ""
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "" msgstr ""
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "" msgstr ""
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "" msgstr ""
#, kde-format
msgid "Custom scripts"
msgstr ""
#, kde-format
msgid "Edit scripts"
msgstr ""
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "" msgstr ""
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "" msgstr ""
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "" msgstr ""
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "" msgstr ""
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "" msgstr ""
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "" msgstr ""
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "" msgstr ""
#, kde-format msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr ""
msgid "Edit scripts"
msgstr ""
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "" msgstr ""
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "" msgstr ""
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "" msgstr ""
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "" msgstr ""
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "" msgstr ""
#, kde-format
msgid "Edit weather" msgid "Edit weather"
msgstr "" msgstr ""
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "" msgstr ""
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "" msgstr ""
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "" msgstr ""
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
msgstr "" msgstr ""
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "" msgstr ""
#, kde-format
msgid "Background" msgid "Background"
msgstr "" msgstr ""
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "" msgstr ""
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "" msgstr ""
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "" msgstr ""
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "" msgstr ""
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "" msgstr ""
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "" msgstr ""
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "" msgstr ""
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "" msgstr ""
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
msgstr "" msgstr ""
#, kde-format msgid "AC"
msgstr ""
msgid "Bars"
msgstr ""
msgid "CPU"
msgstr ""
msgid "Desktops"
msgstr ""
msgid "Memory"
msgstr ""
msgid "Network"
msgstr ""
msgid "Scripts"
msgstr ""
msgid "Time"
msgstr ""
msgid "Quotes"
msgstr ""
msgid "Upgrades"
msgstr ""
msgid "Weathers"
msgstr ""
msgid "Add" msgid "Add"
msgstr "" msgstr ""
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "" msgstr ""
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "" msgstr ""
#, kde-format msgid "Add lambda"
msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "" msgstr ""
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "" msgstr ""
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "" msgstr ""
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "" msgstr ""
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "" msgstr ""
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "" msgstr ""
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "" msgstr ""
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "" msgstr ""
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "" msgstr ""
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "" msgstr ""
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "" msgstr ""
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "" msgstr ""
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "" msgstr ""
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "" msgstr ""
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "" msgstr ""
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "" msgstr ""
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "" msgstr ""
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "" msgstr ""
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "" msgstr ""
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "" msgstr ""
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "" msgstr ""
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "" msgstr ""
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "" msgstr ""
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "" msgstr ""
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "" msgstr ""
#, kde-format msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used" msgid "Swap is used"
msgstr "" msgstr ""
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "" msgstr ""
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "" msgstr ""
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#, kde-format
msgid "Create" msgid "Create"
msgstr "" msgstr ""
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "" msgstr ""
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "" msgstr ""
#, kde-format
msgid "File name" msgid "File name"
msgstr "" msgstr ""
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Identity: %1" msgid "Identity: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#, kde-format
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -485,160 +421,112 @@ msgid ""
"span></a></p></body></html>" "span></a></p></body></html>"
msgstr "" msgstr ""
#, kde-format
msgid "Ticker" msgid "Ticker"
msgstr "" msgstr ""
#, kde-format
msgid "Active" msgid "Active"
msgstr "" msgstr ""
#, kde-format
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
#, kde-format
msgid "Command" msgid "Command"
msgstr "" msgstr ""
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "" msgstr ""
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "" msgstr ""
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "" msgstr ""
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "" msgstr ""
#, kde-format
msgid "Wrap colors" msgid "Wrap colors"
msgstr "" msgstr ""
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "" msgstr ""
#, kde-format msgid "Filter"
msgstr ""
msgid "Null" msgid "Null"
msgstr "" msgstr ""
#, kde-format
msgid "City" msgid "City"
msgstr "" msgstr ""
#, kde-format
msgid "Country" msgid "Country"
msgstr "" msgstr ""
#, kde-format
msgid "Timestamp" msgid "Timestamp"
msgstr "" msgstr ""
#, kde-format msgid "Use images"
msgstr ""
msgid "Value" msgid "Value"
msgstr "" msgstr ""
#, kde-format
msgid "Active color" msgid "Active color"
msgstr "" msgstr ""
#, kde-format
msgid "Inactive color" msgid "Inactive color"
msgstr "" msgstr ""
#, kde-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "" msgstr ""
#, kde-format
msgid "Height" msgid "Height"
msgstr "" msgstr ""
#, kde-format
msgid "Width" msgid "Width"
msgstr "" msgstr ""
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "" msgstr ""
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "" msgstr ""
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "" msgstr ""
#, kde-format
msgid "contours" msgid "contours"
msgstr "" msgstr ""
#, kde-format
msgid "windows" msgid "windows"
msgstr "" msgstr ""
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "" msgstr ""
#, kde-format
msgid "names" msgid "names"
msgstr "" msgstr ""
#, kde-format
msgid "none" msgid "none"
msgstr "" msgstr ""
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "" msgstr ""
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "" msgstr ""
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "" msgstr ""
#, kde-format
msgid "Top Edge"
msgstr ""
#, kde-format
msgid "Bottom Edge"
msgstr ""
#, kde-format
msgid "Left Edge"
msgstr ""
#, kde-format
msgid "Right Edge"
msgstr ""
#, kde-format
msgid "Unknown location (%1)"
msgstr ""
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "" msgstr ""
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "" msgstr ""

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:09+0300\n" "PO-Revision-Date: 2015-09-02 00:18+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: English <kde-russian@lists.kde.ru>\n" "Language-Team: English <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,239 +18,189 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 2.0\n" "X-Generator: Lokalize 2.0\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "Advanced" msgstr "Advanced"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "Tooltip" msgstr "Tooltip"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "Appearance" msgstr "Appearance"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#, kde-format
msgid "About" msgid "About"
msgstr "About" msgstr "About"
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "Acknowledgment" msgstr "Acknowledgment"
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Widget height, px" msgstr "Widget height, px"
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "Widget width, px" msgstr "Widget width, px"
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Enable notifications" msgstr "Enable notifications"
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "Wrap new lines" msgstr "Wrap new lines"
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "Enable background" msgstr "Enable background"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "Custom time format" msgstr "Custom time format"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "Custom uptime format" msgstr "Custom uptime format"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "Temperature units" msgstr "Temperature units"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "Celsius" msgstr "Celsius"
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "Fahrenheit" msgstr "Fahrenheit"
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "Kelvin" msgstr "Kelvin"
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "Reaumur" msgstr "Reaumur"
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "cm^-1" msgstr "cm^-1"
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "kJ/mol" msgstr "kJ/mol"
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "kcal/mol" msgstr "kcal/mol"
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "AC online tag" msgstr "AC online tag"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "AC offline tag" msgstr "AC offline tag"
#, kde-format msgid "Check updates on startup"
msgstr "Check updates on startup"
msgid "Translate strings"
msgstr "Translate strings"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "Drop key cache" msgstr "Drop key cache"
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "Time interval" msgstr "Time interval"
#, kde-format
msgid "Font" msgid "Font"
msgstr "Font" msgstr "Font"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "Font size" msgstr "Font size"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "Font weight" msgstr "Font weight"
#, kde-format
msgid "light" msgid "light"
msgstr "light" msgstr "light"
#, kde-format
msgid "normal" msgid "normal"
msgstr "normal" msgstr "normal"
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "demi bold" msgstr "demi bold"
#, kde-format
msgid "bold" msgid "bold"
msgstr "bold" msgstr "bold"
#, kde-format
msgid "black" msgid "black"
msgstr "black" msgstr "black"
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "Font style" msgstr "Font style"
#, kde-format
msgid "italic" msgid "italic"
msgstr "italic" msgstr "italic"
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "Font color" msgstr "Font color"
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "Select a color" msgstr "Select a color"
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "Select a font" msgstr "Select a font"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "ACPI path" msgstr "ACPI path"
#, kde-format
msgid "Custom scripts"
msgstr "Custom scripts"
#, kde-format
msgid "Edit scripts"
msgstr "Edit scripts"
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "GPU device" msgstr "GPU device"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "HDD" msgstr "HDD"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "hddtemp cmd" msgstr "hddtemp cmd"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "MPD address" msgstr "MPD address"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "MPD port" msgstr "MPD port"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "MPRIS player name" msgstr "MPRIS player name"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "Music player" msgstr "Music player"
#, kde-format msgid "Player data symbols"
msgstr "Player data symbols"
msgid "Custom scripts"
msgstr "Custom scripts"
msgid "Edit scripts"
msgstr "Edit scripts"
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "Quotes monitor" msgstr "Quotes monitor"
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "Edit tickers" msgstr "Edit tickers"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "Package manager" msgstr "Package manager"
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "Edit command" msgstr "Edit command"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "Weather" msgstr "Weather"
#, kde-format
msgid "Edit weather" msgid "Edit weather"
msgstr "Edit weather" msgstr "Edit weather"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "Request key" msgstr "Request key"
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "Show README" msgstr "Show README"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "Check updates" msgstr "Check updates"
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -258,47 +208,36 @@ msgstr ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Number of values for tooltips" msgstr "Number of values for tooltips"
#, kde-format
msgid "Background" msgid "Background"
msgstr "Background" msgstr "Background"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "CPU color" msgstr "CPU color"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "CPU clock color" msgstr "CPU clock color"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "Memory color" msgstr "Memory color"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "Swap color" msgstr "Swap color"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "Download speed color" msgstr "Download speed color"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Upload speed color" msgstr "Upload speed color"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "Battery active color" msgstr "Battery active color"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Battery inactive color" msgstr "Battery inactive color"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -306,183 +245,180 @@ msgstr ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
#, kde-format msgid "AC"
msgstr "AC"
msgid "Bars"
msgstr "Bars"
msgid "CPU"
msgstr "CPU"
msgid "Desktops"
msgstr "Desktops"
msgid "Memory"
msgstr "Memory"
msgid "Network"
msgstr "Network"
msgid "Scripts"
msgstr "Scripts"
msgid "Time"
msgstr "Time"
msgid "Quotes"
msgstr "Quotes"
msgid "Upgrades"
msgstr "Upgrades"
msgid "Weathers"
msgstr "Weathers"
msgid "Add" msgid "Add"
msgstr "Add" msgstr "Add"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "Show value" msgstr "Show value"
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "Tag: %1" msgstr "Tag: %1"
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "Value: %1" msgstr "Value: %1"
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "Info: %1" msgstr "Info: %1"
#, kde-format msgid "Add lambda"
msgstr "Add lambda"
msgid "Edit bars" msgid "Edit bars"
msgstr "Edit bars" msgstr "Edit bars"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "Run %1" msgstr "Run %1"
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "Version %1 (build date %2)" msgstr "Version %1 (build date %2)"
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "A set of minimalistic plasmoid widgets" msgstr "A set of minimalistic plasmoid widgets"
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "Links:" msgstr "Links:"
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "Homepage" msgstr "Homepage"
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "Repository" msgstr "Repository"
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Bugtracker" msgstr "Bugtracker"
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "Translation issue" msgstr "Translation issue"
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "AUR packages" msgstr "AUR packages"
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "openSUSE packages" msgstr "openSUSE packages"
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "This software is licensed under %1" msgstr "This software is licensed under %1"
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Translators: %1" msgstr "Translators: %1"
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "This software uses: %1" msgstr "This software uses: %1"
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "Select font" msgstr "Select font"
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "Current version : %1" msgstr "Current version : %1"
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "New version : %1" msgstr "New version : %1"
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "Click \"Ok\" to download" msgstr "Click \"Ok\" to download"
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "There are updates" msgstr "There are updates"
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "AC online" msgstr "AC online"
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "AC offline" msgstr "AC offline"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "High CPU load" msgstr "High CPU load"
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "High GPU load" msgstr "High GPU load"
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "Free space on %1 less than 10%" msgstr "Free space on %1 less than 10%"
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "High memory usage" msgstr "High memory usage"
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "Network device has been changed to %1" msgstr "Network device has been changed to %1"
#, kde-format msgid "MB/s"
msgstr "MB/s"
msgid "KB/s"
msgstr "KB/s"
msgid "Swap is used" msgid "Swap is used"
msgstr "Swap is used" msgstr "Swap is used"
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "Select tag" msgstr "Select tag"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "Tag" msgstr "Tag"
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "Copy" msgstr "Copy"
#, kde-format
msgid "Create" msgid "Create"
msgstr "Create" msgstr "Create"
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "Remove" msgstr "Remove"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "Enter file name" msgstr "Enter file name"
#, kde-format
msgid "File name" msgid "File name"
msgstr "File name" msgstr "File name"
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "Name: %1" msgstr "Name: %1"
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Comment: %1" msgstr "Comment: %1"
#, kde-format
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Identity: %1" msgstr "Identity: %1"
#, kde-format
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#, kde-format
msgid "Comment" msgid "Comment"
msgstr "Comment" msgstr "Comment"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -494,164 +430,131 @@ msgstr ""
"text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</" "text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</"
"span></a></p></body></html>" "span></a></p></body></html>"
#, kde-format
msgid "Ticker" msgid "Ticker"
msgstr "Ticker" msgstr "Ticker"
#, kde-format
msgid "Active" msgid "Active"
msgstr "Active" msgstr "Active"
#, kde-format
msgid "Interval" msgid "Interval"
msgstr "Interval" msgstr "Interval"
#, kde-format
msgid "Command" msgid "Command"
msgstr "Command" msgstr "Command"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "Prefix" msgstr "Prefix"
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "Has output" msgstr "Has output"
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "Redirect" msgstr "Redirect"
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "Additional filters" msgstr "Additional filters"
#, kde-format
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Wrap colors" msgstr "Wrap colors"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "Wrap spaces" msgstr "Wrap spaces"
#, kde-format msgid "Filter"
msgstr "Filter"
msgid "Null" msgid "Null"
msgstr "Null" msgstr "Null"
#, kde-format
msgid "City" msgid "City"
msgstr "City" msgstr "City"
#, kde-format
msgid "Country" msgid "Country"
msgstr "Country" msgstr "Country"
#, kde-format
msgid "Timestamp" msgid "Timestamp"
msgstr "Timestamp" msgstr "Timestamp"
#, kde-format msgid "Use images"
msgstr "Use images"
msgid "Value" msgid "Value"
msgstr "Value" msgstr "Value"
#, kde-format
msgid "Active color" msgid "Active color"
msgstr "Active color" msgstr "Active color"
#, kde-format
msgid "Inactive color" msgid "Inactive color"
msgstr "Inactive color" msgstr "Inactive color"
#, kde-format
msgid "Type" msgid "Type"
msgstr "Type" msgstr "Type"
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "Direction" msgstr "Direction"
#, kde-format
msgid "Height" msgid "Height"
msgstr "Height" msgstr "Height"
#, kde-format
msgid "Width" msgid "Width"
msgstr "Width" msgstr "Width"
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "Active desktop" msgstr "Active desktop"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "Inactive desktop" msgstr "Inactive desktop"
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "Tooltip type" msgstr "Tooltip type"
#, kde-format
msgid "contours" msgid "contours"
msgstr "contours" msgstr "contours"
#, kde-format
msgid "windows" msgid "windows"
msgstr "windows" msgstr "windows"
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "clean desktop" msgstr "clean desktop"
#, kde-format
msgid "names" msgid "names"
msgstr "names" msgstr "names"
#, kde-format
msgid "none" msgid "none"
msgstr "none" msgstr "none"
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "Tooltip width" msgstr "Tooltip width"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "Vertical layout" msgstr "Vertical layout"
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "Mark" msgstr "Mark"
#, kde-format
msgid "Top Edge"
msgstr "Top Edge"
#, kde-format
msgid "Bottom Edge"
msgstr "Bottom Edge"
#, kde-format
msgid "Left Edge"
msgstr "Left Edge"
#, kde-format
msgid "Right Edge"
msgstr "Right Edge"
#, kde-format
msgid "Unknown location (%1)"
msgstr "Unknown location (%1)"
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#~ msgid "Top Edge"
#~ msgstr "Top Edge"
#~ msgid "Bottom Edge"
#~ msgstr "Bottom Edge"
#~ msgid "Left Edge"
#~ msgstr "Left Edge"
#~ msgid "Right Edge"
#~ msgstr "Right Edge"
#~ msgid "Unknown location (%1)"
#~ msgstr "Unknown location (%1)"
#~ msgid "Ticker: %1" #~ msgid "Ticker: %1"
#~ msgstr "Ticker: %1" #~ msgstr "Ticker: %1"
@ -673,9 +576,6 @@ msgstr "esalexeev@gmail.com"
#~ msgid "Edit" #~ msgid "Edit"
#~ msgstr "Edit" #~ msgstr "Edit"
#~ msgid "Bars"
#~ msgstr "Bars"
#~ msgid "Enable popup on mouse click" #~ msgid "Enable popup on mouse click"
#~ msgstr "Enable popup on mouse click" #~ msgstr "Enable popup on mouse click"
@ -849,9 +749,6 @@ msgstr "esalexeev@gmail.com"
#~ "$uptime - system uptime\n" #~ "$uptime - system uptime\n"
#~ "$custom - custom format" #~ "$custom - custom format"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid "" #~ msgid ""
#~ "$cpu - total load CPU, %\n" #~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n" #~ "$cpu0 - load CPU for core 0, %\n"
@ -903,9 +800,6 @@ msgstr "esalexeev@gmail.com"
#~ msgid "$gputemp - physical temperature on GPU" #~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - physical temperature on GPU" #~ msgstr "$gputemp - physical temperature on GPU"
#~ msgid "Memory"
#~ msgstr "Memory"
#~ msgid "" #~ msgid ""
#~ "$mem - RAM usage, %\n" #~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n" #~ "$memmb - RAM usage, MB\n"
@ -968,9 +862,6 @@ msgstr "esalexeev@gmail.com"
#~ msgstr "" #~ msgstr ""
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0" #~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Network"
#~ msgid "" #~ msgid ""
#~ "$down - download speed, KB/s\n" #~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n" #~ "$up - upload speed, KB/s\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:13+0300\n" "PO-Revision-Date: 2015-07-31 22:13+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Spanish <kde-russian@lists.kde.ru>\n" "Language-Team: Spanish <kde-russian@lists.kde.ru>\n"
@ -18,239 +18,192 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n" "X-Generator: Lokalize 2.0\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "Avanzado" msgstr "Avanzado"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "Ventana emergente" msgstr "Ventana emergente"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "Apariencia" msgstr "Apariencia"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#, kde-format
msgid "About" msgid "About"
msgstr "Acerca de" msgstr "Acerca de"
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "Reconocimiento" msgstr "Reconocimiento"
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Alto del widget, px" msgstr "Alto del widget, px"
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "Ancho del widget, px" msgstr "Ancho del widget, px"
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Habilitar notificaciones" msgstr "Habilitar notificaciones"
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "Ajustar las nuevas líneas" msgstr "Ajustar las nuevas líneas"
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "Habilitar fondo" msgstr "Habilitar fondo"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "Formato personalizado de hora" msgstr "Formato personalizado de hora"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "Formato personalizado de actividad del sistema" msgstr "Formato personalizado de actividad del sistema"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "Unidades de temperatura" msgstr "Unidades de temperatura"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "Celsius" msgstr "Celsius"
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "Fahrenheit" msgstr "Fahrenheit"
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "Kelvin" msgstr "Kelvin"
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "Réaumur" msgstr "Réaumur"
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "cm^-1" msgstr "cm^-1"
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "kJ/mol" msgstr "kJ/mol"
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "kcal/mol" msgstr "kcal/mol"
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "Etiqueta para alimentación conectada" msgstr "Etiqueta para alimentación conectada"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "Etiqueta para la alimentación desconectada" msgstr "Etiqueta para la alimentación desconectada"
#, kde-format #, fuzzy
msgid "Check updates on startup"
msgstr "Comprobar actualizaciones"
#, fuzzy
msgid "Translate strings"
msgstr "Problemas de traducción"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "" msgstr ""
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "Intervalo de tiempo" msgstr "Intervalo de tiempo"
#, kde-format
msgid "Font" msgid "Font"
msgstr "Tipo de letra" msgstr "Tipo de letra"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "Tamaño de letra" msgstr "Tamaño de letra"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "Grosor de la letra" msgstr "Grosor de la letra"
#, kde-format
msgid "light" msgid "light"
msgstr "fina" msgstr "fina"
#, kde-format
msgid "normal" msgid "normal"
msgstr "normal" msgstr "normal"
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "medio negrita" msgstr "medio negrita"
#, kde-format
msgid "bold" msgid "bold"
msgstr "negrita" msgstr "negrita"
#, kde-format
msgid "black" msgid "black"
msgstr "negro" msgstr "negro"
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "Estilo de letra" msgstr "Estilo de letra"
#, kde-format
msgid "italic" msgid "italic"
msgstr "cursiva" msgstr "cursiva"
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "Color de letra" msgstr "Color de letra"
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "Elige un color" msgstr "Elige un color"
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "Elige un tipo de letra" msgstr "Elige un tipo de letra"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "Ruta ACPI" msgstr "Ruta ACPI"
#, kde-format
msgid "Custom scripts"
msgstr "Scripts personalizados"
#, kde-format
msgid "Edit scripts"
msgstr "Editar scripts"
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "Dispositivo de GPU" msgstr "Dispositivo de GPU"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "Disco duro" msgstr "Disco duro"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Comando hddtemp" msgstr "Comando hddtemp"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "Dirección de MPD" msgstr "Dirección de MPD"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "Puerto de MPD" msgstr "Puerto de MPD"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "Nombre del reproductor MPRIS" msgstr "Nombre del reproductor MPRIS"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "Reproductor de música" msgstr "Reproductor de música"
#, kde-format msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr "Scripts personalizados"
msgid "Edit scripts"
msgstr "Editar scripts"
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "Monitor de citas" msgstr "Monitor de citas"
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "Editar tickets" msgstr "Editar tickets"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "Gestor de paquetes" msgstr "Gestor de paquetes"
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "Editar orden" msgstr "Editar orden"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Edit weather" msgid "Edit weather"
msgstr "Editar tickets" msgstr "Editar tickets"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "Solicitar llave" msgstr "Solicitar llave"
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "Mostrar el README" msgstr "Mostrar el README"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "Comprobar actualizaciones" msgstr "Comprobar actualizaciones"
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -259,47 +212,36 @@ msgstr ""
"ventanas emergentes. Para habilitarlas marca respectivas las cajas de " "ventanas emergentes. Para habilitarlas marca respectivas las cajas de "
"selección necesarias." "selección necesarias."
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Número de valores para las ventanas emergentes" msgstr "Número de valores para las ventanas emergentes"
#, kde-format
msgid "Background" msgid "Background"
msgstr "Fondo" msgstr "Fondo"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "Color de la CPU" msgstr "Color de la CPU"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Color de la frecuencia de la CPU" msgstr "Color de la frecuencia de la CPU"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "Color de la memoria" msgstr "Color de la memoria"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "Color de la swap" msgstr "Color de la swap"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "Color de la velocidad de recepción" msgstr "Color de la velocidad de recepción"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Color de la velocidad de envío" msgstr "Color de la velocidad de envío"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "Color de la batería activa" msgstr "Color de la batería activa"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Color de la batería inactiva" msgstr "Color de la batería inactiva"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -307,183 +249,185 @@ msgstr ""
"Puedes encontrar información detallada en el <a href=\"http://arcanis.name/" "Puedes encontrar información detallada en el <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">sitio del proyecto</a>" "projects/awesome-widgets/\">sitio del proyecto</a>"
#, kde-format msgid "AC"
msgstr ""
msgid "Bars"
msgstr "Barras"
msgid "CPU"
msgstr "CPU"
msgid "Desktops"
msgstr ""
msgid "Memory"
msgstr "Memoria"
msgid "Network"
msgstr "Red"
#, fuzzy
msgid "Scripts"
msgstr "Editar scripts"
#, fuzzy
msgid "Time"
msgstr "Hora"
#, fuzzy
msgid "Quotes"
msgstr "Monitor de citas"
msgid "Upgrades"
msgstr ""
#, fuzzy
msgid "Weathers"
msgstr "Editar tickets"
msgid "Add" msgid "Add"
msgstr "Añadir" msgstr "Añadir"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "Mostrar valor" msgstr "Mostrar valor"
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "Etiqueta: %1" msgstr "Etiqueta: %1"
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "Valor: %1" msgstr "Valor: %1"
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "Información: %1" msgstr "Información: %1"
#, kde-format msgid "Add lambda"
msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Editar barras" msgstr "Editar barras"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "Ejecutar %1" msgstr "Ejecutar %1"
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "Versión %1 (fecha de construcción %2)" msgstr "Versión %1 (fecha de construcción %2)"
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "Un conjunto de plasmoides minimalistas" msgstr "Un conjunto de plasmoides minimalistas"
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "Enlaces:" msgstr "Enlaces:"
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "Página principal" msgstr "Página principal"
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "Repositorio" msgstr "Repositorio"
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Reporte de errores" msgstr "Reporte de errores"
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "Problemas de traducción" msgstr "Problemas de traducción"
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "Paquetes AUR" msgstr "Paquetes AUR"
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "Paquetes de openSUSE" msgstr "Paquetes de openSUSE"
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "Este software está licenciado bajo %1" msgstr "Este software está licenciado bajo %1"
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Traductores: %1" msgstr "Traductores: %1"
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "Este software usa: %1" msgstr "Este software usa: %1"
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "Elegir tipo de letra" msgstr "Elegir tipo de letra"
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "Versión actual: %1" msgstr "Versión actual: %1"
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "Nueva versión: %1" msgstr "Nueva versión: %1"
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "Haz clic en «Ok» para descargar" msgstr "Haz clic en «Ok» para descargar"
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "Hay actualizaciones disponibles" msgstr "Hay actualizaciones disponibles"
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "Alimentación conectada" msgstr "Alimentación conectada"
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "Alimentación desconectada" msgstr "Alimentación desconectada"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "Carga alta de CPU" msgstr "Carga alta de CPU"
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "Carga alta de GPU" msgstr "Carga alta de GPU"
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "Espacio libre en %1 es menos del 10%" msgstr "Espacio libre en %1 es menos del 10%"
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "Alto uso de la memoria" msgstr "Alto uso de la memoria"
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "El dispositivo de red ha sido cambiado a %1" msgstr "El dispositivo de red ha sido cambiado a %1"
#, kde-format msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used" msgid "Swap is used"
msgstr "Swap está en uso" msgstr "Swap está en uso"
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "Elegir etiqueta" msgstr "Elegir etiqueta"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "Etiqueta" msgstr "Etiqueta"
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "Copiar" msgstr "Copiar"
#, kde-format
msgid "Create" msgid "Create"
msgstr "Crear" msgstr "Crear"
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "Eliminar" msgstr "Eliminar"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "Inserta el nombre de archivo" msgstr "Inserta el nombre de archivo"
#, kde-format
msgid "File name" msgid "File name"
msgstr "Nombre de archivo" msgstr "Nombre de archivo"
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "Nombre: %1" msgstr "Nombre: %1"
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Comentario: %1" msgstr "Comentario: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Comentario: %1" msgstr "Comentario: %1"
#, kde-format
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
#, kde-format
msgid "Comment" msgid "Comment"
msgstr "Comentario" msgstr "Comentario"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -491,164 +435,137 @@ msgid ""
"span></a></p></body></html>" "span></a></p></body></html>"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Ticker" msgid "Ticker"
msgstr "Reloj: %1" msgstr "Reloj: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Active" msgid "Active"
msgstr "Color de activo" msgstr "Color de activo"
#, fuzzy, kde-format #, fuzzy
msgid "Interval" msgid "Interval"
msgstr "Intervalo de tiempo" msgstr "Intervalo de tiempo"
#, fuzzy, kde-format #, fuzzy
msgid "Command" msgid "Command"
msgstr "Comentario" msgstr "Comentario"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "" msgstr ""
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "" msgstr ""
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "" msgstr ""
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Color de la swap" msgstr "Color de la swap"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "" msgstr ""
#, kde-format msgid "Filter"
msgstr ""
msgid "Null" msgid "Null"
msgstr "" msgstr ""
#, kde-format
msgid "City" msgid "City"
msgstr "" msgstr ""
#, kde-format
msgid "Country" msgid "Country"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Timestamp" msgid "Timestamp"
msgstr "Hora" msgstr "Hora"
#, kde-format msgid "Use images"
msgstr ""
msgid "Value" msgid "Value"
msgstr "Valor" msgstr "Valor"
#, kde-format
msgid "Active color" msgid "Active color"
msgstr "Color de activo" msgstr "Color de activo"
#, kde-format
msgid "Inactive color" msgid "Inactive color"
msgstr "Color de inactivo" msgstr "Color de inactivo"
#, kde-format
msgid "Type" msgid "Type"
msgstr "Tipo" msgstr "Tipo"
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "Dirección" msgstr "Dirección"
#, kde-format
msgid "Height" msgid "Height"
msgstr "Alto" msgstr "Alto"
#, kde-format
msgid "Width" msgid "Width"
msgstr "Ancho" msgstr "Ancho"
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "Escritorio activo" msgstr "Escritorio activo"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "Escritorio inactivo" msgstr "Escritorio inactivo"
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "Tipo de ventana emergente" msgstr "Tipo de ventana emergente"
#, kde-format
msgid "contours" msgid "contours"
msgstr "contornos" msgstr "contornos"
#, kde-format
msgid "windows" msgid "windows"
msgstr "ventanas" msgstr "ventanas"
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "limpiar escritorio" msgstr "limpiar escritorio"
#, kde-format
msgid "names" msgid "names"
msgstr "nombres" msgstr "nombres"
#, kde-format
msgid "none" msgid "none"
msgstr "ninguno" msgstr "ninguno"
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "Ancho de la ventana emergente" msgstr "Ancho de la ventana emergente"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "Orientación vertical" msgstr "Orientación vertical"
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "Marca" msgstr "Marca"
#, kde-format
msgid "Top Edge"
msgstr "Borde superior"
#, kde-format
msgid "Bottom Edge"
msgstr "Borde inferior"
#, kde-format
msgid "Left Edge"
msgstr "Borde izquierdo"
#, kde-format
msgid "Right Edge"
msgstr "Borde derecho"
#, kde-format
msgid "Unknown location (%1)"
msgstr "Ubicación desconocida (%1)"
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Tu nombre" msgstr "Tu nombre"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "Tu correo electrónico" msgstr "Tu correo electrónico"
#~ msgid "Top Edge"
#~ msgstr "Borde superior"
#~ msgid "Bottom Edge"
#~ msgstr "Borde inferior"
#~ msgid "Left Edge"
#~ msgstr "Borde izquierdo"
#~ msgid "Right Edge"
#~ msgstr "Borde derecho"
#~ msgid "Unknown location (%1)"
#~ msgstr "Ubicación desconocida (%1)"
#~ msgid "Exec: %1" #~ msgid "Exec: %1"
#~ msgstr "Ejecutar: %1" #~ msgstr "Ejecutar: %1"
@ -667,9 +584,6 @@ msgstr "Tu correo electrónico"
#~ msgid "Edit" #~ msgid "Edit"
#~ msgstr "Editar" #~ msgstr "Editar"
#~ msgid "Bars"
#~ msgstr "Barras"
#~ msgid "Enable popup on mouse click" #~ msgid "Enable popup on mouse click"
#~ msgstr "Habilitar ventana emergente al hacer clic" #~ msgstr "Habilitar ventana emergente al hacer clic"
@ -830,9 +744,6 @@ msgstr "Tu correo electrónico"
#~ "$uptime - tiempo de actividad del sistema\n" #~ "$uptime - tiempo de actividad del sistema\n"
#~ "$custom - formato personalizado" #~ "$custom - formato personalizado"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid "" #~ msgid ""
#~ "$cpu - total load CPU, %\n" #~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n" #~ "$cpu0 - load CPU for core 0, %\n"
@ -886,9 +797,6 @@ msgstr "Tu correo electrónico"
#~ msgid "$gputemp - physical temperature on GPU" #~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - temperatura física de la GPU" #~ msgstr "$gputemp - temperatura física de la GPU"
#~ msgid "Memory"
#~ msgstr "Memoria"
#~ msgid "" #~ msgid ""
#~ "$mem - RAM usage, %\n" #~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n" #~ "$memmb - RAM usage, MB\n"
@ -958,9 +866,6 @@ msgstr "Tu correo electrónico"
#~ "$hddtempN - temperatura física en el dispositivo N (a partir de 0). " #~ "$hddtempN - temperatura física en el dispositivo N (a partir de 0). "
#~ "Ejemplo: $hddtemp0" #~ "Ejemplo: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Red"
#~ msgid "" #~ msgid ""
#~ "$down - download speed, KB/s\n" #~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n" #~ "$up - upload speed, KB/s\n"

View File

@ -4,6 +4,9 @@ BASEDIR="../"
PROJECT="awesome-widgets" PROJECT="awesome-widgets"
BUGADDR="https://github.com/arcan1s/awesome-widgets/issues" BUGADDR="https://github.com/arcan1s/awesome-widgets/issues"
WORKDIR=$(pwd) WORKDIR=$(pwd)
# translations tags
TAGS="-ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 -kI18N_NOOP:1 \
-kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3"
find "${BASEDIR}" -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > "${WORKDIR}/rcfiles.list" find "${BASEDIR}" -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > "${WORKDIR}/rcfiles.list"
xargs --arg-file="${WORKDIR}/rcfiles.list" > "${WORKDIR}/rc.cpp" xargs --arg-file="${WORKDIR}/rcfiles.list" > "${WORKDIR}/rc.cpp"
@ -13,7 +16,7 @@ echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> "${WORKDIR}/rc.cpp"
find "${BASEDIR}" -name '*.cpp' -o -name '*.h' -o -name '*.qml' | sort > "${WORKDIR}/infiles.list" find "${BASEDIR}" -name '*.cpp' -o -name '*.h' -o -name '*.qml' | sort > "${WORKDIR}/infiles.list"
echo "rc.cpp" >> "${WORKDIR}/infiles.list" echo "rc.cpp" >> "${WORKDIR}/infiles.list"
xgettext -C --no-location --msgid-bugs-address="${BUGADDR}" \ xgettext -C --no-location --msgid-bugs-address="${BUGADDR}" ${TAGS} \
--files-from="infiles.list" -D "${BASEDIR}" -D "${WORKDIR}" -o "${PROJECT}.pot" || exit 1 --files-from="infiles.list" -D "${BASEDIR}" -D "${WORKDIR}" -o "${PROJECT}.pot" || exit 1
TRANSLATIONS=$(find . -name '*.po') TRANSLATIONS=$(find . -name '*.po')

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:16+0300\n" "PO-Revision-Date: 2015-07-31 22:16+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: French <kde-russian@lists.kde.ru>\n" "Language-Team: French <kde-russian@lists.kde.ru>\n"
@ -20,239 +20,192 @@ msgstr ""
"X-Generator: Lokalize 2.0\n" "X-Generator: Lokalize 2.0\n"
"X-Language: fr-FR\n" "X-Language: fr-FR\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "Composant" msgstr "Composant"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "Avancé" msgstr "Avancé"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "Conseil" msgstr "Conseil"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "Apparence" msgstr "Apparence"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "Moteur de données" msgstr "Moteur de données"
#, kde-format
msgid "About" msgid "About"
msgstr "À propos" msgstr "À propos"
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "À savoir" msgstr "À savoir"
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Paramètres du composant" msgstr "Paramètres du composant"
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "Largeur de l'applet" msgstr "Largeur de l'applet"
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Activer les notifications" msgstr "Activer les notifications"
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "Couper les lignes supplémentaires" msgstr "Couper les lignes supplémentaires"
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "Activer le fond" msgstr "Activer le fond"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "Format de l'heure personnalisé" msgstr "Format de l'heure personnalisé"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "Temps de fonctionnement personalisé" msgstr "Temps de fonctionnement personalisé"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "Unités de température" msgstr "Unités de température"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "Celsius" msgstr "Celsius"
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "Fahrenheit" msgstr "Fahrenheit"
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "Kelvin" msgstr "Kelvin"
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "Reaumur" msgstr "Reaumur"
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "cm^-1" msgstr "cm^-1"
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "kJ/mol" msgstr "kJ/mol"
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "kcal/mol" msgstr "kcal/mol"
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "Étiquette alimentation branchée" msgstr "Étiquette alimentation branchée"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "Étiquette alimentation débranchée" msgstr "Étiquette alimentation débranchée"
#, kde-format #, fuzzy
msgid "Check updates on startup"
msgstr "Vérifier les mises à jour"
#, fuzzy
msgid "Translate strings"
msgstr "Traductions"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "" msgstr ""
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "Intervalle" msgstr "Intervalle"
#, kde-format
msgid "Font" msgid "Font"
msgstr "Police" msgstr "Police"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "Taille de la police" msgstr "Taille de la police"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "Épaisseur de la police" msgstr "Épaisseur de la police"
#, kde-format
msgid "light" msgid "light"
msgstr "léger" msgstr "léger"
#, kde-format
msgid "normal" msgid "normal"
msgstr "normal" msgstr "normal"
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "mi-gras" msgstr "mi-gras"
#, kde-format
msgid "bold" msgid "bold"
msgstr "gras" msgstr "gras"
#, kde-format
msgid "black" msgid "black"
msgstr "noir" msgstr "noir"
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "Style de la police" msgstr "Style de la police"
#, kde-format
msgid "italic" msgid "italic"
msgstr "italique" msgstr "italique"
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "Couleur de la police" msgstr "Couleur de la police"
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "Sélectionner une couleur" msgstr "Sélectionner une couleur"
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "Sélectionner une police" msgstr "Sélectionner une police"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "chemin ACPI" msgstr "chemin ACPI"
#, kde-format
msgid "Custom scripts"
msgstr "Scripts personnalisés"
#, kde-format
msgid "Edit scripts"
msgstr "Modifier les scripts"
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "Périphérique graphique" msgstr "Périphérique graphique"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "Disque dur" msgstr "Disque dur"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Cmd de température disques" msgstr "Cmd de température disques"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "Adresse MPD" msgstr "Adresse MPD"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "Port MPD" msgstr "Port MPD"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "Nom du lecteur MPRIS" msgstr "Nom du lecteur MPRIS"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "Lecteur audio" msgstr "Lecteur audio"
#, kde-format msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr "Scripts personnalisés"
msgid "Edit scripts"
msgstr "Modifier les scripts"
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "Moniteur de citations" msgstr "Moniteur de citations"
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "Modifier les tickers" msgstr "Modifier les tickers"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "Gestionnaire de paquets" msgstr "Gestionnaire de paquets"
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "Modifier la commande" msgstr "Modifier la commande"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Edit weather" msgid "Edit weather"
msgstr "Modifier les tickers" msgstr "Modifier les tickers"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "Demander une clé" msgstr "Demander une clé"
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "Voir le README" msgstr "Voir le README"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "Vérifier les mises à jour" msgstr "Vérifier les mises à jour"
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -261,47 +214,36 @@ msgstr ""
"conseils visuels. Pour les activer cochez simplement les cases " "conseils visuels. Pour les activer cochez simplement les cases "
"correspondantes." "correspondantes."
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Nombre d'éléments pour les conseils" msgstr "Nombre d'éléments pour les conseils"
#, kde-format
msgid "Background" msgid "Background"
msgstr "Fond" msgstr "Fond"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "Couleur processeur" msgstr "Couleur processeur"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Couleur de l'horloge processeur" msgstr "Couleur de l'horloge processeur"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "Couleur de la mémoire" msgstr "Couleur de la mémoire"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "Couleur de la mémoire d'échange" msgstr "Couleur de la mémoire d'échange"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "Couleur de la vitesse de téléchargement" msgstr "Couleur de la vitesse de téléchargement"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Couleur du téléversement" msgstr "Couleur du téléversement"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "Couleur active batterie" msgstr "Couleur active batterie"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Couleur batterie inactive" msgstr "Couleur batterie inactive"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -309,183 +251,189 @@ msgstr ""
"D'avantage d'informations se trouvent sur <a href=\"http://arcanis.name/" "D'avantage d'informations se trouvent sur <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">la page du projet</a>" "projects/awesome-widgets/\">la page du projet</a>"
#, kde-format msgid "AC"
msgstr ""
msgid "Bars"
msgstr ""
msgid "CPU"
msgstr "CPU"
msgid "Desktops"
msgstr ""
msgid "Memory"
msgstr "Mémoire"
msgid "Network"
msgstr "Réseau"
#, fuzzy
msgid "Scripts"
msgstr "Modifier les scripts"
#, fuzzy
msgid "Time"
msgstr "Durée"
#, fuzzy
msgid "Quotes"
msgstr "Moniteur de citations"
msgid "Upgrades"
msgstr ""
#, fuzzy
msgid "Weathers"
msgstr "Modifier les tickers"
msgid "Add" msgid "Add"
msgstr "Ajouter" msgstr "Ajouter"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "Afficher la valeur" msgstr "Afficher la valeur"
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "Etiquette: %1" msgstr "Etiquette: %1"
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "Valeur: %1" msgstr "Valeur: %1"
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "Info: %1" msgstr "Info: %1"
#, kde-format msgid "Add lambda"
msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Modifier les barres" msgstr "Modifier les barres"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "Éxecuter %1" msgstr "Éxecuter %1"
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "Version %1 (build date %2)" msgstr "Version %1 (build date %2)"
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "Un jeu de composants plasmoïds minimalistes" msgstr "Un jeu de composants plasmoïds minimalistes"
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "Liens:" msgstr "Liens:"
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "Page d'accueil" msgstr "Page d'accueil"
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "Dépôt" msgstr "Dépôt"
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Suivi des bugs" msgstr "Suivi des bugs"
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "Traductions" msgstr "Traductions"
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "Paquets depuis AUR" msgstr "Paquets depuis AUR"
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "Paquets openSUSE" msgstr "Paquets openSUSE"
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "Ce programme est publié sous la licence %1" msgstr "Ce programme est publié sous la licence %1"
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Traducteurs: %1" msgstr "Traducteurs: %1"
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "Ce logiciel utilise: %1" msgstr "Ce logiciel utilise: %1"
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "Sélectionner une couleur" msgstr "Sélectionner une couleur"
#, fuzzy, kde-format #, fuzzy
msgid "Current version : %1" msgid "Current version : %1"
msgstr "Version actuelle" msgstr "Version actuelle"
#, fuzzy, kde-format #, fuzzy
msgid "New version : %1" msgid "New version : %1"
msgstr "Nouvelle version" msgstr "Nouvelle version"
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "Cliquer sur \"Valider\" pour télécharger" msgstr "Cliquer sur \"Valider\" pour télécharger"
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "Des mises à jour sont disponibles" msgstr "Des mises à jour sont disponibles"
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "Alimentation branchée" msgstr "Alimentation branchée"
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "Alimentation débranchée" msgstr "Alimentation débranchée"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "Haute charge CPU" msgstr "Haute charge CPU"
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "Haute charge GPU" msgstr "Haute charge GPU"
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "Espace libre sur %1 inférieur à 10%" msgstr "Espace libre sur %1 inférieur à 10%"
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "Haute utilisation mémoire" msgstr "Haute utilisation mémoire"
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "L'interface réseau à été changée en %1" msgstr "L'interface réseau à été changée en %1"
#, kde-format msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used" msgid "Swap is used"
msgstr "Fichier d'échange utilisé" msgstr "Fichier d'échange utilisé"
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "Sélectionner l'étiquette" msgstr "Sélectionner l'étiquette"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "Étiquette" msgstr "Étiquette"
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "Copier" msgstr "Copier"
#, kde-format
msgid "Create" msgid "Create"
msgstr "Créer" msgstr "Créer"
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "Supprimer" msgstr "Supprimer"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "Entrer le nom du fichier" msgstr "Entrer le nom du fichier"
#, kde-format
msgid "File name" msgid "File name"
msgstr "Nom du fichier" msgstr "Nom du fichier"
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "Nom: %1" msgstr "Nom: %1"
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Commentaire: %1" msgstr "Commentaire: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Commentaire: %1" msgstr "Commentaire: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Name" msgid "Name"
msgstr "Nom: %1" msgstr "Nom: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Comment" msgid "Comment"
msgstr "Commentaire: %1" msgstr "Commentaire: %1"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -493,164 +441,141 @@ msgid ""
"span></a></p></body></html>" "span></a></p></body></html>"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Ticker" msgid "Ticker"
msgstr "Ticker: %1" msgstr "Ticker: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Active" msgid "Active"
msgstr "Batterie" msgstr "Batterie"
#, fuzzy, kde-format #, fuzzy
msgid "Interval" msgid "Interval"
msgstr "Intervalle" msgstr "Intervalle"
#, fuzzy, kde-format #, fuzzy
msgid "Command" msgid "Command"
msgstr "Commande personnalisée" msgstr "Commande personnalisée"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "" msgstr ""
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "" msgstr ""
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "" msgstr ""
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Couleur de la mémoire d'échange" msgstr "Couleur de la mémoire d'échange"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "" msgstr ""
#, kde-format msgid "Filter"
msgstr ""
msgid "Null" msgid "Null"
msgstr "" msgstr ""
#, kde-format
msgid "City" msgid "City"
msgstr "" msgstr ""
#, kde-format
msgid "Country" msgid "Country"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Timestamp" msgid "Timestamp"
msgstr "Durée" msgstr "Durée"
#, fuzzy, kde-format msgid "Use images"
msgstr ""
#, fuzzy
msgid "Value" msgid "Value"
msgstr "Valeur: %1" msgstr "Valeur: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Active color" msgid "Active color"
msgstr "Batterie" msgstr "Batterie"
#, fuzzy, kde-format #, fuzzy
msgid "Inactive color" msgid "Inactive color"
msgstr "Batterie" msgstr "Batterie"
#, kde-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Height" msgid "Height"
msgstr "léger" msgstr "léger"
#, kde-format
msgid "Width" msgid "Width"
msgstr "" msgstr ""
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "Bureau actif" msgstr "Bureau actif"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "Bureau inactif" msgstr "Bureau inactif"
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "Type d'infobulle" msgstr "Type d'infobulle"
#, kde-format
msgid "contours" msgid "contours"
msgstr "contours" msgstr "contours"
#, kde-format
msgid "windows" msgid "windows"
msgstr "fenêtres" msgstr "fenêtres"
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "nettoyer le bureau" msgstr "nettoyer le bureau"
#, kde-format
msgid "names" msgid "names"
msgstr "noms" msgstr "noms"
#, kde-format
msgid "none" msgid "none"
msgstr "Aucun" msgstr "Aucun"
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "Largeur de l'infobulle" msgstr "Largeur de l'infobulle"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "Positionnement vertical" msgstr "Positionnement vertical"
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "Marquer" msgstr "Marquer"
#, kde-format
msgid "Top Edge"
msgstr "Bord du haut"
#, kde-format
msgid "Bottom Edge"
msgstr "Bord du bas"
#, kde-format
msgid "Left Edge"
msgstr "Bord gauche"
#, kde-format
msgid "Right Edge"
msgstr "Bord droit"
#, kde-format
msgid "Unknown location (%1)"
msgstr "Position inconnue (%1)"
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev MerMouY" msgstr "Evgeniy Alekseev MerMouY"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com mermouy@gmail.com" msgstr "esalexeev@gmail.com mermouy@gmail.com"
#~ msgid "Top Edge"
#~ msgstr "Bord du haut"
#~ msgid "Bottom Edge"
#~ msgstr "Bord du bas"
#~ msgid "Left Edge"
#~ msgstr "Bord gauche"
#~ msgid "Right Edge"
#~ msgstr "Bord droit"
#~ msgid "Unknown location (%1)"
#~ msgstr "Position inconnue (%1)"
#~ msgid "Exec: %1" #~ msgid "Exec: %1"
#~ msgstr "Exec: %1" #~ msgstr "Exec: %1"
@ -823,9 +748,6 @@ msgstr "esalexeev@gmail.com mermouy@gmail.com"
#~ "$uptime - temps de fonctionnement\n" #~ "$uptime - temps de fonctionnement\n"
#~ "$custom - format personnalisé" #~ "$custom - format personnalisé"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid "" #~ msgid ""
#~ "$cpu - total load CPU, %\n" #~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n" #~ "$cpu0 - load CPU for core 0, %\n"
@ -875,9 +797,6 @@ msgstr "esalexeev@gmail.com mermouy@gmail.com"
#~ msgid "$gputemp - physical temperature on GPU" #~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - Température physique du processeur graphique" #~ msgstr "$gputemp - Température physique du processeur graphique"
#~ msgid "Memory"
#~ msgstr "Mémoire"
#~ msgid "" #~ msgid ""
#~ "$mem - RAM usage, %\n" #~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n" #~ "$memmb - RAM usage, MB\n"
@ -945,9 +864,6 @@ msgstr "esalexeev@gmail.com mermouy@gmail.com"
#~ "$hddtempN - température physique du périphérique N (à partir de 0). " #~ "$hddtempN - température physique du périphérique N (à partir de 0). "
#~ "Exemple: $hddtemp0" #~ "Exemple: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Réseau"
#~ msgid "" #~ msgid ""
#~ "$down - download speed, KB/s\n" #~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n" #~ "$up - upload speed, KB/s\n"

694
sources/translations/nl.po Normal file
View File

@ -0,0 +1,694 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Heimen Stoffels <vistausss@outlook.com>, 2015.
# Evgeniy Alekseev <esalexeev@gmail.com>, 2015.
msgid ""
msgstr ""
"Project-Id-Version: Awesome widgets\n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-08-20 22:52+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Dutch <kde-i18n-nl@kde.org>\n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"widgets/language/nl_NL/)\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n"
msgid "Widget"
msgstr "Widget"
msgid "Advanced"
msgstr "Geavanceerd"
msgid "Tooltip"
msgstr "Opmerkingsballon"
msgid "Appearance"
msgstr "Uiterlijk"
msgid "DataEngine"
msgstr "DataEngine"
msgid "About"
msgstr "Over"
msgid "Acknowledgment"
msgstr "Erkenning"
msgid "Widget height, px"
msgstr ""
msgid "Widget width, px"
msgstr ""
msgid "Enable notifications"
msgstr ""
msgid "Wrap new lines"
msgstr ""
msgid "Enable background"
msgstr "Achtergrond inschakelen"
msgid "Custom time format"
msgstr "Aangepaste tijdsopmaak"
msgid "Custom uptime format"
msgstr "Aangepast uptime-opmaak"
msgid "Temperature units"
msgstr "Temperatuureenheden"
msgid "Celsius"
msgstr "Celsius"
msgid "Fahrenheit"
msgstr "Fahrenheit"
msgid "Kelvin"
msgstr "Kelvin"
msgid "Reaumur"
msgstr "Reaumur"
msgid "cm^-1"
msgstr "cm^-1"
msgid "kJ/mol"
msgstr "kJ/mol"
msgid "kcal/mol"
msgstr "kcal/mol"
msgid "AC online tag"
msgstr "AC online-sleutelwoord"
msgid "AC offline tag"
msgstr "AC offline-sleutelwoord"
#, fuzzy
msgid "Check updates on startup"
msgstr "Controleren op updates"
#, fuzzy
msgid "Translate strings"
msgstr "Probleem met de vertaling"
msgid "Drop key cache"
msgstr ""
msgid "Time interval"
msgstr "Tijdstussenpose"
msgid "Font"
msgstr "Lettertype"
msgid "Font size"
msgstr "Lettertypegrootte"
msgid "Font weight"
msgstr "Lettertypeopmaak"
msgid "light"
msgstr "licht"
msgid "normal"
msgstr "normaal"
msgid "demi bold"
msgstr "semi-donker"
msgid "bold"
msgstr "donker"
msgid "black"
msgstr "zwart"
msgid "Font style"
msgstr "Lettertypestijl"
msgid "italic"
msgstr "Cursief"
msgid "Font color"
msgstr "Lettertypekleur"
msgid "Select a color"
msgstr "Selecteer een kleur"
msgid "Select a font"
msgstr "Selecteer een lettertype"
msgid "ACPI path"
msgstr "ACPI-pad"
msgid "GPU device"
msgstr "GPU-apparaat"
msgid "HDD"
msgstr "HDD"
msgid "hddtemp cmd"
msgstr "hddtemp cmd"
msgid "MPD address"
msgstr "MPD-adres"
msgid "MPD port"
msgstr "MPD-poort"
msgid "MPRIS player name"
msgstr "MPRIS-mediaspelernaam"
msgid "Music player"
msgstr "Muziekspeler"
msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr "Aangepaste scripts"
msgid "Edit scripts"
msgstr "Scripts bewerken"
msgid "Quotes monitor"
msgstr ""
#, fuzzy
msgid "Edit tickers"
msgstr "Balken bewerken"
msgid "Package manager"
msgstr "Pakketbeheerder"
msgid "Edit command"
msgstr "Commando bewerken"
msgid "Weather"
msgstr ""
#, fuzzy
msgid "Edit weather"
msgstr "Balken bewerken"
msgid "Request key"
msgstr "Sleutel aanvragen"
msgid "Show README"
msgstr "README weergeven"
msgid "Check updates"
msgstr "Controleren op updates"
msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked."
msgstr ""
"CPU, CPU-klok, geheugen, swap en netwerklabels-ondersteuning in een "
"grafische opmerkingsballon. Vink ze aan om ze in te schakelen."
msgid "Number of values for tooltips"
msgstr "Aantal waarden voor de opmerkingsballonnen"
msgid "Background"
msgstr "Achtergrond"
msgid "CPU color"
msgstr "CPU-kleur"
msgid "CPU clock color"
msgstr "CPU-klokkleur"
msgid "Memory color"
msgstr "Geheugenkleur"
msgid "Swap color"
msgstr "Swap-kleur"
msgid "Download speed color"
msgstr "Kleur van downloadsnelheid"
msgid "Upload speed color"
msgstr "Kleur van uploadsnelheid"
msgid "Battery active color"
msgstr "Kleur van actieve accu"
msgid "Battery inactive color"
msgstr "Kleur van inactieve accu"
msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>"
msgstr ""
"Gedetailleerde informatie kan worden gevonden op de <a href=\"http://arcanis."
"name/projects/awesome-widgets/\">projectwebsite</a>"
msgid "AC"
msgstr ""
msgid "Bars"
msgstr "Balken"
msgid "CPU"
msgstr ""
msgid "Desktops"
msgstr ""
#, fuzzy
msgid "Memory"
msgstr "Geheugenkleur"
msgid "Network"
msgstr ""
#, fuzzy
msgid "Scripts"
msgstr "Scripts bewerken"
msgid "Time"
msgstr ""
msgid "Quotes"
msgstr ""
msgid "Upgrades"
msgstr ""
#, fuzzy
msgid "Weathers"
msgstr "Balken bewerken"
msgid "Add"
msgstr "Toevoegen"
msgid "Show value"
msgstr "Waarde weergeven"
msgid "Tag: %1"
msgstr "Sleutelwoord: %1"
msgid "Value: %1"
msgstr "Waarde: %1"
msgid "Info: %1"
msgstr "Informatie: %1"
msgid "Add lambda"
msgstr ""
msgid "Edit bars"
msgstr "Balken bewerken"
msgid "Run %1"
msgstr "%1 uitvoeren"
#, fuzzy
msgid "Version %1 (build date %2)"
msgstr ""
"Versie %1\n"
"(bouwdatum %2)"
msgid "A set of minimalistic plasmoid widgets"
msgstr "Een set van minimalistische plasmoid-widgets"
msgid "Links:"
msgstr "Links:"
msgid "Homepage"
msgstr "Website"
msgid "Repository"
msgstr "Pakketbron"
msgid "Bugtracker"
msgstr "Bugtracker"
msgid "Translation issue"
msgstr "Probleem met de vertaling"
msgid "AUR packages"
msgstr "AUR-pakketten"
msgid "openSUSE packages"
msgstr "openSUSE-pakketten"
msgid "This software is licensed under %1"
msgstr "Deze software is gelicenseerd onder %1"
msgid "Translators: %1"
msgstr "Vertalers: %1"
msgid "This software uses: %1"
msgstr "Deze software gebruikt: %1"
msgid "Select font"
msgstr "Lettertype selecteren"
msgid "Current version : %1"
msgstr "Huidige versie: %1"
msgid "New version : %1"
msgstr "Nieuwe versie: %1"
msgid "Click \"Ok\" to download"
msgstr "Klik op \"OK\" om te downloaden"
msgid "There are updates"
msgstr "Er zijn updates"
msgid "AC online"
msgstr "AC online"
msgid "AC offline"
msgstr "AC offline"
msgid "High CPU load"
msgstr "Hoog CPU-verbruik"
#, fuzzy
msgid "High GPU load"
msgstr "Hoog CPU-verbruik"
msgid "Free space on %1 less than 10%"
msgstr "De vrije ruimte op %1 is minder dan 10%"
msgid "High memory usage"
msgstr "Hoog geheugenverbruik"
msgid "Network device has been changed to %1"
msgstr "Het netwerkapparaat is gewijzigd naar %1"
msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used"
msgstr "Swap wordt gebruikt"
msgid "Select tag"
msgstr "Sleutelwoord selecteren"
msgid "Tag"
msgstr "Sleutelwoord"
msgid "Copy"
msgstr "Kopiëren"
msgid "Create"
msgstr "Creëren"
msgid "Remove"
msgstr "Verwijderen"
msgid "Enter file name"
msgstr "Vul bestandsnaam i"
msgid "File name"
msgstr "Bestandsnaam"
msgid "Name: %1"
msgstr "Naam: %1"
msgid "Comment: %1"
msgstr "Commentaar: %1"
#, fuzzy
msgid "Identity: %1"
msgstr "Commentaar: %1"
msgid "Name"
msgstr "Naam"
msgid "Comment"
msgstr "Commentaar"
msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
"text-decoration: underline; color:#0057ae;\">http://finance.yahoo.com/</"
"span></a></p></body></html>"
msgstr ""
msgid "Ticker"
msgstr ""
#, fuzzy
msgid "Active"
msgstr "Actieve kleur"
#, fuzzy
msgid "Interval"
msgstr "Tijdstussenpose"
#, fuzzy
msgid "Command"
msgstr "Commentaar"
msgid "Prefix"
msgstr ""
msgid "Has output"
msgstr ""
msgid "Redirect"
msgstr ""
msgid "Additional filters"
msgstr ""
#, fuzzy
msgid "Wrap colors"
msgstr "Swap-kleur"
msgid "Wrap spaces"
msgstr ""
msgid "Filter"
msgstr ""
msgid "Null"
msgstr ""
msgid "City"
msgstr ""
msgid "Country"
msgstr ""
msgid "Timestamp"
msgstr ""
msgid "Use images"
msgstr ""
msgid "Value"
msgstr "Waarde"
msgid "Active color"
msgstr "Actieve kleur"
msgid "Inactive color"
msgstr "Inactieve kleur"
msgid "Type"
msgstr "Type"
msgid "Direction"
msgstr "Richting"
msgid "Height"
msgstr "Hoogte"
msgid "Width"
msgstr "Breedte"
#, fuzzy
msgid "Active desktop"
msgstr "Actieve kleur"
#, fuzzy
msgid "Inactive desktop"
msgstr "Inactieve kleur"
#, fuzzy
msgid "Tooltip type"
msgstr "Opmerkingsballon"
msgid "contours"
msgstr "contouren"
msgid "windows"
msgstr "vensters"
msgid "clean desktop"
msgstr "opgeruimd bureaublad"
msgid "names"
msgstr "namen"
msgid "none"
msgstr "geen"
msgid "Tooltip width"
msgstr "Opmerkingsballonbreedte"
msgid "Vertical layout"
msgstr "Verticale layout"
msgid "Mark"
msgstr "Markeren"
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Heimen Stoffels"
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "vistausss@outlook.com"
#~ msgid "Top Edge"
#~ msgstr "Bovenrand"
#~ msgid "Bottom Edge"
#~ msgstr "Onderrand"
#~ msgid "Left Edge"
#~ msgstr "Linkerrand"
#~ msgid "Right Edge"
#~ msgstr "Linkerrand"
#~ msgid "Unknown location (%1)"
#~ msgstr "Onbekende positie (%1)"
#~ msgid "Run ksysguard"
#~ msgstr "ksysguard openen"
#~ msgid "Update text"
#~ msgstr "Tekst bijwerken"
#~ msgid "Check for updates"
#~ msgstr "Controleren op updates"
#~ msgid "Exec: %1"
#~ msgstr "Uitvoeren: %1"
#~ msgid "Edit"
#~ msgstr "Bewerken"
#~ msgid "Select color"
#~ msgstr "Kleur selecteren"
#~ msgid "Enable popup on mouse click"
#~ msgstr "Pop-up bij muisklik inschakelen"
#~ msgid ""
#~ "$dddd - long weekday\n"
#~ "$ddd - short weekday\n"
#~ "$dd - day\n"
#~ "$d - day w\\o zero\n"
#~ "$MMMM - long month\n"
#~ "$MMM - short month\n"
#~ "$MM - month\n"
#~ "$M - month w\\o zero\n"
#~ "$yyyy - year\n"
#~ "$yy - short year\n"
#~ "$hh - hours (24 only)\n"
#~ "$h - hours w\\o zero (24 only)\n"
#~ "$mm - minutes\n"
#~ "$m - minutes w\\o zero\n"
#~ "$ss - seconds\n"
#~ "$s - seconds w\\o zero"
#~ msgstr ""
#~ "$dddd - weekdag (lang)\n"
#~ "$ddd - weekdag (kort)\n"
#~ "$dd - dag\n"
#~ "$d - dag zonder nul\n"
#~ "$MMMM - maand (lang)\n"
#~ "$MMM - maand (kort)\n"
#~ "$MM - maand\n"
#~ "$M - month zonder nul\n"
#~ "$yyyy - jaar\n"
#~ "$yy - jaar (kort)\n"
#~ "$hh - uren (alleen 24)\n"
#~ "$h - uren zonder nul (alleen 24)\n"
#~ "$mm - minuten\n"
#~ "$m - minuten zonder nul\n"
#~ "$ss - seconden\n"
#~ "$s - seconden zonder nul"
#~ msgid ""
#~ "$dd - uptime days\n"
#~ "$d - uptime days without zero\n"
#~ "$hh - uptime hours\n"
#~ "$h - uptime hours without zero\n"
#~ "$mm - uptime minutes\n"
#~ "$m - uptime minutes without zero"
#~ msgstr ""
#~ "$dd - uptime-dagen\n"
#~ "$d - uptime-dagen zonder nul\n"
#~ "$hh - uptime-uren\n"
#~ "$h - uptime-uren zonder nul\n"
#~ "$mm - uptime-minuten\n"
#~ "$m - uptime minuten zonder nul"
#~ msgid "Temperature devices"
#~ msgstr "Temperatuurapparaten"
#~ msgid "Editable"
#~ msgstr "Bewerkbaar"
#~ msgid "Fan devices"
#~ msgstr "Koelingsapparaten"
#~ msgid "Mount points"
#~ msgstr "Aankoppelpunten"
#~ msgid "HDD devices (speed)"
#~ msgstr "HDD-apparaten (snelheid)"
#~ msgid "HDD devices (temp)"
#~ msgstr "HDD-apparaten (temp)"
#~ msgid "Disable auto select device and set specified device"
#~ msgstr ""
#~ "Apparaat automatisch selecteren uitschakelen en specifiek apparaat "
#~ "instellen"
#~ msgid "Set network device"
#~ msgstr "Netwerkapparaat instellen"
#~ msgid "Line, which returns when AC is online"
#~ msgstr "Lijn. welke terugkeert wanneer AC online is"
#~ msgid "Line, which returns when AC is offline"
#~ msgstr "Lijn, welke terugkeert wanneer AC offline is"
#~ msgid "\"/sys/class/power_supply/\" by default"
#~ msgstr "\"/sys/class/power_supply/\" standaard"
#~ msgid "<b>NOTE:</b> Player DBus interface should be an active"
#~ msgstr "<b>LET OP:</b> De DBus-interface van de speler moet actief zijn"
#~ msgid "Configuration"
#~ msgstr "Configuratie"
#~ msgid "Ctrl+B"
#~ msgstr "Ctrl+B"
#~ msgid "Ctrl+I"
#~ msgstr "Ctrl+I"
#~ msgid "Ctrl+U"
#~ msgstr "Ctrl+U"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:21+0300\n" "PO-Revision-Date: 2015-07-31 22:21+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
@ -19,239 +19,192 @@ msgstr ""
"X-Language: pt_BR\n" "X-Language: pt_BR\n"
"X-Source-Language: en\n" "X-Source-Language: en\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "Widget" msgstr "Widget"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "Avançado" msgstr "Avançado"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "Dica de contexto" msgstr "Dica de contexto"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "Aparência" msgstr "Aparência"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "Engine de dados" msgstr "Engine de dados"
#, kde-format
msgid "About" msgid "About"
msgstr "Sobre" msgstr "Sobre"
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "Confirmação" msgstr "Confirmação"
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Altura do widget, px" msgstr "Altura do widget, px"
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "Largura do widget, px" msgstr "Largura do widget, px"
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Ativar notificações" msgstr "Ativar notificações"
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "Cobrir novas linhas" msgstr "Cobrir novas linhas"
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "Ativar plano de fundo" msgstr "Ativar plano de fundo"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "Formato de hora personalizado" msgstr "Formato de hora personalizado"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "Tempo em atividade com formato personalizado" msgstr "Tempo em atividade com formato personalizado"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "Unidades de temperatura" msgstr "Unidades de temperatura"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "Celsius" msgstr "Celsius"
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "Fahrenheit" msgstr "Fahrenheit"
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "Kelvin" msgstr "Kelvin"
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "Reaumur" msgstr "Reaumur"
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "cm^-1" msgstr "cm^-1"
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "KJ/mol" msgstr "KJ/mol"
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "kcal/mol" msgstr "kcal/mol"
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "Rótulo com carregador conectado" msgstr "Rótulo com carregador conectado"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "Rótulo com carregador desconectado" msgstr "Rótulo com carregador desconectado"
#, kde-format #, fuzzy
msgid "Check updates on startup"
msgstr "Checar por atualizações"
#, fuzzy
msgid "Translate strings"
msgstr "Problema na tradução"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "" msgstr ""
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "Intervalo de tempo" msgstr "Intervalo de tempo"
#, kde-format
msgid "Font" msgid "Font"
msgstr "Tamanho da fonte" msgstr "Tamanho da fonte"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "Tamanho da fonte" msgstr "Tamanho da fonte"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "Grossura da fonte" msgstr "Grossura da fonte"
#, kde-format
msgid "light" msgid "light"
msgstr "leve" msgstr "leve"
#, kde-format
msgid "normal" msgid "normal"
msgstr "normal" msgstr "normal"
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "demi negrito" msgstr "demi negrito"
#, kde-format
msgid "bold" msgid "bold"
msgstr "negrito" msgstr "negrito"
#, kde-format
msgid "black" msgid "black"
msgstr "preto" msgstr "preto"
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "Estilo da fonte" msgstr "Estilo da fonte"
#, kde-format
msgid "italic" msgid "italic"
msgstr "itálico" msgstr "itálico"
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "Cor da fonte" msgstr "Cor da fonte"
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "Selecionar uma cor" msgstr "Selecionar uma cor"
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "Selecionar uma fonte" msgstr "Selecionar uma fonte"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "Caminho ACPI" msgstr "Caminho ACPI"
#, kde-format
msgid "Custom scripts"
msgstr "Scripts customizados"
#, kde-format
msgid "Edit scripts"
msgstr "Editar scripts"
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "Dispositivo GPU" msgstr "Dispositivo GPU"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "HDD" msgstr "HDD"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "comando hddtemp" msgstr "comando hddtemp"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "Endereço do MPD" msgstr "Endereço do MPD"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "Porta do MPD" msgstr "Porta do MPD"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "Nome do player MPRIS" msgstr "Nome do player MPRIS"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "Reprodutor de áudio" msgstr "Reprodutor de áudio"
#, kde-format msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr "Scripts customizados"
msgid "Edit scripts"
msgstr "Editar scripts"
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "Monitor de citações" msgstr "Monitor de citações"
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "Editar relógios" msgstr "Editar relógios"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "Gerenciador de pacotes" msgstr "Gerenciador de pacotes"
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "Editar comandos" msgstr "Editar comandos"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Edit weather" msgid "Edit weather"
msgstr "Editar relógios" msgstr "Editar relógios"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "Solicitar chave" msgstr "Solicitar chave"
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "Mostrar README" msgstr "Mostrar README"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "Checar por atualizações" msgstr "Checar por atualizações"
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -259,47 +212,36 @@ msgstr ""
"Os rótulos de CPU, frequência de GPU, memória, swap e rede suportam dica de " "Os rótulos de CPU, frequência de GPU, memória, swap e rede suportam dica de "
"contexto gráfica. Para ativá-los, basta selecionar a caixa necessária." "contexto gráfica. Para ativá-los, basta selecionar a caixa necessária."
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Número de valores para dicas de contexto" msgstr "Número de valores para dicas de contexto"
#, kde-format
msgid "Background" msgid "Background"
msgstr "Plano de fundo" msgstr "Plano de fundo"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "Cor da CPU" msgstr "Cor da CPU"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Cor do relógio da CPU" msgstr "Cor do relógio da CPU"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "Cor da memória" msgstr "Cor da memória"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "Cor da swap" msgstr "Cor da swap"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "Cor da velocidade de download" msgstr "Cor da velocidade de download"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Cor da velocidade de upload" msgstr "Cor da velocidade de upload"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "Cor da bateria ativa" msgstr "Cor da bateria ativa"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Cor da bateria inativa" msgstr "Cor da bateria inativa"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -307,183 +249,184 @@ msgstr ""
"Informações detalhadas podem ser encontradas na <a href=\"http://arcanis." "Informações detalhadas podem ser encontradas na <a href=\"http://arcanis."
"name/projects/awesome-widgets/\">página do projeto</a>" "name/projects/awesome-widgets/\">página do projeto</a>"
#, kde-format msgid "AC"
msgstr ""
msgid "Bars"
msgstr "Barras"
msgid "CPU"
msgstr "CPU"
msgid "Desktops"
msgstr ""
msgid "Memory"
msgstr "Memória"
msgid "Network"
msgstr "Rede"
#, fuzzy
msgid "Scripts"
msgstr "Editar scripts"
#, fuzzy
msgid "Time"
msgstr "Hora"
#, fuzzy
msgid "Quotes"
msgstr "Monitor de citações"
msgid "Upgrades"
msgstr ""
#, fuzzy
msgid "Weathers"
msgstr "Editar relógios"
msgid "Add" msgid "Add"
msgstr "Adicionar" msgstr "Adicionar"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "Mostrar valor" msgstr "Mostrar valor"
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "Tag: %1" msgstr "Tag: %1"
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "Valor: %1" msgstr "Valor: %1"
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "Info: %1" msgstr "Info: %1"
#, kde-format msgid "Add lambda"
msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Editar barras" msgstr "Editar barras"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "Rodar %1" msgstr "Rodar %1"
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "Versão: %1 (data de compilação %2)" msgstr "Versão: %1 (data de compilação %2)"
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "Um conjunto de widgets plasmoid minimalistas." msgstr "Um conjunto de widgets plasmoid minimalistas."
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "Links:" msgstr "Links:"
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "Homepage" msgstr "Homepage"
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "Repositório" msgstr "Repositório"
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Bugtracker" msgstr "Bugtracker"
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "Problema na tradução" msgstr "Problema na tradução"
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "Pacotes AUR" msgstr "Pacotes AUR"
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "Pacotes openSUSE" msgstr "Pacotes openSUSE"
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "Este software é licenciado sob %1" msgstr "Este software é licenciado sob %1"
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Tradutores: %1" msgstr "Tradutores: %1"
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "Este software usa: %1" msgstr "Este software usa: %1"
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "Selecionar fonte" msgstr "Selecionar fonte"
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "Versão atual: %1" msgstr "Versão atual: %1"
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "Nova versão: %1" msgstr "Nova versão: %1"
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "Clique \"Ok\" para baixar" msgstr "Clique \"Ok\" para baixar"
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "Há atualizações disponíveis" msgstr "Há atualizações disponíveis"
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "Carregador conectado" msgstr "Carregador conectado"
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "Carregador desconectado" msgstr "Carregador desconectado"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "Alta carga da CPU" msgstr "Alta carga da CPU"
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "Alta carga da GPU" msgstr "Alta carga da GPU"
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "O espaço livre em %1 é menor que 10%" msgstr "O espaço livre em %1 é menor que 10%"
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "Alto uso de memória" msgstr "Alto uso de memória"
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "O dispositivo de rede mudou para %1" msgstr "O dispositivo de rede mudou para %1"
#, kde-format msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used" msgid "Swap is used"
msgstr "Swap está sendo usado" msgstr "Swap está sendo usado"
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "Selecionar tag" msgstr "Selecionar tag"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "Tag" msgstr "Tag"
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "Copiar" msgstr "Copiar"
#, kde-format
msgid "Create" msgid "Create"
msgstr "Criar" msgstr "Criar"
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "Remover" msgstr "Remover"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "Digite o nome de arquivo" msgstr "Digite o nome de arquivo"
#, kde-format
msgid "File name" msgid "File name"
msgstr "Nome de arquivo" msgstr "Nome de arquivo"
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "Nome: %1" msgstr "Nome: %1"
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Comentário: %1" msgstr "Comentário: %1"
#, kde-format
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Comentário: %1" msgstr "Comentário: %1"
#, kde-format
msgid "Name" msgid "Name"
msgstr "NOme" msgstr "NOme"
#, kde-format
msgid "Comment" msgid "Comment"
msgstr "Comentário" msgstr "Comentário"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -491,164 +434,132 @@ msgid ""
"span></a></p></body></html>" "span></a></p></body></html>"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Ticker" msgid "Ticker"
msgstr "Relógio: %1" msgstr "Relógio: %1"
#, kde-format
msgid "Active" msgid "Active"
msgstr "Cor ativa" msgstr "Cor ativa"
#, kde-format
msgid "Interval" msgid "Interval"
msgstr "Intervalo de tempo" msgstr "Intervalo de tempo"
#, kde-format
msgid "Command" msgid "Command"
msgstr "Comentário" msgstr "Comentário"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "" msgstr ""
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "" msgstr ""
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "" msgstr ""
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "" msgstr ""
#, kde-format
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Cor da swap" msgstr "Cor da swap"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "" msgstr ""
#, kde-format msgid "Filter"
msgstr ""
msgid "Null" msgid "Null"
msgstr "" msgstr ""
#, kde-format
msgid "City" msgid "City"
msgstr "" msgstr ""
#, kde-format
msgid "Country" msgid "Country"
msgstr "" msgstr ""
#, kde-format
msgid "Timestamp" msgid "Timestamp"
msgstr "Hora" msgstr "Hora"
#, kde-format msgid "Use images"
msgstr ""
msgid "Value" msgid "Value"
msgstr "Valor" msgstr "Valor"
#, kde-format
msgid "Active color" msgid "Active color"
msgstr "Cor ativa" msgstr "Cor ativa"
#, kde-format
msgid "Inactive color" msgid "Inactive color"
msgstr "Cor inativa" msgstr "Cor inativa"
#, kde-format
msgid "Type" msgid "Type"
msgstr "Tipo" msgstr "Tipo"
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "Direção" msgstr "Direção"
#, kde-format
msgid "Height" msgid "Height"
msgstr "Altura" msgstr "Altura"
#, kde-format
msgid "Width" msgid "Width"
msgstr "Largura" msgstr "Largura"
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "Desktop ativo" msgstr "Desktop ativo"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "Desktop inativo" msgstr "Desktop inativo"
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "Tipo de dica de contexto" msgstr "Tipo de dica de contexto"
#, kde-format
msgid "contours" msgid "contours"
msgstr "Contornos" msgstr "Contornos"
#, kde-format
msgid "windows" msgid "windows"
msgstr "Janelas" msgstr "Janelas"
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "Limpar desktop" msgstr "Limpar desktop"
#, kde-format
msgid "names" msgid "names"
msgstr "nomes" msgstr "nomes"
#, kde-format
msgid "none" msgid "none"
msgstr "nenhum" msgstr "nenhum"
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "Largura da dica de contexto" msgstr "Largura da dica de contexto"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "Layout vertical" msgstr "Layout vertical"
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "Marca" msgstr "Marca"
#, kde-format
msgid "Top Edge"
msgstr "Canto do topo"
#, kde-format
msgid "Bottom Edge"
msgstr "Canto de baixo"
#, kde-format
msgid "Left Edge"
msgstr "Canto esquerdo"
#, kde-format
msgid "Right Edge"
msgstr "Canto direito"
#, kde-format
msgid "Unknown location (%1)"
msgstr "Localização desconhecida (%1)"
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "under" msgstr "under"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "under@insicuri.net" msgstr "under@insicuri.net"
#~ msgid "Top Edge"
#~ msgstr "Canto do topo"
#~ msgid "Bottom Edge"
#~ msgstr "Canto de baixo"
#~ msgid "Left Edge"
#~ msgstr "Canto esquerdo"
#~ msgid "Right Edge"
#~ msgstr "Canto direito"
#~ msgid "Unknown location (%1)"
#~ msgstr "Localização desconhecida (%1)"
#~ msgid "Exec: %1" #~ msgid "Exec: %1"
#~ msgstr "Exec: %1" #~ msgstr "Exec: %1"
@ -667,9 +578,6 @@ msgstr "under@insicuri.net"
#~ msgid "Edit" #~ msgid "Edit"
#~ msgstr "Editar" #~ msgstr "Editar"
#~ msgid "Bars"
#~ msgstr "Barras"
#~ msgid "Enable popup on mouse click" #~ msgid "Enable popup on mouse click"
#~ msgstr "Ativar popup no clique do mouse" #~ msgstr "Ativar popup no clique do mouse"
@ -828,9 +736,6 @@ msgstr "under@insicuri.net"
#~ "$uptime - tempo em atividade do sistema\n" #~ "$uptime - tempo em atividade do sistema\n"
#~ "$custom - formato personalizado " #~ "$custom - formato personalizado "
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid "" #~ msgid ""
#~ "$cpu - total load CPU, %\n" #~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n" #~ "$cpu0 - load CPU for core 0, %\n"
@ -884,9 +789,6 @@ msgstr "under@insicuri.net"
#~ msgid "$gputemp - physical temperature on GPU" #~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - temperatura física da GPU" #~ msgstr "$gputemp - temperatura física da GPU"
#~ msgid "Memory"
#~ msgstr "Memória"
#~ msgid "" #~ msgid ""
#~ "$mem - RAM usage, %\n" #~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n" #~ "$memmb - RAM usage, MB\n"
@ -955,9 +857,6 @@ msgstr "under@insicuri.net"
#~ "$hddtempN - temperatura física no dispositivo N (começando por 0). " #~ "$hddtempN - temperatura física no dispositivo N (começando por 0). "
#~ "Exemplo: $hddtemp0" #~ "Exemplo: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Rede"
#~ msgid "" #~ msgid ""
#~ "$down - download speed, KB/s\n" #~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n" #~ "$up - upload speed, KB/s\n"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:11+0300\n" "PO-Revision-Date: 2015-09-02 00:19+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,239 +18,189 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 2.0\n" "X-Generator: Lokalize 2.0\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "Виджет" msgstr "Виджет"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "Расширенные" msgstr "Расширенные"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "Тултип" msgstr "Тултип"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "Внешний вид" msgstr "Внешний вид"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#, kde-format
msgid "About" msgid "About"
msgstr "О программе" msgstr "О программе"
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "Благодарности" msgstr "Благодарности"
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Высота виджета, пиксели" msgstr "Высота виджета, пиксели"
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "Ширина виджета, пиксели" msgstr "Ширина виджета, пиксели"
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Включить уведомления " msgstr "Включить уведомления "
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "Заменить символ перевода строки" msgstr "Заменить символ перевода строки"
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "Включить фон" msgstr "Включить фон"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "Свой формат времени" msgstr "Свой формат времени"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "Свой формат аптайма" msgstr "Свой формат аптайма"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "Температурные единицы" msgstr "Температурные единицы"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "Цельсий" msgstr "Цельсий"
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "Фаренгейт" msgstr "Фаренгейт"
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "Кельвин" msgstr "Кельвин"
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "Реамюр" msgstr "Реамюр"
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "см^-1" msgstr "см^-1"
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "кДж/моль" msgstr "кДж/моль"
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "ккал/моль" msgstr "ккал/моль"
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "AC подключен" msgstr "AC подключен"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "AC отключен" msgstr "AC отключен"
#, kde-format msgid "Check updates on startup"
msgstr "Проверять обновления при запуске"
msgid "Translate strings"
msgstr "Переводить строки"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "Сбросить кеш ключей" msgstr "Сбросить кеш ключей"
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "Интервал обновления" msgstr "Интервал обновления"
#, kde-format
msgid "Font" msgid "Font"
msgstr "Шрифт" msgstr "Шрифт"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "Размер шрифта" msgstr "Размер шрифта"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "Ширина шрифта" msgstr "Ширина шрифта"
#, kde-format
msgid "light" msgid "light"
msgstr "тонкий" msgstr "тонкий"
#, kde-format
msgid "normal" msgid "normal"
msgstr "нормальный" msgstr "нормальный"
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "полужирный" msgstr "полужирный"
#, kde-format
msgid "bold" msgid "bold"
msgstr "жирный" msgstr "жирный"
#, kde-format
msgid "black" msgid "black"
msgstr "очень жирный" msgstr "очень жирный"
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "Стиль шрифта" msgstr "Стиль шрифта"
#, kde-format
msgid "italic" msgid "italic"
msgstr "курсив" msgstr "курсив"
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "Цвет шрифта" msgstr "Цвет шрифта"
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "Выберете цвет" msgstr "Выберете цвет"
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "Выберете шрифт" msgstr "Выберете шрифт"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "Пусть к ACPI" msgstr "Пусть к ACPI"
#, kde-format
msgid "Custom scripts"
msgstr "Свои скрипты"
#, kde-format
msgid "Edit scripts"
msgstr "Редактировать скрипты"
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "Устройство GPU" msgstr "Устройство GPU"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "HDD" msgstr "HDD"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Команда hddtemp" msgstr "Команда hddtemp"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "Адрес сервера MPD" msgstr "Адрес сервера MPD"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "Порт сервера MPD" msgstr "Порт сервера MPD"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "Имя плеера в MPRIS" msgstr "Имя плеера в MPRIS"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "Музыкальный плеер" msgstr "Музыкальный плеер"
#, kde-format msgid "Player data symbols"
msgstr "Символы в информации о плеере"
msgid "Custom scripts"
msgstr "Свои скрипты"
msgid "Edit scripts"
msgstr "Редактировать скрипты"
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "Монитор котировок" msgstr "Монитор котировок"
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "Редактировать тикеры" msgstr "Редактировать тикеры"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "Пакетный менеджер" msgstr "Пакетный менеджер"
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "Редактировать команду" msgstr "Редактировать команду"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "Погода" msgstr "Погода"
#, kde-format
msgid "Edit weather" msgid "Edit weather"
msgstr "Редактировать погоду" msgstr "Редактировать погоду"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "Показать ключ" msgstr "Показать ключ"
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "Показать README" msgstr "Показать README"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "Проверить обновления" msgstr "Проверить обновления"
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -259,47 +209,36 @@ msgstr ""
"графический тултип. Чтобы включить его, просто сделайте требуемые чекбоксы " "графический тултип. Чтобы включить его, просто сделайте требуемые чекбоксы "
"полностью чекнутыми." "полностью чекнутыми."
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Число хранящихся значений" msgstr "Число хранящихся значений"
#, kde-format
msgid "Background" msgid "Background"
msgstr "Фон" msgstr "Фон"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "Цвет CPU" msgstr "Цвет CPU"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Цвет частоты CPU" msgstr "Цвет частоты CPU"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "Цвет памяти" msgstr "Цвет памяти"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "Цвет swap" msgstr "Цвет swap"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "Цвет скорости загрузки" msgstr "Цвет скорости загрузки"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Цвет скорости отдачи" msgstr "Цвет скорости отдачи"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "Цвет заряжаемой батареи" msgstr "Цвет заряжаемой батареи"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Цвет разряжаемой батареи" msgstr "Цвет разряжаемой батареи"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -307,183 +246,180 @@ msgstr ""
"Подробная информация может быть найдена на <a href=\"http://arcanis.name/ru/" "Подробная информация может быть найдена на <a href=\"http://arcanis.name/ru/"
"projects/awesome-widgets/\">домашней странице проекта</a>" "projects/awesome-widgets/\">домашней странице проекта</a>"
#, kde-format msgid "AC"
msgstr "Адаптор питания"
msgid "Bars"
msgstr "Бары"
msgid "CPU"
msgstr "CPU"
msgid "Desktops"
msgstr "Рабочие столы"
msgid "Memory"
msgstr "Память"
msgid "Network"
msgstr "Сеть"
msgid "Scripts"
msgstr "Скрипты"
msgid "Time"
msgstr "Время"
msgid "Quotes"
msgstr "Котировоки"
msgid "Upgrades"
msgstr "Обновления"
msgid "Weathers"
msgstr "Погода"
msgid "Add" msgid "Add"
msgstr "Добавить" msgstr "Добавить"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "Показать значение" msgstr "Показать значение"
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "Тег: %1" msgstr "Тег: %1"
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "Значение: %1" msgstr "Значение: %1"
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "Информация: %1" msgstr "Информация: %1"
#, kde-format msgid "Add lambda"
msgstr "Добавить лямбду"
msgid "Edit bars" msgid "Edit bars"
msgstr "Редактировать бары" msgstr "Редактировать бары"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "Запуск %1" msgstr "Запуск %1"
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "Версия %1 (дата сборки %2)" msgstr "Версия %1 (дата сборки %2)"
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "Коллекция минималистичных плазмоидов" msgstr "Коллекция минималистичных плазмоидов"
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "Ссылки:" msgstr "Ссылки:"
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "Домашняя страница" msgstr "Домашняя страница"
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "Репозиторий" msgstr "Репозиторий"
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Баг-трекер" msgstr "Баг-трекер"
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "Тикет перевода" msgstr "Тикет перевода"
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "Пакеты в AUR" msgstr "Пакеты в AUR"
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "Пакеты для openSUSE" msgstr "Пакеты для openSUSE"
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "Данное приложение лицензировано под %1" msgstr "Данное приложение лицензировано под %1"
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Переводчики: %1" msgstr "Переводчики: %1"
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "Данное приложение использует: %1" msgstr "Данное приложение использует: %1"
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "Выберете шрифт" msgstr "Выберете шрифт"
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "Текущая версия : %1" msgstr "Текущая версия : %1"
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "Новая версия : %1" msgstr "Новая версия : %1"
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "Нажмите \"Ok\" для загрузки" msgstr "Нажмите \"Ok\" для загрузки"
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "Найдены обновления" msgstr "Найдены обновления"
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "AC подключен" msgstr "AC подключен"
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "AC отключен" msgstr "AC отключен"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "Высокая загрузка CPU" msgstr "Высокая загрузка CPU"
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "Высокая загрузка GPU" msgstr "Высокая загрузка GPU"
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "Свободное место на диске %1 меньше 10%" msgstr "Свободное место на диске %1 меньше 10%"
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "Большое потребление памяти" msgstr "Большое потребление памяти"
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "Сетевое устройство было изменено на %1" msgstr "Сетевое устройство было изменено на %1"
#, kde-format msgid "MB/s"
msgstr "МБ/с"
msgid "KB/s"
msgstr "КБ/с"
msgid "Swap is used" msgid "Swap is used"
msgstr "Используется своп" msgstr "Используется своп"
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "Выберете тег" msgstr "Выберете тег"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "Тег" msgstr "Тег"
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "Копировать" msgstr "Копировать"
#, kde-format
msgid "Create" msgid "Create"
msgstr "Создать" msgstr "Создать"
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "Удалить" msgstr "Удалить"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "Введите имя файла" msgstr "Введите имя файла"
#, kde-format
msgid "File name" msgid "File name"
msgstr "Имя файла" msgstr "Имя файла"
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "Имя: %1" msgstr "Имя: %1"
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Комментарий: %1" msgstr "Комментарий: %1"
#, kde-format
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Идентификатор: %1" msgstr "Идентификатор: %1"
#, kde-format
msgid "Name" msgid "Name"
msgstr "Имя" msgstr "Имя"
#, kde-format
msgid "Comment" msgid "Comment"
msgstr "Комментарий" msgstr "Комментарий"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -495,164 +431,131 @@ msgstr ""
"style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo." "style=\" text-decoration: underline; color:#0057ae;\">http://finance.yahoo."
"com/</span></a></p></body></html>" "com/</span></a></p></body></html>"
#, kde-format
msgid "Ticker" msgid "Ticker"
msgstr "Тикер" msgstr "Тикер"
#, kde-format
msgid "Active" msgid "Active"
msgstr "Активен" msgstr "Активен"
#, kde-format
msgid "Interval" msgid "Interval"
msgstr "Интервал" msgstr "Интервал"
#, kde-format
msgid "Command" msgid "Command"
msgstr "Команда" msgstr "Команда"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "Префикс" msgstr "Префикс"
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "Имеет сообщения" msgstr "Имеет сообщения"
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "Перенаправление" msgstr "Перенаправление"
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "Дополнительные фильтры" msgstr "Дополнительные фильтры"
#, kde-format
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Обработать цвета" msgstr "Обработать цвета"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "Обработать пробелы" msgstr "Обработать пробелы"
#, kde-format msgid "Filter"
msgstr "Фильтр"
msgid "Null" msgid "Null"
msgstr "Пустые строки" msgstr "Пустые строки"
#, kde-format
msgid "City" msgid "City"
msgstr "Город" msgstr "Город"
#, kde-format
msgid "Country" msgid "Country"
msgstr "Страна" msgstr "Страна"
#, kde-format
msgid "Timestamp" msgid "Timestamp"
msgstr "Таймштамп" msgstr "Таймштамп"
#, kde-format msgid "Use images"
msgstr "Использовать изображения"
msgid "Value" msgid "Value"
msgstr "Значение" msgstr "Значение"
#, kde-format
msgid "Active color" msgid "Active color"
msgstr "Активный цвет" msgstr "Активный цвет"
#, kde-format
msgid "Inactive color" msgid "Inactive color"
msgstr "Неактивный цвет" msgstr "Неактивный цвет"
#, kde-format
msgid "Type" msgid "Type"
msgstr "Тип" msgstr "Тип"
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "Направление" msgstr "Направление"
#, kde-format
msgid "Height" msgid "Height"
msgstr "Высота" msgstr "Высота"
#, kde-format
msgid "Width" msgid "Width"
msgstr "Ширина" msgstr "Ширина"
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "Активный рабочий стол" msgstr "Активный рабочий стол"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "Неактивный рабочий стол" msgstr "Неактивный рабочий стол"
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "Тип тултипа" msgstr "Тип тултипа"
#, kde-format
msgid "contours" msgid "contours"
msgstr "контуры" msgstr "контуры"
#, kde-format
msgid "windows" msgid "windows"
msgstr "окна" msgstr "окна"
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "пустой рабочий стол" msgstr "пустой рабочий стол"
#, kde-format
msgid "names" msgid "names"
msgstr "названия" msgstr "названия"
#, kde-format
msgid "none" msgid "none"
msgstr "ничего" msgstr "ничего"
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "Ширина тултипа" msgstr "Ширина тултипа"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "Вертикальная разметка" msgstr "Вертикальная разметка"
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "Метка" msgstr "Метка"
#, kde-format
msgid "Top Edge"
msgstr "Верхняя грань"
#, kde-format
msgid "Bottom Edge"
msgstr "Нижняя грань"
#, kde-format
msgid "Left Edge"
msgstr "Левая грань"
#, kde-format
msgid "Right Edge"
msgstr "Правая грань"
#, kde-format
msgid "Unknown location (%1)"
msgstr "Неизвестное положение (%1)"
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Evgeniy Alekseev" msgstr "Evgeniy Alekseev"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "esalexeev@gmail.com" msgstr "esalexeev@gmail.com"
#~ msgid "Top Edge"
#~ msgstr "Верхняя грань"
#~ msgid "Bottom Edge"
#~ msgstr "Нижняя грань"
#~ msgid "Left Edge"
#~ msgstr "Левая грань"
#~ msgid "Right Edge"
#~ msgstr "Правая грань"
#~ msgid "Unknown location (%1)"
#~ msgstr "Неизвестное положение (%1)"
#~ msgid "Ticker: %1" #~ msgid "Ticker: %1"
#~ msgstr "Тикер: %1" #~ msgstr "Тикер: %1"
@ -674,9 +577,6 @@ msgstr "esalexeev@gmail.com"
#~ msgid "Edit" #~ msgid "Edit"
#~ msgstr "Править" #~ msgstr "Править"
#~ msgid "Bars"
#~ msgstr "Бары"
#~ msgid "Enable popup on mouse click" #~ msgid "Enable popup on mouse click"
#~ msgstr "Включить сообщения по клику мыши" #~ msgstr "Включить сообщения по клику мыши"
@ -850,9 +750,6 @@ msgstr "esalexeev@gmail.com"
#~ "$uptime - время работы\n" #~ "$uptime - время работы\n"
#~ "$custom - свой формат" #~ "$custom - свой формат"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid "" #~ msgid ""
#~ "$cpu - total load CPU, %\n" #~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n" #~ "$cpu0 - load CPU for core 0, %\n"
@ -905,9 +802,6 @@ msgstr "esalexeev@gmail.com"
#~ msgid "$gputemp - physical temperature on GPU" #~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - физическая температура на GPU" #~ msgstr "$gputemp - физическая температура на GPU"
#~ msgid "Memory"
#~ msgstr "Память"
#~ msgid "" #~ msgid ""
#~ "$mem - RAM usage, %\n" #~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n" #~ "$memmb - RAM usage, MB\n"
@ -968,9 +862,6 @@ msgstr "esalexeev@gmail.com"
#~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0" #~ "$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0"
#~ msgstr "$hddtempN - температура на устройстве N (от 0). Пример: $hddtemp0" #~ msgstr "$hddtempN - температура на устройстве N (от 0). Пример: $hddtemp0"
#~ msgid "Network"
#~ msgstr "Сеть"
#~ msgid "" #~ msgid ""
#~ "$down - download speed, KB/s\n" #~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n" #~ "$up - upload speed, KB/s\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:23+0300\n" "PO-Revision-Date: 2015-07-31 22:23+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n" "Language-Team: Ukrainian <kde-russian@lists.kde.ru>\n"
@ -18,239 +18,192 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 2.0\n" "X-Generator: Lokalize 2.0\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "Віджет" msgstr "Віджет"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "Розширені" msgstr "Розширені"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "Підказки" msgstr "Підказки"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "Зовнішній вигляд" msgstr "Зовнішній вигляд"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#, kde-format
msgid "About" msgid "About"
msgstr "Про програму" msgstr "Про програму"
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "Подяка" msgstr "Подяка"
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "Висота віджету, пікселі" msgstr "Висота віджету, пікселі"
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "Ширина віджету, пікселі" msgstr "Ширина віджету, пікселі"
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "Включити повідомлення" msgstr "Включити повідомлення"
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "Замінити символ переводу рядка" msgstr "Замінити символ переводу рядка"
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "Включити фон" msgstr "Включити фон"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "Свій формат часу" msgstr "Свій формат часу"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "Свій формат аптайму (uptime)" msgstr "Свій формат аптайму (uptime)"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "Одиниці виміру температури" msgstr "Одиниці виміру температури"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "Цельсій" msgstr "Цельсій"
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "Фаренгейт" msgstr "Фаренгейт"
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "Кельвін" msgstr "Кельвін"
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "Реамюр" msgstr "Реамюр"
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "см^-1" msgstr "см^-1"
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "кДж/моль" msgstr "кДж/моль"
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "ккал/моль" msgstr "ккал/моль"
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "AC підключений" msgstr "AC підключений"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "AC відключений" msgstr "AC відключений"
#, kde-format #, fuzzy
msgid "Check updates on startup"
msgstr "Шукати оновлення"
#, fuzzy
msgid "Translate strings"
msgstr "Тікет перекладу"
msgid "Drop key cache" msgid "Drop key cache"
msgstr "" msgstr ""
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "Інтервал оновлення" msgstr "Інтервал оновлення"
#, kde-format
msgid "Font" msgid "Font"
msgstr "Шрифт" msgstr "Шрифт"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "Розмір шрифту" msgstr "Розмір шрифту"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "Ширина шрифту" msgstr "Ширина шрифту"
#, kde-format
msgid "light" msgid "light"
msgstr "тонкий" msgstr "тонкий"
#, kde-format
msgid "normal" msgid "normal"
msgstr "нормальний" msgstr "нормальний"
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "напівжирний" msgstr "напівжирний"
#, kde-format
msgid "bold" msgid "bold"
msgstr "жирний" msgstr "жирний"
#, kde-format
msgid "black" msgid "black"
msgstr "дуже жирний" msgstr "дуже жирний"
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "Стиль шрифту" msgstr "Стиль шрифту"
#, kde-format
msgid "italic" msgid "italic"
msgstr "курсив" msgstr "курсив"
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "Колір шрифту" msgstr "Колір шрифту"
#, kde-format
msgid "Select a color" msgid "Select a color"
msgstr "Оберіть колір" msgstr "Оберіть колір"
#, kde-format
msgid "Select a font" msgid "Select a font"
msgstr "Оберіть шрифт" msgstr "Оберіть шрифт"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "Шлях до ICPI" msgstr "Шлях до ICPI"
#, kde-format
msgid "Custom scripts"
msgstr "Свої скрипти"
#, kde-format
msgid "Edit scripts"
msgstr "Редагувати скрипти"
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "Пристій GPU" msgstr "Пристій GPU"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "HDD" msgstr "HDD"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "Команда hddtemp" msgstr "Команда hddtemp"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "Адреса сервера MPD" msgstr "Адреса сервера MPD"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "Порт сервера MPD" msgstr "Порт сервера MPD"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "Ім’я плеєру в MPRIS" msgstr "Ім’я плеєру в MPRIS"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "Музичний плеєр" msgstr "Музичний плеєр"
#, kde-format msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr "Свої скрипти"
msgid "Edit scripts"
msgstr "Редагувати скрипти"
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "Монітор котирувань" msgstr "Монітор котирувань"
#, kde-format
msgid "Edit tickers" msgid "Edit tickers"
msgstr "Редагувати тікети" msgstr "Редагувати тікети"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "Пакетний менеджер" msgstr "Пакетний менеджер"
#, kde-format
msgid "Edit command" msgid "Edit command"
msgstr "Редагувати команду" msgstr "Редагувати команду"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Edit weather" msgid "Edit weather"
msgstr "Редагувати тікети" msgstr "Редагувати тікети"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "Показати ключ" msgstr "Показати ключ"
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "Показати README" msgstr "Показати README"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "Шукати оновлення" msgstr "Шукати оновлення"
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -259,47 +212,36 @@ msgstr ""
"підтримують графічні підказки. Щоб їх задіяти, просто зробіть необхідні " "підтримують графічні підказки. Щоб їх задіяти, просто зробіть необхідні "
"чекбокси повністю чекнутими." "чекбокси повністю чекнутими."
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "Кількість значень для підказки" msgstr "Кількість значень для підказки"
#, kde-format
msgid "Background" msgid "Background"
msgstr "Фон" msgstr "Фон"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "Колір CPU" msgstr "Колір CPU"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "Колір частоти CPU" msgstr "Колір частоти CPU"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "Колір пам’яті" msgstr "Колір пам’яті"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "Колір swap" msgstr "Колір swap"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "Колір швидкості скачування" msgstr "Колір швидкості скачування"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "Колір швидкості віддачі" msgstr "Колір швидкості віддачі"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "Колір батареї, що заряджається" msgstr "Колір батареї, що заряджається"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "Колір батарєї, що розряджається" msgstr "Колір батарєї, що розряджається"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -307,183 +249,185 @@ msgstr ""
"Детальна інформація може бути знайдена на <a href=\"http://arcanis.name/" "Детальна інформація може бути знайдена на <a href=\"http://arcanis.name/"
"projects/awesome-widgets/\">домашній сторінці проекту</a>" "projects/awesome-widgets/\">домашній сторінці проекту</a>"
#, kde-format msgid "AC"
msgstr ""
msgid "Bars"
msgstr "Бари"
msgid "CPU"
msgstr "CPU"
msgid "Desktops"
msgstr ""
msgid "Memory"
msgstr "Пам’ять"
msgid "Network"
msgstr "Мережа"
#, fuzzy
msgid "Scripts"
msgstr "Редагувати скрипти"
#, fuzzy
msgid "Time"
msgstr "Час"
#, fuzzy
msgid "Quotes"
msgstr "Монітор котирувань"
msgid "Upgrades"
msgstr ""
#, fuzzy
msgid "Weathers"
msgstr "Редагувати тікети"
msgid "Add" msgid "Add"
msgstr "Додати" msgstr "Додати"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "Показати значення" msgstr "Показати значення"
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "Тег: %1" msgstr "Тег: %1"
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "Значення: %1" msgstr "Значення: %1"
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "Інформація: %1" msgstr "Інформація: %1"
#, kde-format msgid "Add lambda"
msgstr ""
msgid "Edit bars" msgid "Edit bars"
msgstr "Редагувати бари" msgstr "Редагувати бари"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "Запуск %1" msgstr "Запуск %1"
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "Версія %1 (дата створення %2)" msgstr "Версія %1 (дата створення %2)"
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "Набір мінімалістичних плазмоїдів" msgstr "Набір мінімалістичних плазмоїдів"
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "Посилання:" msgstr "Посилання:"
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "Домашня сторінка" msgstr "Домашня сторінка"
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "Репозиторій" msgstr "Репозиторій"
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Баг-трекер" msgstr "Баг-трекер"
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "Тікет перекладу" msgstr "Тікет перекладу"
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "Пакети в AUR" msgstr "Пакети в AUR"
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "Пакети для openSUSE" msgstr "Пакети для openSUSE"
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "Цю програму ліцензовано під %1" msgstr "Цю програму ліцензовано під %1"
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Перекладачі: %1" msgstr "Перекладачі: %1"
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "Ця програма використовує: %1" msgstr "Ця програма використовує: %1"
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "Оберіть шрифт" msgstr "Оберіть шрифт"
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "Поточна версія : %1" msgstr "Поточна версія : %1"
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "Нова версія : %1" msgstr "Нова версія : %1"
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "Натисніть \"Ok\" для завантаження" msgstr "Натисніть \"Ok\" для завантаження"
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "Знайдені оновлення" msgstr "Знайдені оновлення"
#, kde-format
msgid "AC online" msgid "AC online"
msgstr "AC підключений" msgstr "AC підключений"
#, kde-format
msgid "AC offline" msgid "AC offline"
msgstr "AC відключений" msgstr "AC відключений"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "Високе завантаження CPU" msgstr "Високе завантаження CPU"
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "Високе завантаження GPU" msgstr "Високе завантаження GPU"
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "Вільний простір на диску %1 меньше ніж 10%" msgstr "Вільний простір на диску %1 меньше ніж 10%"
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "Велике споживання пам’яті" msgstr "Велике споживання пам’яті"
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "Мережевий пристрій було змінено на %1" msgstr "Мережевий пристрій було змінено на %1"
#, kde-format msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used" msgid "Swap is used"
msgstr "Використовується swap" msgstr "Використовується swap"
#, kde-format
msgid "Select tag" msgid "Select tag"
msgstr "Оберіть тег" msgstr "Оберіть тег"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "Тег" msgstr "Тег"
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "Копіювати" msgstr "Копіювати"
#, kde-format
msgid "Create" msgid "Create"
msgstr "Створити" msgstr "Створити"
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "Видалити" msgstr "Видалити"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "Введіть ім’я файлу" msgstr "Введіть ім’я файлу"
#, kde-format
msgid "File name" msgid "File name"
msgstr "Ім’я файлу" msgstr "Ім’я файлу"
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "Ім’я: %1" msgstr "Ім’я: %1"
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "Коментар: %1" msgstr "Коментар: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Identity: %1" msgid "Identity: %1"
msgstr "Коментар: %1" msgstr "Коментар: %1"
#, kde-format
msgid "Name" msgid "Name"
msgstr "Ім’я" msgstr "Ім’я"
#, kde-format
msgid "Comment" msgid "Comment"
msgstr "Коментар" msgstr "Коментар"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -491,164 +435,139 @@ msgid ""
"span></a></p></body></html>" "span></a></p></body></html>"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Ticker" msgid "Ticker"
msgstr "Тікер: %1" msgstr "Тікер: %1"
#, fuzzy, kde-format #, fuzzy
msgid "Active" msgid "Active"
msgstr "Активний колір" msgstr "Активний колір"
#, fuzzy, kde-format #, fuzzy
msgid "Interval" msgid "Interval"
msgstr "Інтервал оновлення" msgstr "Інтервал оновлення"
#, fuzzy, kde-format #, fuzzy
msgid "Command" msgid "Command"
msgstr "Коментар" msgstr "Коментар"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "" msgstr ""
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "" msgstr ""
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "" msgstr ""
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Wrap colors" msgid "Wrap colors"
msgstr "Колір swap" msgstr "Колір swap"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "" msgstr ""
#, kde-format msgid "Filter"
msgstr ""
msgid "Null" msgid "Null"
msgstr "" msgstr ""
#, kde-format
msgid "City" msgid "City"
msgstr "" msgstr ""
#, kde-format
msgid "Country" msgid "Country"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Timestamp" msgid "Timestamp"
msgstr "Час" msgstr "Час"
#, kde-format msgid "Use images"
msgstr ""
msgid "Value" msgid "Value"
msgstr "Значення" msgstr "Значення"
#, fuzzy, kde-format #, fuzzy
msgid "Active color" msgid "Active color"
msgstr "Активний колір" msgstr "Активний колір"
#, fuzzy, kde-format #, fuzzy
msgid "Inactive color" msgid "Inactive color"
msgstr "Неактивний колір" msgstr "Неактивний колір"
#, kde-format
msgid "Type" msgid "Type"
msgstr "Тип" msgstr "Тип"
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "Напрямок" msgstr "Напрямок"
#, kde-format
msgid "Height" msgid "Height"
msgstr "Висота" msgstr "Висота"
#, kde-format
msgid "Width" msgid "Width"
msgstr "Ширина" msgstr "Ширина"
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "Активний робочий стіл" msgstr "Активний робочий стіл"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "Неактивний робочий стіл" msgstr "Неактивний робочий стіл"
#, kde-format
msgid "Tooltip type" msgid "Tooltip type"
msgstr "Тип підказки" msgstr "Тип підказки"
#, kde-format
msgid "contours" msgid "contours"
msgstr "Контури" msgstr "Контури"
#, kde-format
msgid "windows" msgid "windows"
msgstr "Вікна" msgstr "Вікна"
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "пустий робочий стіл" msgstr "пустий робочий стіл"
#, kde-format
msgid "names" msgid "names"
msgstr "назви" msgstr "назви"
#, kde-format
msgid "none" msgid "none"
msgstr "немає" msgstr "немає"
#, kde-format
msgid "Tooltip width" msgid "Tooltip width"
msgstr "Ширина підказки" msgstr "Ширина підказки"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "Вертикальна розмітка" msgstr "Вертикальна розмітка"
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "Позначка" msgstr "Позначка"
#, kde-format
msgid "Top Edge"
msgstr "Верхній край"
#, kde-format
msgid "Bottom Edge"
msgstr "Нижній край"
#, kde-format
msgid "Left Edge"
msgstr "Лівий край"
#, kde-format
msgid "Right Edge"
msgstr "Правий край"
#, kde-format
msgid "Unknown location (%1)"
msgstr "Невідоме положення (%1)"
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "Slobodyan Victor" msgstr "Slobodyan Victor"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "sarumyan@i.ua" msgstr "sarumyan@i.ua"
#~ msgid "Top Edge"
#~ msgstr "Верхній край"
#~ msgid "Bottom Edge"
#~ msgstr "Нижній край"
#~ msgid "Left Edge"
#~ msgstr "Лівий край"
#~ msgid "Right Edge"
#~ msgstr "Правий край"
#~ msgid "Unknown location (%1)"
#~ msgstr "Невідоме положення (%1)"
#~ msgid "Exec: %1" #~ msgid "Exec: %1"
#~ msgstr "Команда: %1" #~ msgstr "Команда: %1"
@ -668,9 +587,6 @@ msgstr "sarumyan@i.ua"
#~ msgid "Edit" #~ msgid "Edit"
#~ msgstr "Редагувати" #~ msgstr "Редагувати"
#~ msgid "Bars"
#~ msgstr "Бари"
#~ msgid "Enable popup on mouse click" #~ msgid "Enable popup on mouse click"
#~ msgstr "Включити спливаючі підказки при натисканні клавіші миші" #~ msgstr "Включити спливаючі підказки при натисканні клавіші миші"
@ -831,9 +747,6 @@ msgstr "sarumyan@i.ua"
#~ "$uptime - час роботи\n" #~ "$uptime - час роботи\n"
#~ "$custom - свій формат" #~ "$custom - свій формат"
#~ msgid "CPU"
#~ msgstr "CPU"
#~ msgid "" #~ msgid ""
#~ "$cpu - total load CPU, %\n" #~ "$cpu - total load CPU, %\n"
#~ "$cpu0 - load CPU for core 0, %\n" #~ "$cpu0 - load CPU for core 0, %\n"
@ -885,9 +798,6 @@ msgstr "sarumyan@i.ua"
#~ msgid "$gputemp - physical temperature on GPU" #~ msgid "$gputemp - physical temperature on GPU"
#~ msgstr "$gputemp - фізична температура на GPU" #~ msgstr "$gputemp - фізична температура на GPU"
#~ msgid "Memory"
#~ msgstr "Пам’ять"
#~ msgid "" #~ msgid ""
#~ "$mem - RAM usage, %\n" #~ "$mem - RAM usage, %\n"
#~ "$memmb - RAM usage, MB\n" #~ "$memmb - RAM usage, MB\n"
@ -946,9 +856,6 @@ msgstr "sarumyan@i.ua"
#~ msgstr "" #~ msgstr ""
#~ "$hddtempN - фізична температура на пристрої N (від 0). Приклад: $hddtemp" #~ "$hddtempN - фізична температура на пристрої N (від 0). Приклад: $hddtemp"
#~ msgid "Network"
#~ msgstr "Мережа"
#~ msgid "" #~ msgid ""
#~ "$down - download speed, KB/s\n" #~ "$down - download speed, KB/s\n"
#~ "$up - upload speed, KB/s\n" #~ "$up - upload speed, KB/s\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n" "Report-Msgid-Bugs-To: https://github.com/arcan1s/awesome-widgets/issues\n"
"POT-Creation-Date: 2015-08-01 22:13+0300\n" "POT-Creation-Date: 2015-09-02 00:03+0300\n"
"PO-Revision-Date: 2015-07-31 22:24+0300\n" "PO-Revision-Date: 2015-07-31 22:24+0300\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
@ -18,239 +18,194 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n" "X-Generator: Lokalize 2.0\n"
#, kde-format
msgid "Widget" msgid "Widget"
msgstr "窗口小部件" msgstr "窗口小部件"
#, kde-format
msgid "Advanced" msgid "Advanced"
msgstr "高级设置" msgstr "高级设置"
#, kde-format
msgid "Tooltip" msgid "Tooltip"
msgstr "提示" msgstr "提示"
#, kde-format
msgid "Appearance" msgid "Appearance"
msgstr "外观" msgstr "外观"
#, kde-format
msgid "DataEngine" msgid "DataEngine"
msgstr "数据引擎" msgstr "数据引擎"
#, kde-format
msgid "About" msgid "About"
msgstr "" msgstr ""
#, kde-format
msgid "Acknowledgment" msgid "Acknowledgment"
msgstr "" msgstr ""
#, kde-format
msgid "Widget height, px" msgid "Widget height, px"
msgstr "" msgstr ""
#, kde-format
msgid "Widget width, px" msgid "Widget width, px"
msgstr "" msgstr ""
#, kde-format
msgid "Enable notifications" msgid "Enable notifications"
msgstr "" msgstr ""
#, kde-format
msgid "Wrap new lines" msgid "Wrap new lines"
msgstr "" msgstr ""
#, kde-format
msgid "Enable background" msgid "Enable background"
msgstr "启用背景" msgstr "启用背景"
#, kde-format
msgid "Custom time format" msgid "Custom time format"
msgstr "自定义时间格式" msgstr "自定义时间格式"
#, kde-format
msgid "Custom uptime format" msgid "Custom uptime format"
msgstr "自定义启动时间显示格式" msgstr "自定义启动时间显示格式"
#, kde-format
msgid "Temperature units" msgid "Temperature units"
msgstr "温度单位" msgstr "温度单位"
#, kde-format
msgid "Celsius" msgid "Celsius"
msgstr "" msgstr ""
#, kde-format
msgid "Fahrenheit" msgid "Fahrenheit"
msgstr "" msgstr ""
#, kde-format
msgid "Kelvin" msgid "Kelvin"
msgstr "" msgstr ""
#, kde-format
msgid "Reaumur" msgid "Reaumur"
msgstr "" msgstr ""
#, kde-format
msgid "cm^-1" msgid "cm^-1"
msgstr "" msgstr ""
#, kde-format
msgid "kJ/mol" msgid "kJ/mol"
msgstr "" msgstr ""
#, kde-format
msgid "kcal/mol" msgid "kcal/mol"
msgstr "" msgstr ""
#, kde-format
msgid "AC online tag" msgid "AC online tag"
msgstr "外接电源使用中标签" msgstr "外接电源使用中标签"
#, kde-format
msgid "AC offline tag" msgid "AC offline tag"
msgstr "外接电源未使用标签" msgstr "外接电源未使用标签"
#, kde-format msgid "Check updates on startup"
msgstr ""
msgid "Translate strings"
msgstr ""
msgid "Drop key cache" msgid "Drop key cache"
msgstr "" msgstr ""
#, kde-format
msgid "Time interval" msgid "Time interval"
msgstr "时间周期" msgstr "时间周期"
#, kde-format
msgid "Font" msgid "Font"
msgstr "字体" msgstr "字体"
#, kde-format
msgid "Font size" msgid "Font size"
msgstr "字体大小" msgstr "字体大小"
#, kde-format
msgid "Font weight" msgid "Font weight"
msgstr "字体宽度" msgstr "字体宽度"
#, kde-format
msgid "light" msgid "light"
msgstr "" msgstr ""
#, kde-format
msgid "normal" msgid "normal"
msgstr "" msgstr ""
#, kde-format
msgid "demi bold" msgid "demi bold"
msgstr "" msgstr ""
#, kde-format
msgid "bold" msgid "bold"
msgstr "" msgstr ""
#, kde-format
msgid "black" msgid "black"
msgstr "" msgstr ""
#, kde-format
msgid "Font style" msgid "Font style"
msgstr "字体样式" msgstr "字体样式"
#, kde-format
msgid "italic" msgid "italic"
msgstr "" msgstr ""
#, kde-format
msgid "Font color" msgid "Font color"
msgstr "字体颜色" msgstr "字体颜色"
#, fuzzy, kde-format #, fuzzy
msgid "Select a color" msgid "Select a color"
msgstr "选择字体" msgstr "选择字体"
#, fuzzy, kde-format #, fuzzy
msgid "Select a font" msgid "Select a font"
msgstr "选择字体" msgstr "选择字体"
#, kde-format
msgid "ACPI path" msgid "ACPI path"
msgstr "" msgstr ""
#, kde-format
msgid "Custom scripts"
msgstr ""
#, kde-format
msgid "Edit scripts"
msgstr ""
#, kde-format
msgid "GPU device" msgid "GPU device"
msgstr "GPU 设备" msgstr "GPU 设备"
#, kde-format
msgid "HDD" msgid "HDD"
msgstr "硬盘" msgstr "硬盘"
#, kde-format
msgid "hddtemp cmd" msgid "hddtemp cmd"
msgstr "硬盘温度显示命令" msgstr "硬盘温度显示命令"
#, kde-format
msgid "MPD address" msgid "MPD address"
msgstr "MPD 地址" msgstr "MPD 地址"
#, kde-format
msgid "MPD port" msgid "MPD port"
msgstr "MPD 端口" msgstr "MPD 端口"
#, kde-format
msgid "MPRIS player name" msgid "MPRIS player name"
msgstr "MPRIS 播放器名" msgstr "MPRIS 播放器名"
#, kde-format
msgid "Music player" msgid "Music player"
msgstr "音乐播放器" msgstr "音乐播放器"
#, kde-format msgid "Player data symbols"
msgstr ""
msgid "Custom scripts"
msgstr ""
msgid "Edit scripts"
msgstr ""
msgid "Quotes monitor" msgid "Quotes monitor"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Edit tickers" msgid "Edit tickers"
msgstr "可编辑的" msgstr "可编辑的"
#, kde-format
msgid "Package manager" msgid "Package manager"
msgstr "包管理器" msgstr "包管理器"
#, fuzzy, kde-format #, fuzzy
msgid "Edit command" msgid "Edit command"
msgstr "自定义命令" msgstr "自定义命令"
#, kde-format
msgid "Weather" msgid "Weather"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Edit weather" msgid "Edit weather"
msgstr "可编辑的" msgstr "可编辑的"
#, kde-format
msgid "Request key" msgid "Request key"
msgstr "" msgstr ""
#, kde-format
msgid "Show README" msgid "Show README"
msgstr "显示帮助文档" msgstr "显示帮助文档"
#, kde-format
msgid "Check updates" msgid "Check updates"
msgstr "" msgstr ""
#, kde-format
msgid "" msgid ""
"CPU, CPU clock, memory, swap and network labels support graphical tooltip. " "CPU, CPU clock, memory, swap and network labels support graphical tooltip. "
"To enable them just make needed checkbox fully checked." "To enable them just make needed checkbox fully checked."
@ -258,47 +213,36 @@ msgstr ""
"CPU CPU 时钟,内存,虚拟内存和网络连接标签均支持图形化提示显示。 请在相应复" "CPU CPU 时钟,内存,虚拟内存和网络连接标签均支持图形化提示显示。 请在相应复"
"选框中勾选以启用该功能。 " "选框中勾选以启用该功能。 "
#, kde-format
msgid "Number of values for tooltips" msgid "Number of values for tooltips"
msgstr "提示的数值" msgstr "提示的数值"
#, kde-format
msgid "Background" msgid "Background"
msgstr "背景" msgstr "背景"
#, kde-format
msgid "CPU color" msgid "CPU color"
msgstr "CPU 颜色" msgstr "CPU 颜色"
#, kde-format
msgid "CPU clock color" msgid "CPU clock color"
msgstr "CPU 时钟颜色" msgstr "CPU 时钟颜色"
#, kde-format
msgid "Memory color" msgid "Memory color"
msgstr "内存显示颜色" msgstr "内存显示颜色"
#, kde-format
msgid "Swap color" msgid "Swap color"
msgstr "虚拟内存颜色" msgstr "虚拟内存颜色"
#, kde-format
msgid "Download speed color" msgid "Download speed color"
msgstr "下载速度颜色" msgstr "下载速度颜色"
#, kde-format
msgid "Upload speed color" msgid "Upload speed color"
msgstr "上传速度颜色" msgstr "上传速度颜色"
#, kde-format
msgid "Battery active color" msgid "Battery active color"
msgstr "电池使用状态提示颜色" msgstr "电池使用状态提示颜色"
#, kde-format
msgid "Battery inactive color" msgid "Battery inactive color"
msgstr "电池未使用状态提示颜色" msgstr "电池未使用状态提示颜色"
#, kde-format
msgid "" msgid ""
"Detailed information may be found on <a href=\"http://arcanis.name/projects/" "Detailed information may be found on <a href=\"http://arcanis.name/projects/"
"awesome-widgets/\">project homepage</a>" "awesome-widgets/\">project homepage</a>"
@ -306,183 +250,187 @@ msgstr ""
"详情请参照 <a href=\"http://arcanis.name/projects/ awesome-widgets/\">项目主" "详情请参照 <a href=\"http://arcanis.name/projects/ awesome-widgets/\">项目主"
"页</a>" "页</a>"
#, kde-format msgid "AC"
msgstr ""
msgid "Bars"
msgstr ""
msgid "CPU"
msgstr ""
msgid "Desktops"
msgstr ""
#, fuzzy
msgid "Memory"
msgstr "内存显示颜色"
msgid "Network"
msgstr ""
msgid "Scripts"
msgstr ""
msgid "Time"
msgstr ""
msgid "Quotes"
msgstr ""
msgid "Upgrades"
msgstr ""
#, fuzzy
msgid "Weathers"
msgstr "可编辑的"
msgid "Add" msgid "Add"
msgstr "添加" msgstr "添加"
#, kde-format
msgid "Show value" msgid "Show value"
msgstr "" msgstr ""
#, kde-format
msgid "Tag: %1" msgid "Tag: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Value: %1" msgid "Value: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Info: %1" msgid "Info: %1"
msgstr "" msgstr ""
#, fuzzy, kde-format msgid "Add lambda"
msgstr ""
#, fuzzy
msgid "Edit bars" msgid "Edit bars"
msgstr "可编辑的" msgstr "可编辑的"
#, kde-format
msgid "Run %1" msgid "Run %1"
msgstr "" msgstr ""
#, kde-format
msgid "Version %1 (build date %2)" msgid "Version %1 (build date %2)"
msgstr "" msgstr ""
#, kde-format
msgid "A set of minimalistic plasmoid widgets" msgid "A set of minimalistic plasmoid widgets"
msgstr "" msgstr ""
#, kde-format
msgid "Links:" msgid "Links:"
msgstr "" msgstr ""
#, kde-format
msgid "Homepage" msgid "Homepage"
msgstr "" msgstr ""
#, kde-format
msgid "Repository" msgid "Repository"
msgstr "" msgstr ""
#, kde-format
msgid "Bugtracker" msgid "Bugtracker"
msgstr "" msgstr ""
#, kde-format
msgid "Translation issue" msgid "Translation issue"
msgstr "" msgstr ""
#, kde-format
msgid "AUR packages" msgid "AUR packages"
msgstr "" msgstr ""
#, kde-format
msgid "openSUSE packages" msgid "openSUSE packages"
msgstr "" msgstr ""
#, kde-format
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "" msgstr ""
#, kde-format
msgid "Translators: %1" msgid "Translators: %1"
msgstr "" msgstr ""
#, kde-format
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Select font" msgid "Select font"
msgstr "选择字体" msgstr "选择字体"
#, kde-format
msgid "Current version : %1" msgid "Current version : %1"
msgstr "" msgstr ""
#, kde-format
msgid "New version : %1" msgid "New version : %1"
msgstr "" msgstr ""
#, kde-format
msgid "Click \"Ok\" to download" msgid "Click \"Ok\" to download"
msgstr "" msgstr ""
#, kde-format
msgid "There are updates" msgid "There are updates"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "AC online" msgid "AC online"
msgstr "外接电源使用中标签" msgstr "外接电源使用中标签"
#, fuzzy, kde-format #, fuzzy
msgid "AC offline" msgid "AC offline"
msgstr "外接电源未使用标签" msgstr "外接电源未使用标签"
#, kde-format
msgid "High CPU load" msgid "High CPU load"
msgstr "" msgstr ""
#, kde-format
msgid "High GPU load" msgid "High GPU load"
msgstr "" msgstr ""
#, kde-format
msgid "Free space on %1 less than 10%" msgid "Free space on %1 less than 10%"
msgstr "" msgstr ""
#, kde-format
msgid "High memory usage" msgid "High memory usage"
msgstr "" msgstr ""
#, kde-format
msgid "Network device has been changed to %1" msgid "Network device has been changed to %1"
msgstr "" msgstr ""
#, kde-format msgid "MB/s"
msgstr ""
msgid "KB/s"
msgstr ""
msgid "Swap is used" msgid "Swap is used"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Select tag" msgid "Select tag"
msgstr "选择字体" msgstr "选择字体"
#, kde-format
msgid "Tag" msgid "Tag"
msgstr "" msgstr ""
#, kde-format
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#, kde-format
msgid "Create" msgid "Create"
msgstr "" msgstr ""
#, kde-format
msgid "Remove" msgid "Remove"
msgstr "移除" msgstr "移除"
#, kde-format
msgid "Enter file name" msgid "Enter file name"
msgstr "" msgstr ""
#, kde-format
msgid "File name" msgid "File name"
msgstr "" msgstr ""
#, kde-format
msgid "Name: %1" msgid "Name: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Comment: %1" msgid "Comment: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Identity: %1" msgid "Identity: %1"
msgstr "" msgstr ""
#, kde-format
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Comment" msgid "Comment"
msgstr "自定义命令" msgstr "自定义命令"
#, kde-format
msgid "" msgid ""
"<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the " "<html><head/><body><p>Use YAHOO! finance ticker to get quotes for the "
"instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" " "instrument. Refer to <a href=\"http://finance.yahoo.com/\"><span style=\" "
@ -490,164 +438,138 @@ msgid ""
"span></a></p></body></html>" "span></a></p></body></html>"
msgstr "" msgstr ""
#, kde-format
msgid "Ticker" msgid "Ticker"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Active" msgid "Active"
msgstr "电池使用状态提示颜色" msgstr "电池使用状态提示颜色"
#, fuzzy, kde-format #, fuzzy
msgid "Interval" msgid "Interval"
msgstr "时间周期" msgstr "时间周期"
#, fuzzy, kde-format #, fuzzy
msgid "Command" msgid "Command"
msgstr "自定义命令" msgstr "自定义命令"
#, kde-format
msgid "Prefix" msgid "Prefix"
msgstr "" msgstr ""
#, kde-format
msgid "Has output" msgid "Has output"
msgstr "" msgstr ""
#, kde-format
msgid "Redirect" msgid "Redirect"
msgstr "" msgstr ""
#, kde-format
msgid "Additional filters" msgid "Additional filters"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Wrap colors" msgid "Wrap colors"
msgstr "虚拟内存颜色" msgstr "虚拟内存颜色"
#, kde-format
msgid "Wrap spaces" msgid "Wrap spaces"
msgstr "" msgstr ""
#, kde-format msgid "Filter"
msgstr ""
msgid "Null" msgid "Null"
msgstr "" msgstr ""
#, kde-format
msgid "City" msgid "City"
msgstr "" msgstr ""
#, kde-format
msgid "Country" msgid "Country"
msgstr "" msgstr ""
#, kde-format
msgid "Timestamp" msgid "Timestamp"
msgstr "" msgstr ""
#, kde-format msgid "Use images"
msgstr ""
msgid "Value" msgid "Value"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Active color" msgid "Active color"
msgstr "电池使用状态提示颜色" msgstr "电池使用状态提示颜色"
#, fuzzy, kde-format #, fuzzy
msgid "Inactive color" msgid "Inactive color"
msgstr "电池未使用状态提示颜色" msgstr "电池未使用状态提示颜色"
#, kde-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#, kde-format
msgid "Direction" msgid "Direction"
msgstr "" msgstr ""
#, kde-format
msgid "Height" msgid "Height"
msgstr "" msgstr ""
#, kde-format
msgid "Width" msgid "Width"
msgstr "" msgstr ""
#, kde-format
msgid "Active desktop" msgid "Active desktop"
msgstr "当前激活桌面" msgstr "当前激活桌面"
#, kde-format
msgid "Inactive desktop" msgid "Inactive desktop"
msgstr "未激活桌面" msgstr "未激活桌面"
#, fuzzy, kde-format #, fuzzy
msgid "Tooltip type" msgid "Tooltip type"
msgstr "提示" msgstr "提示"
#, kde-format
msgid "contours" msgid "contours"
msgstr "" msgstr ""
#, kde-format
msgid "windows" msgid "windows"
msgstr "" msgstr ""
#, kde-format
msgid "clean desktop" msgid "clean desktop"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "names" msgid "names"
msgstr "用户名" msgstr "用户名"
#, kde-format
msgid "none" msgid "none"
msgstr "" msgstr ""
#, fuzzy, kde-format #, fuzzy
msgid "Tooltip width" msgid "Tooltip width"
msgstr "提示" msgstr "提示"
#, kde-format
msgid "Vertical layout" msgid "Vertical layout"
msgstr "" msgstr ""
#, kde-format
msgid "Mark" msgid "Mark"
msgstr "标记" msgstr "标记"
#, kde-format
msgid "Top Edge"
msgstr "顶部边缘"
#, kde-format
msgid "Bottom Edge"
msgstr "底部边缘"
#, kde-format
msgid "Left Edge"
msgstr "左端边缘"
#, fuzzy, kde-format
msgid "Right Edge"
msgstr "未知位置(%1)"
#, kde-format
msgid "Unknown location (%1)"
msgstr ""
#, kde-format
msgctxt "NAME OF TRANSLATORS" msgctxt "NAME OF TRANSLATORS"
msgid "Your names" msgid "Your names"
msgstr "用户名" msgstr "用户名"
#, kde-format
msgctxt "EMAIL OF TRANSLATORS" msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails" msgid "Your emails"
msgstr "用户邮箱" msgstr "用户邮箱"
#~ msgid "Top Edge"
#~ msgstr "顶部边缘"
#~ msgid "Bottom Edge"
#~ msgstr "底部边缘"
#~ msgid "Left Edge"
#~ msgstr "左端边缘"
#, fuzzy
#~ msgid "Right Edge"
#~ msgstr "未知位置(%1)"
#, fuzzy #, fuzzy
#~ msgid "Select color" #~ msgid "Select color"
#~ msgstr "选择字体" #~ msgstr "选择字体"

View File

@ -5,10 +5,12 @@
#define NAME "Awesome Widgets" #define NAME "Awesome Widgets"
#define VERSION "@PROJECT_VERSION@" #define VERSION "@PROJECT_VERSION@"
#define AUTHOR "@PROJECT_AUTHOR@" #define AUTHOR "@PROJECT_AUTHOR@"
#define TRANSLATORS "Ernesto Aviles Vzqz (Spanish), Mermouy (French), underr (Brazillian Portuguese), Viktor Slobodyan (Ukrainian), Lemueler (Chinese)" #define TRANSLATORS "Ernesto Aviles Vzqz (Spanish), Mermouy (French), underr (Brazillian Portuguese), Viktor Slobodyan (Ukrainian), Lemueler (Chinese), Heimen Stoffels (Dutch)"
#define EMAIL "@PROJECT_CONTACT@" #define EMAIL "@PROJECT_CONTACT@"
#define LICENSE "@PROJECT_LICENSE@" #define LICENSE "@PROJECT_LICENSE@"
#define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks" #define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks"
// configuraion
// graphical items api version // graphical items api version
#define AWGIAPI 2 #define AWGIAPI 2
// extquotes api version // extquotes api version
@ -16,12 +18,14 @@
// extscript api version // extscript api version
#define AWESAPI 3 #define AWESAPI 3
// extupgrade api version // extupgrade api version
#define AWEUAPI 2 #define AWEUAPI 3
// extweather api version // extweather api version
#define AWEWAPI 1 #define AWEWAPI 2
// available time keys
#define TIME_KEYS "dddd,ddd,dd,d,MMMM,MMM,MM,M,yyyy,yy,hh,h,HH,H,mm,m,ss,s,t,ap,a,AP,A"
// links // links
#define HOMEPAGE "http://arcanis.name/projects/awesome-widgets/" #define HOMEPAGE "https://arcanis.name/projects/awesome-widgets/"
#define REPOSITORY "https://github.com/arcan1s/awesome-widgets" #define REPOSITORY "https://github.com/arcan1s/awesome-widgets"
#define RELEASES "https://github.com/arcan1s/awesome-widgets/releases/tag/V." #define RELEASES "https://github.com/arcan1s/awesome-widgets/releases/tag/V."
#define VERSION_API "https://api.github.com/repos/arcan1s/awesome-widgets/releases" #define VERSION_API "https://api.github.com/repos/arcan1s/awesome-widgets/releases"