mirror of
				https://github.com/arcan1s/awesome-widgets.git
				synced 2025-10-31 05:13:40 +00:00 
			
		
		
		
	release 3.1.0
This commit is contained in:
		
							
								
								
									
										21
									
								
								CHANGELOG
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								CHANGELOG
									
									
									
									
									
								
							| @ -1,3 +1,24 @@ | ||||
| Ver.3.1.0: | ||||
| + implement templates support (#71) | ||||
| + implement special functions (#71) | ||||
| + special directory for configs (#72) | ||||
| + custom bar images (#80) | ||||
| + custom bar values (#80) | ||||
| + show changelog after updates | ||||
| + add Polish translation (thanks to Mariusz Kocoń) | ||||
| + use Qt-5.6 features | ||||
| - fix invalid tooltip resize in desktop panel (#74) | ||||
| - fix graphical items blinking (#81) | ||||
| - drop tasks and move to native QProcess to avoid crash (#83) | ||||
| - the newest Qt (5.6) fixes | ||||
| - the newest Plasma fixes | ||||
| * move from OWM to Yahoo! Weather (#73) | ||||
| * improve performance by using optimized subscriptions (#75) | ||||
| * improve performance by storing QVariant instead of frequent casting (#75) | ||||
| * change bar names semantic to the simplest one (#80, breaking changes) | ||||
| * high memory usage notifications have been changed from 90 to 80 perc | ||||
| * a large part of refactoring | ||||
|  | ||||
| Ver.3.0.1: | ||||
| + add patches for old Qt versions | ||||
| - drop `nullptr` checking | ||||
|  | ||||
							
								
								
									
										21
									
								
								CHANGELOG-RU
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								CHANGELOG-RU
									
									
									
									
									
								
							| @ -1,3 +1,24 @@ | ||||
| Вер.3.1.0: | ||||
| + добавлена поддержка шаблонов (#71) | ||||
| + добавлена поддержка специальных функций (#71) | ||||
| + добавлена отдельная директория для настроек (#72) | ||||
| + произвольные картинки для баров (#80) | ||||
| + произвольные значения для баров (#80) | ||||
| + показывать ченджлог после обновления | ||||
| + добавлен польский перевод (спасибо Mariusz Kocoń) | ||||
| + использование Qt-5.6 плюшек | ||||
| - исправлено неправильное обновление размера тултипа в desktop panel (#74) | ||||
| - исправлено мигание баров (#81) | ||||
| - убрано использование tasks в пользу QProcess, чтобы избежать падения (#83) | ||||
| - исправления, вызванные новым Qt (5.6) | ||||
| - исправления, вызванные новой Plasma | ||||
| * вместо OWM теперь используется Yahoo! Weather (#73) | ||||
| * улучшена производительность путем оптимизированной подписки (#75) | ||||
| * улучшена производительность путем хранения QVariant вместо частых кастов (#75) | ||||
| * изменен принцип наименования баров (#80, ломает совместимость) | ||||
| * уведомление о большом использовании памяти изменено с 90 на 80 процентов | ||||
| * много рефакторинга | ||||
|  | ||||
| Вер.3.0.1: | ||||
| + добавлены патчи для старых версий Qt | ||||
| - убрана проверка на nullptr | ||||
|  | ||||
| @ -11,8 +11,8 @@ git submodule update --init --recursive | ||||
|  | ||||
| # build widget | ||||
| ARCHIVE="awesome-widgets" | ||||
| FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING patches" | ||||
| IGNORELIST="build usr .kdev4 *.kdev4 .idea" | ||||
| FILES="AUTHORS CHANGELOG CHANGELOG-RU COPYING packages patches" | ||||
| IGNORELIST="build usr .kdev4 *.kdev4 .idea packages/*src.tar.xz" | ||||
| # create archive | ||||
| [[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz" | ||||
| [[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}" | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
|  | ||||
| pkgname=plasma5-applet-awesome-widgets | ||||
| _pkgname=awesome-widgets | ||||
| pkgver=3.0.1 | ||||
| pkgver=3.1.0 | ||||
| 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') | ||||
| source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) | ||||
| install=${pkgname}.install | ||||
| md5sums=('6e17215102a4965b0167c5de0c9a5222') | ||||
| md5sums=('08d1c0b3995ae6003a5b552a7ae7b93d') | ||||
| backup=('etc/xdg/plasma-dataengine-extsysmon.conf') | ||||
|  | ||||
| prepare() { | ||||
|  | ||||
| @ -24,24 +24,12 @@ diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/p | ||||
| index e5b9861..eb73073 100644 | ||||
| --- a/sources/awesome-widget/plugin/awkeys.cpp | ||||
| +++ b/sources/awesome-widget/plugin/awkeys.cpp | ||||
| @@ -439,7 +439,7 @@ void AWKeys::dataUpdated(const QString &sourceName, | ||||
| @@ -439,4 +439,4 @@ void AWKeys::dataUpdated(const QString &sourceName, | ||||
|   | ||||
|  #ifdef BUILD_FUTURE | ||||
|      // run concurrent data update | ||||
| -    QtConcurrent::run(m_threadPool, this, &AWKeys::setDataBySource, sourceName, | ||||
| +    QtConcurrent::run(this, &AWKeys::setDataBySource, sourceName, | ||||
|                        data); | ||||
|  #else  /* BUILD_FUTURE */ | ||||
|      return setDataBySource(sourceName, data); | ||||
| @@ -564,7 +564,7 @@ void AWKeys::reinitKeys() | ||||
|  void AWKeys::updateTextData() | ||||
|  { | ||||
|  #ifdef BUILD_FUTURE | ||||
| -    QFuture<QString> text = QtConcurrent::run(m_threadPool, [this]() { | ||||
| +    QFuture<QString> text = QtConcurrent::run([this]() { | ||||
|          calculateValues(); | ||||
|          return parsePattern(m_pattern); | ||||
|      }); | ||||
| diff --git a/sources/libraries.cmake b/sources/libraries.cmake | ||||
| index 33192f7..46e2b1e 100644 | ||||
| --- a/sources/libraries.cmake | ||||
|  | ||||
| @ -10,7 +10,7 @@ index 01bcd58..1ec7ba6 100644 | ||||
|   | ||||
|  import org.kde.plasma.private.awesomewidget 1.0 | ||||
|   | ||||
| @@ -372,31 +371,7 @@ Item { | ||||
| @@ -372,32 +371,7 @@ Item { | ||||
|              QtControls.Button { | ||||
|                  width: parent.width * 3 / 5 | ||||
|                  text: i18n("Export configuration") | ||||
| @ -21,6 +21,7 @@ index 01bcd58..1ec7ba6 100644 | ||||
| -                id: saveConfigAs | ||||
| -                selectExisting: false | ||||
| -                title: i18n("Export") | ||||
| -                folder: awConfig.configurationDirectory() | ||||
| -                onAccepted: { | ||||
| -                    var status = awConfig.exportConfiguration( | ||||
| -                        plasmoid.configuration, | ||||
| @ -43,7 +44,7 @@ index 01bcd58..1ec7ba6 100644 | ||||
|              } | ||||
|          } | ||||
|   | ||||
| @@ -410,41 +385,9 @@ Item { | ||||
| @@ -410,42 +385,9 @@ Item { | ||||
|              QtControls.Button { | ||||
|                  width: parent.width * 3 / 5 | ||||
|                  text: i18n("Import configuration") | ||||
| @ -53,6 +54,7 @@ index 01bcd58..1ec7ba6 100644 | ||||
| -            QtDialogs.FileDialog { | ||||
| -                id: openConfig | ||||
| -                title: i18n("Import") | ||||
| -                folder: awConfig.configurationDirectory() | ||||
| -                onAccepted: importSelection.open() | ||||
| -            } | ||||
| - | ||||
| @ -219,9 +221,9 @@ index 6263b30..5f61d2a 100644 | ||||
|      // extensions | ||||
| -    if (importExtensions) { | ||||
| +    if (selection[QString("extensions")]) { | ||||
|          foreach (QString item, m_dirs) { | ||||
|          for (auto item : m_dirs) { | ||||
|              settings.beginGroup(item); | ||||
|              foreach (QString it, settings.childGroups()) | ||||
|              for (auto it : settings.childGroups()) | ||||
| @@ -121,7 +139,7 @@ QVariantMap AWConfigHelper::importConfiguration(const QString fileName, | ||||
|      } | ||||
|   | ||||
| @ -238,7 +240,7 @@ index 6263b30..5f61d2a 100644 | ||||
| -    if (importPlasmoid) { | ||||
| +    if (selection[QString("plasmoid")]) { | ||||
|          settings.beginGroup(QString("plasmoid")); | ||||
|          foreach (QString key, settings.childKeys()) | ||||
|          for (auto key : settings.childKeys()) | ||||
|              configuration[key] = settings.value(key); | ||||
| @@ -261,6 +279,50 @@ void AWConfigHelper::readFile(QSettings &settings, const QString key, | ||||
|  } | ||||
| @ -295,9 +297,10 @@ diff --git a/sources/awesome-widget/plugin/awconfighelper.h b/sources/awesome-wi | ||||
| index 912ac3d..dc51dfb 100644 | ||||
| --- a/sources/awesome-widget/plugin/awconfighelper.h | ||||
| +++ b/sources/awesome-widget/plugin/awconfighelper.h | ||||
| @@ -33,12 +33,8 @@ public: | ||||
| @@ -33,13 +33,9 @@ public: | ||||
|      explicit AWConfigHelper(QObject *parent = nullptr); | ||||
|      virtual ~AWConfigHelper(); | ||||
|      Q_INVOKABLE QString configurationDirectory() const; | ||||
|      Q_INVOKABLE bool dropCache() const; | ||||
| -    Q_INVOKABLE bool exportConfiguration(QObject *nativeConfig, | ||||
| -                                         const QString fileName) const; | ||||
| @ -322,10 +325,11 @@ diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/p | ||||
| index e5b9861..039d24e 100644 | ||||
| --- a/sources/awesome-widget/plugin/awkeys.cpp | ||||
| +++ b/sources/awesome-widget/plugin/awkeys.cpp | ||||
| @@ -324,6 +324,13 @@ QStringList AWKeys::getHddDevices() const | ||||
| @@ -324,6 +324,14 @@ QStringList AWKeys::getHddDevices() const | ||||
|  } | ||||
|   | ||||
|   | ||||
| +#include <QInputDialog> | ||||
| +QString AWKeys::graphicalKey() const | ||||
| +{ | ||||
| +    return QInputDialog::getItem(nullptr, i18n("Select tag"), QString(), | ||||
| @ -335,7 +339,7 @@ index e5b9861..039d24e 100644 | ||||
| + | ||||
|  QString AWKeys::infoByKey(QString key) const | ||||
|  { | ||||
|      qCDebug(LOG_AW) << "Requested key" << key; | ||||
|      qCDebug(LOG_AW) << "Requested info for key" << key; | ||||
| diff --git a/sources/awesome-widget/plugin/awkeys.h b/sources/awesome-widget/plugin/awkeys.h | ||||
| index a8300f1..8edc3bd 100644 | ||||
| --- a/sources/awesome-widget/plugin/awkeys.h | ||||
|  | ||||
| @ -11,19 +11,21 @@ index f808d03..a056b3f 100644 | ||||
|  #include "version.h" | ||||
|   | ||||
| diff --git a/sources/awdebug.h b/sources/awdebug.h | ||||
| index 48dc580..530c0d6 100644 | ||||
| index 43944ce..c679281 100644 | ||||
| --- a/sources/awdebug.h | ||||
| +++ b/sources/awdebug.h | ||||
| @@ -23,9 +23,9 @@ | ||||
| @@ -21,9 +21,13 @@ | ||||
|   | ||||
|  #include <QLoggingCategory> | ||||
|   | ||||
| +#ifndef qCInfo | ||||
| +#define qCInfo qCDebug | ||||
| +#endif | ||||
| + | ||||
|  #ifndef LOG_FORMAT | ||||
|  #define LOG_FORMAT                                                             \ | ||||
| -    "[%{time process}][%{if-debug}DD%{endif}%{if-info}II%{endif}%{if-"         \ | ||||
| -    "warning}WW%{endif}%{if-critical}CC%{endif}%{if-fatal}FF%{endif}][%{"      \ | ||||
| -    "category}][%{function}] %{message}" | ||||
| +    "[%{time process}][%{if-debug}DD%{endif}%{if-warning}WW%{endif}%{if-"      \ | ||||
| +    "critical}CC%{endif}%{if-fatal}FF%{endif}][%{category}][%{function}] "     \ | ||||
| +    "%{message}" | ||||
| +    "[%{time process}][%{if-debug}DD%{endif}%{if-"         \ | ||||
|      "warning}WW%{endif}%{if-critical}CC%{endif}%{if-fatal}FF%{endif}][%{"      \ | ||||
|      "category}][%{function}] %{message}" | ||||
|  #endif /* LOG_FORMAT */ | ||||
|   | ||||
|  // redefine info because it doesn't log properly | ||||
|  | ||||
							
								
								
									
										134
									
								
								patches/qt5.6-qversionnumber.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										134
									
								
								patches/qt5.6-qversionnumber.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,134 @@ | ||||
| diff --git a/sources/awesome-widget/plugin/awupdatehelper.cpp b/sources/awesome-widget/plugin/awupdatehelper.cpp | ||||
| index 3698602..42871c8 100644 | ||||
| --- a/sources/awesome-widget/plugin/awupdatehelper.cpp | ||||
| +++ b/sources/awesome-widget/plugin/awupdatehelper.cpp | ||||
| @@ -37,7 +37,7 @@ AWUpdateHelper::AWUpdateHelper(QObject *parent) | ||||
|  { | ||||
|      qCDebug(LOG_AW) << __PRETTY_FUNCTION__; | ||||
|   | ||||
| -    m_foundVersion = QVersionNumber::fromString(VERSION); | ||||
| +    m_foundVersion = QString(VERSION); | ||||
|      m_genericConfig = QString("%1/awesomewidgets/general.ini") | ||||
|                            .arg(QStandardPaths::writableLocation( | ||||
|                                QStandardPaths::GenericDataLocation)); | ||||
| @@ -69,14 +69,14 @@ void AWUpdateHelper::checkUpdates(const bool showAnyway) | ||||
|  bool AWUpdateHelper::checkVersion() | ||||
|  { | ||||
|      QSettings settings(m_genericConfig, QSettings::IniFormat); | ||||
| -    QVersionNumber version = QVersionNumber::fromString( | ||||
| -        settings.value(QString("Version"), QString(VERSION)).toString()); | ||||
| +    QString version | ||||
| +        = settings.value(QString("Version"), QString(VERSION)).toString(); | ||||
|      // update version | ||||
|      settings.setValue(QString("Version"), QString(VERSION)); | ||||
|      settings.sync(); | ||||
|   | ||||
|      qCInfo(LOG_AW) << "Found version" << version << "actual one is" << VERSION; | ||||
| -    if (version != QVersionNumber::fromString(VERSION)) { | ||||
| +    if (version != QString(VERSION)) { | ||||
|          genMessageBox(i18n("Changelog of %1", QString(VERSION)), | ||||
|                        QString(CHANGELOG).replace(QChar('@'), QChar('\n')), | ||||
|                        QMessageBox::Ok) | ||||
| @@ -90,12 +90,11 @@ bool AWUpdateHelper::checkVersion() | ||||
|  } | ||||
|   | ||||
|   | ||||
| -void AWUpdateHelper::showInfo(const QVersionNumber version) | ||||
| +void AWUpdateHelper::showInfo(const QString version) | ||||
|  { | ||||
|      qCDebug(LOG_AW) << "Version" << version; | ||||
|   | ||||
| -    QString text | ||||
| -        = i18n("You are using the actual version %1", version.toString()); | ||||
| +    QString text = i18n("You are using the actual version %1", version); | ||||
|      if (!QString(COMMIT_SHA).isEmpty()) | ||||
|          text += QString(" (%1)").arg(QString(COMMIT_SHA)); | ||||
|      return genMessageBox(i18n("No new version found"), text, QMessageBox::Ok) | ||||
| @@ -103,7 +102,7 @@ void AWUpdateHelper::showInfo(const QVersionNumber version) | ||||
|  } | ||||
|   | ||||
|   | ||||
| -void AWUpdateHelper::showUpdates(const QVersionNumber version) | ||||
| +void AWUpdateHelper::showUpdates(const QString version) | ||||
|  { | ||||
|      qCDebug(LOG_AW) << "Version" << version; | ||||
|   | ||||
| @@ -112,7 +111,7 @@ void AWUpdateHelper::showUpdates(const QVersionNumber version) | ||||
|      text += QString(COMMIT_SHA).isEmpty() | ||||
|                  ? QString("\n") | ||||
|                  : QString(" (%1)\n").arg(QString(COMMIT_SHA)); | ||||
| -    text += i18n("New version : %1", version.toString()) + QString("\n\n"); | ||||
| +    text += i18n("New version : %1", version) + QString("\n\n"); | ||||
|      text += i18n("Click \"Ok\" to download"); | ||||
|   | ||||
|      genMessageBox(i18n("There are updates"), text, | ||||
| @@ -128,8 +127,7 @@ void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button) | ||||
|   | ||||
|      switch (ret) { | ||||
|      case QMessageBox::Ok: | ||||
| -        QDesktopServices::openUrl(QString(RELEASES) | ||||
| -                                  + m_foundVersion.toString()); | ||||
| +        QDesktopServices::openUrl(QString(RELEASES) + m_foundVersion); | ||||
|          break; | ||||
|      case QMessageBox::Cancel: | ||||
|      default: | ||||
| @@ -157,14 +155,23 @@ void AWUpdateHelper::versionReplyRecieved(QNetworkReply *reply, | ||||
|      QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap(); | ||||
|      QString version = firstRelease[QString("tag_name")].toString(); | ||||
|      version.remove(QString("V.")); | ||||
| -    m_foundVersion = QVersionNumber::fromString(version); | ||||
| +    m_foundVersion = version; | ||||
|      qCInfo(LOG_AW) << "Update found version to" << m_foundVersion; | ||||
|   | ||||
| -    QVersionNumber oldVersion = QVersionNumber::fromString(VERSION); | ||||
| -    if (oldVersion < m_foundVersion) | ||||
| -        return showUpdates(m_foundVersion); | ||||
| +    // FIXME: possible there is a better way to check versions | ||||
| +    int old_major = QString(VERSION).split(QChar('.')).at(0).toInt(); | ||||
| +    int old_minor = QString(VERSION).split(QChar('.')).at(1).toInt(); | ||||
| +    int old_patch = QString(VERSION).split(QChar('.')).at(2).toInt(); | ||||
| +    int new_major = version.split(QChar('.')).at(0).toInt(); | ||||
| +    int new_minor = version.split(QChar('.')).at(1).toInt(); | ||||
| +    int new_patch = version.split(QChar('.')).at(2).toInt(); | ||||
| +    if ((old_major < new_major) | ||||
| +        || ((old_major == new_major) && (old_minor < new_minor)) | ||||
| +        || ((old_major == new_major) && (old_minor == new_minor) | ||||
| +            && (old_patch < new_patch))) | ||||
| +        return showUpdates(version); | ||||
|      else if (showAnyway) | ||||
| -        return showInfo(m_foundVersion); | ||||
| +        return showInfo(version); | ||||
|  } | ||||
|   | ||||
|   | ||||
| diff --git a/sources/awesome-widget/plugin/awupdatehelper.h b/sources/awesome-widget/plugin/awupdatehelper.h | ||||
| index 359cdb2..9c6a42d 100644 | ||||
| --- a/sources/awesome-widget/plugin/awupdatehelper.h | ||||
| +++ b/sources/awesome-widget/plugin/awupdatehelper.h | ||||
| @@ -21,7 +21,6 @@ | ||||
|   | ||||
|  #include <QMessageBox> | ||||
|  #include <QObject> | ||||
| -#include <QVersionNumber> | ||||
|   | ||||
|   | ||||
|  class QNetworkReply; | ||||
| @@ -37,15 +36,15 @@ public: | ||||
|      bool checkVersion(); | ||||
|   | ||||
|  private slots: | ||||
| -    void showInfo(const QVersionNumber version); | ||||
| -    void showUpdates(const QVersionNumber version); | ||||
| +    void showInfo(const QString version); | ||||
| +    void showUpdates(const QString version); | ||||
|      void userReplyOnUpdates(QAbstractButton *button); | ||||
|      void versionReplyRecieved(QNetworkReply *reply, const bool showAnyway); | ||||
|   | ||||
|  private: | ||||
|      QMessageBox *genMessageBox(const QString title, const QString body, | ||||
|                                 const QMessageBox::StandardButtons buttons); | ||||
| -    QVersionNumber m_foundVersion; | ||||
| +    QString m_foundVersion; | ||||
|      QString m_genericConfig; | ||||
|  }; | ||||
|   | ||||
| @ -14,8 +14,8 @@ set(PROJECT_AUTHOR "Evgeniy Alekseev") | ||||
| set(PROJECT_CONTACT "esalexeev@gmail.com") | ||||
| set(PROJECT_LICENSE "GPL3") | ||||
| set(PROJECT_VERSION_MAJOR "3") | ||||
| set(PROJECT_VERSION_MINOR "0") | ||||
| set(PROJECT_VERSION_PATCH "1") | ||||
| set(PROJECT_VERSION_MINOR "1") | ||||
| set(PROJECT_VERSION_PATCH "0") | ||||
| 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 "") | ||||
|  | ||||
		Reference in New Issue
	
	Block a user