From 737759d03fe465363d9596fca7ba9c1dd53b8e5d Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Fri, 2 Jun 2017 17:33:02 +0300 Subject: [PATCH 1/4] Bug fixing * fix bug with invalid applet and configuration load with newest qt * fix bug with invalid DP configuration * fix bug with invalid HTML tags operations --- .../awesome-widget/package/contents/ui/appearance.qml | 6 +++--- sources/awesome-widget/package/contents/ui/main.qml | 6 +++--- sources/awesome-widget/package/contents/ui/qmldir | 2 +- sources/awesome-widget/package/contents/ui/widget.qml | 2 +- .../desktop-panel/package/contents/ui/activeapp.qml | 10 +++++----- .../desktop-panel/package/contents/ui/inactiveapp.qml | 6 +++--- sources/desktop-panel/package/contents/ui/main.qml | 8 ++++---- sources/desktop-panel/package/contents/ui/qmldir | 2 +- sources/desktop-panel/package/contents/ui/widget.qml | 2 +- sources/qml/AWTextEditor.qml | 8 ++++++++ sources/qml/{general.qml => General.qml} | 0 sources/qml/HtmlEditorButton.qml | 6 +++--- sources/qml/qmldir.in | 2 +- 13 files changed, 34 insertions(+), 26 deletions(-) rename sources/qml/{general.qml => General.qml} (100%) diff --git a/sources/awesome-widget/package/contents/ui/appearance.qml b/sources/awesome-widget/package/contents/ui/appearance.qml index 620ec9b..f4c9b2e 100644 --- a/sources/awesome-widget/package/contents/ui/appearance.qml +++ b/sources/awesome-widget/package/contents/ui/appearance.qml @@ -72,7 +72,7 @@ Item { ComboBoxSelector { id: fontWeight - model: general.fontWeightModel + model: General.fontWeightModel text: i18n("Font weight") value: plasmoid.configuration.fontWeight onValueEdited: cfg_fontWeight = newValue @@ -80,7 +80,7 @@ Item { ComboBoxSelector { id: fontStyle - model: general.fontStyleModel + model: General.fontStyleModel text: i18n("Font style") value: plasmoid.configuration.fontStyle onValueEdited: cfg_fontStyle = newValue @@ -94,7 +94,7 @@ Item { ComboBoxSelector { id: textStyle - model: general.textStyleModel + model: General.textStyleModel text: i18n("Style") value: plasmoid.configuration.textStyle onValueEdited: cfg_textStyle = newValue diff --git a/sources/awesome-widget/package/contents/ui/main.qml b/sources/awesome-widget/package/contents/ui/main.qml index ca0ab71..83422c2 100644 --- a/sources/awesome-widget/package/contents/ui/main.qml +++ b/sources/awesome-widget/package/contents/ui/main.qml @@ -95,16 +95,16 @@ Item { textFormat: Text.RichText wrapMode: plasmoid.configuration.wrapText ? Text.WordWrap : Text.NoWrap - horizontalAlignment: general.align[plasmoid.configuration.textAlign] + horizontalAlignment: General.align[plasmoid.configuration.textAlign] verticalAlignment: Text.AlignVCenter color: plasmoid.configuration.fontColor font.family: plasmoid.configuration.fontFamily font.italic: plasmoid.configuration.fontStyle == "italic" ? true : false font.pointSize: plasmoid.configuration.fontSize - font.weight: general.fontWeight[plasmoid.configuration.fontWeight] + font.weight: General.fontWeight[plasmoid.configuration.fontWeight] - style: general.textStyle[plasmoid.configuration.textStyle] + style: General.textStyle[plasmoid.configuration.textStyle] styleColor: plasmoid.configuration.textStyleColor PlasmaCore.ToolTipArea { diff --git a/sources/awesome-widget/package/contents/ui/qmldir b/sources/awesome-widget/package/contents/ui/qmldir index e64b8f0..2f19ff4 100644 --- a/sources/awesome-widget/package/contents/ui/qmldir +++ b/sources/awesome-widget/package/contents/ui/qmldir @@ -3,7 +3,7 @@ # common QML constants -singleton general 1.0 file:///usr/share/awesomewidgets/qml/general.qml +singleton General 1.0 file:///usr/share/awesomewidgets/qml/General.qml # custom QML UI classes AboutTab file:///usr/share/awesomewidgets/qml/AboutTab.qml diff --git a/sources/awesome-widget/package/contents/ui/widget.qml b/sources/awesome-widget/package/contents/ui/widget.qml index ad5b083..d46a827 100644 --- a/sources/awesome-widget/package/contents/ui/widget.qml +++ b/sources/awesome-widget/package/contents/ui/widget.qml @@ -58,7 +58,7 @@ Item { backend: awKeys notifyBackend: awActions textArea: textPattern - groups: general.awTagRegexp + groups: General.awTagRegexp } AWExtensions { diff --git a/sources/desktop-panel/package/contents/ui/activeapp.qml b/sources/desktop-panel/package/contents/ui/activeapp.qml index da070a8..0c51790 100644 --- a/sources/desktop-panel/package/contents/ui/activeapp.qml +++ b/sources/desktop-panel/package/contents/ui/activeapp.qml @@ -39,8 +39,8 @@ Item { property alias cfg_currentFontSize: fontSize.value property string cfg_currentFontWeight: fontWeight.value property string cfg_currentFontStyle: fontStyle.value - property alias cfg_currentFontColor: selectColor.text - property alias cfg_currentTextStyleColor: selectStyleColor.text + property alias cfg_currentFontColor: selectColor.value + property alias cfg_currentTextStyleColor: selectStyleColor.value property string cfg_currentTextStyle: textStyle.value @@ -65,7 +65,7 @@ Item { ComboBoxSelector { id: fontWeight - model: general.fontWeightModel + model: General.fontWeightModel text: i18n("Font weight") value: plasmoid.configuration.currentFontWeight onValueEdited: cfg_currentFontWeight = newValue @@ -73,7 +73,7 @@ Item { ComboBoxSelector { id: fontStyle - model: general.fontStyleModel + model: General.fontStyleModel text: i18n("Font style") value: plasmoid.configuration.currentFontStyle onValueEdited: cfg_currentFontStyle = newValue @@ -87,7 +87,7 @@ Item { ComboBoxSelector { id: textStyle - model: general.textStyleModel + model: General.textStyleModel text: i18n("Style") value: plasmoid.configuration.currentTextStyle onValueEdited: cfg_currentTextStyle = newValue diff --git a/sources/desktop-panel/package/contents/ui/inactiveapp.qml b/sources/desktop-panel/package/contents/ui/inactiveapp.qml index 7174d9a..6e04fed 100644 --- a/sources/desktop-panel/package/contents/ui/inactiveapp.qml +++ b/sources/desktop-panel/package/contents/ui/inactiveapp.qml @@ -65,7 +65,7 @@ Item { ComboBoxSelector { id: fontWeight - model: general.fontWeightModel + model: General.fontWeightModel text: i18n("Font weight") value: plasmoid.configuration.fontWeight onValueEdited: cfg_fontWeight = newValue @@ -73,7 +73,7 @@ Item { ComboBoxSelector { id: fontStyle - model: general.fontStyleModel + model: General.fontStyleModel text: i18n("Font style") value: plasmoid.configuration.fontStyle onValueEdited: cfg_fontStyle = newValue @@ -87,7 +87,7 @@ Item { ComboBoxSelector { id: textStyle - model: general.textStyleModel + model: General.textStyleModel text: i18n("Style") value: plasmoid.configuration.textStyle onValueEdited: cfg_textStyle = newValue diff --git a/sources/desktop-panel/package/contents/ui/main.qml b/sources/desktop-panel/package/contents/ui/main.qml index 8847dfe..fcdf154 100644 --- a/sources/desktop-panel/package/contents/ui/main.qml +++ b/sources/desktop-panel/package/contents/ui/main.qml @@ -123,16 +123,16 @@ Item { repeater.itemAt(i).font.family = plasmoid.configuration.currentFontFamily repeater.itemAt(i).font.italic = plasmoid.configuration.currentFontStyle == "italic" ? true : false repeater.itemAt(i).font.pointSize = plasmoid.configuration.currentFontSize - repeater.itemAt(i).font.weight = general.fontWeight[plasmoid.configuration.currentFontWeight] - repeater.itemAt(i).style = general.textStyle[plasmoid.configuration.currentTextStyle] + repeater.itemAt(i).font.weight = General.fontWeight[plasmoid.configuration.currentFontWeight] + repeater.itemAt(i).style = General.textStyle[plasmoid.configuration.currentTextStyle] repeater.itemAt(i).styleColor = plasmoid.configuration.currentTextStyleColor } else { repeater.itemAt(i).color = plasmoid.configuration.fontColor repeater.itemAt(i).font.family = plasmoid.configuration.fontFamily repeater.itemAt(i).font.italic = plasmoid.configuration.fontStyle == "italic" ? true : false repeater.itemAt(i).font.pointSize = plasmoid.configuration.fontSize - repeater.itemAt(i).font.weight = general.fontWeight[plasmoid.configuration.fontWeight] - repeater.itemAt(i).style = general.textStyle[plasmoid.configuration.textStyle] + repeater.itemAt(i).font.weight = General.fontWeight[plasmoid.configuration.fontWeight] + repeater.itemAt(i).style = General.textStyle[plasmoid.configuration.textStyle] repeater.itemAt(i).styleColor = plasmoid.configuration.textStyleColor } repeater.itemAt(i).update() diff --git a/sources/desktop-panel/package/contents/ui/qmldir b/sources/desktop-panel/package/contents/ui/qmldir index e64b8f0..2f19ff4 100644 --- a/sources/desktop-panel/package/contents/ui/qmldir +++ b/sources/desktop-panel/package/contents/ui/qmldir @@ -3,7 +3,7 @@ # common QML constants -singleton general 1.0 file:///usr/share/awesomewidgets/qml/general.qml +singleton General 1.0 file:///usr/share/awesomewidgets/qml/General.qml # custom QML UI classes AboutTab file:///usr/share/awesomewidgets/qml/AboutTab.qml diff --git a/sources/desktop-panel/package/contents/ui/widget.qml b/sources/desktop-panel/package/contents/ui/widget.qml index 66ab15b..683419e 100644 --- a/sources/desktop-panel/package/contents/ui/widget.qml +++ b/sources/desktop-panel/package/contents/ui/widget.qml @@ -52,7 +52,7 @@ Item { backend: dpAdds notifyBackend: dpAdds textArea: textPattern - groups: general.dpTagRegexp + groups: General.dpTagRegexp } AWTextEditor { diff --git a/sources/qml/AWTextEditor.qml b/sources/qml/AWTextEditor.qml index 793b326..568391b 100644 --- a/sources/qml/AWTextEditor.qml +++ b/sources/qml/AWTextEditor.qml @@ -90,6 +90,14 @@ Item { function insert(text) { textArea.insert(textArea.cursorPosition, text) } + + function removeSelection() { + textArea.remove(textArea.selectionStart, textArea.selectionEnd) + } + + function selectedText() { + return textArea.selectedText + } } diff --git a/sources/qml/general.qml b/sources/qml/General.qml similarity index 100% rename from sources/qml/general.qml rename to sources/qml/General.qml diff --git a/sources/qml/HtmlEditorButton.qml b/sources/qml/HtmlEditorButton.qml index 588d73d..b5c17ed 100644 --- a/sources/qml/HtmlEditorButton.qml +++ b/sources/qml/HtmlEditorButton.qml @@ -31,10 +31,10 @@ QtControls.Button { function updateText() { // get selected text - var selected = textField.selectedText + var selected = textField.selectedText() // remove it from widget - textField.remove(textField.selectionStart, textField.selectionEnd) + textField.removeSelection() // insert edited text - textField.insert(textField.cursorPosition, start + selected + end) + textField.insert(start + selected + end) } } diff --git a/sources/qml/qmldir.in b/sources/qml/qmldir.in index ab26eb6..ea537a8 100644 --- a/sources/qml/qmldir.in +++ b/sources/qml/qmldir.in @@ -3,7 +3,7 @@ # common QML constants -singleton general 1.0 file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/general.qml +singleton General 1.0 file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/General.qml # custom QML UI classes AboutTab file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/AboutTab.qml From fe88c72498452b9593408396e352eadbac7ecc0e Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Fri, 2 Jun 2017 17:35:35 +0300 Subject: [PATCH 2/4] release 3.3.2 --- packages/PKGBUILD | 4 ++-- sources/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/PKGBUILD b/packages/PKGBUILD index 0dee00d..fc014b4 100644 --- a/packages/PKGBUILD +++ b/packages/PKGBUILD @@ -2,7 +2,7 @@ pkgname=plasma5-applet-awesome-widgets _pkgname=awesome-widgets -pkgver=3.3.1 +pkgver=3.3.2 pkgrel=1 pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)" arch=('i686' 'x86_64') @@ -17,7 +17,7 @@ optdepends=("catalyst: for GPU monitor" makedepends=('cmake' 'extra-cmake-modules' 'python') source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) install=${pkgname}.install -md5sums=('306027b017f940c9c5eaffb65ff82a7f') +md5sums=('4b2e9fc192539e47c3545f89331703c3') backup=('etc/xdg/plasma-dataengine-extsysmon.conf') prepare() { diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 5859e7c..f012425 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -15,7 +15,7 @@ set(PROJECT_CONTACT "esalexeev@gmail.com") set(PROJECT_LICENSE "GPL3") set(PROJECT_VERSION_MAJOR "3") set(PROJECT_VERSION_MINOR "3") -set(PROJECT_VERSION_PATCH "1") +set(PROJECT_VERSION_PATCH "2") set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") # append git version if any set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "") From 1702045550443206a364b8735ad2042e15cb4773 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Fri, 2 Jun 2017 17:38:27 +0300 Subject: [PATCH 3/4] update changelog --- CHANGELOG | 5 +++++ packages/PKGBUILD | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 1b652dc..481a189 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Ver.3.3.2: +- fix bug with invalid DP colour configuration +- fix bug with invalid HTML tags operation +* update to newest Qt and plasma + Ver.3.3.1: + add ability to direct issue report (#104) + add key completion (#105) diff --git a/packages/PKGBUILD b/packages/PKGBUILD index fc014b4..34e20d3 100644 --- a/packages/PKGBUILD +++ b/packages/PKGBUILD @@ -17,7 +17,7 @@ optdepends=("catalyst: for GPU monitor" makedepends=('cmake' 'extra-cmake-modules' 'python') source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) install=${pkgname}.install -md5sums=('4b2e9fc192539e47c3545f89331703c3') +md5sums=('490c62c8085e532f9428f7534eff5ddd') backup=('etc/xdg/plasma-dataengine-extsysmon.conf') prepare() { From 1a7530a8473c45fd4f92d15c7e8b90a90b196a7d Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Fri, 2 Jun 2017 17:46:37 +0300 Subject: [PATCH 4/4] commit metadata files too --- sources/awesome-widget/package/metadata.desktop | 2 +- sources/desktop-panel/package/metadata.desktop | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/awesome-widget/package/metadata.desktop b/sources/awesome-widget/package/metadata.desktop index e410dcb..286ef22 100644 --- a/sources/awesome-widget/package/metadata.desktop +++ b/sources/awesome-widget/package/metadata.desktop @@ -20,7 +20,7 @@ X-Plasma-RemoteLocation= X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget -X-KDE-PluginInfo-Version=3.3.1 +X-KDE-PluginInfo-Version=3.3.2 X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/ X-KDE-PluginInfo-Category=System Information X-KDE-PluginInfo-Depends= diff --git a/sources/desktop-panel/package/metadata.desktop b/sources/desktop-panel/package/metadata.desktop index 9aa3a7c..daef904 100644 --- a/sources/desktop-panel/package/metadata.desktop +++ b/sources/desktop-panel/package/metadata.desktop @@ -20,7 +20,7 @@ X-Plasma-RemoteLocation= X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel -X-KDE-PluginInfo-Version=3.3.1 +X-KDE-PluginInfo-Version=3.3.2 X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/ X-KDE-PluginInfo-Category=System Information X-KDE-PluginInfo-Depends=