[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/39: gnu: grantleetheme: Update to 21.12.3.
From: |
guix-commits |
Subject: |
08/39: gnu: grantleetheme: Update to 21.12.3. |
Date: |
Thu, 1 Sep 2022 11:36:40 -0400 (EDT) |
mbakke pushed a commit to branch staging
in repository guix.
commit 568d1676490ec766bcf199025e56ecd945dec286
Author: Petr Hodina <phodina@protonmail.com>
AuthorDate: Tue Jun 21 04:56:08 2022 +0200
gnu: grantleetheme: Update to 21.12.3.
* gnu/packages/kde.scm (grantleetheme): Update to 21.12.3.
* gnu/local.mk: Remove patch.
* gnu/packages/patches/grantlee-merge-theme-dirs.patch: Remove file.
Signed-off-by: Marius Bakke <marius@gnu.org>
---
gnu/local.mk | 1 -
gnu/packages/kde.scm | 5 +-
.../patches/grantlee-merge-theme-dirs.patch | 163 ---------------------
3 files changed, 2 insertions(+), 167 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index b20d16b8a6..b8722c0a37 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1240,7 +1240,6 @@ dist_patch_DATA =
\
%D%/packages/patches/gpm-glibc-2.26.patch \
%D%/packages/patches/gpodder-disable-updater.patch \
%D%/packages/patches/gpsbabel-fix-i686-test.patch \
- %D%/packages/patches/grantlee-merge-theme-dirs.patch \
%D%/packages/patches/grep-timing-sensitive-test.patch \
%D%/packages/patches/grfcodec-gcc-compat.patch \
%D%/packages/patches/gromacs-tinyxml2.patch \
diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index f187c02ba4..d83018934d 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -124,15 +124,14 @@ This package contains GUI widgets for baloo.")
(define-public grantleetheme
(package
(name "grantleetheme")
- (version "20.04.1")
+ (version "21.12.3")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://kde/stable/release-service/" version
"/src/grantleetheme-" version ".tar.xz"))
(sha256
- (base32 "0gabc5cb0sf00s7m5v2jnq55qsrdbrq6nqd15y1i15p788zifsjx"))
- (patches (search-patches "grantlee-merge-theme-dirs.patch"))))
+ (base32 "1w83slbkj2y1wk78srq2k95ybs66sb4mbaa0zm7fl9pkwhqxbnb7"))))
(build-system qt-build-system)
(arguments `(#:tests? #f)) ; unexpected error in the test suite.
(native-inputs
diff --git a/gnu/packages/patches/grantlee-merge-theme-dirs.patch
b/gnu/packages/patches/grantlee-merge-theme-dirs.patch
deleted file mode 100644
index 96a15a387b..0000000000
--- a/gnu/packages/patches/grantlee-merge-theme-dirs.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Taken from nixpkgs, see
-grantleetheme: merge themes across multiple prefixes
-<https://github.com/NixOS/nixpkgs/commits/master/pkgs/applications/kde/grantleetheme/grantlee-merge-theme-dirs.patch>
-
-
-diff --git a/src/grantleetheme.cpp b/src/grantleetheme.cpp
-index 27d5bc8..8d43140 100644
---- a/src/grantleetheme.cpp
-+++ b/src/grantleetheme.cpp
-@@ -46,7 +46,7 @@ ThemePrivate::ThemePrivate(const ThemePrivate &other)
- , description(other.description)
- , name(other.name)
- , dirName(other.dirName)
-- , absolutePath(other.absolutePath)
-+ , absolutePaths(other.absolutePaths)
- , author(other.author)
- , email(other.email)
- , loader(other.loader)
-@@ -64,12 +64,15 @@ void ThemePrivate::setupEngine()
-
- void ThemePrivate::setupLoader()
- {
-- // Get the parent dir with themes, we set the theme directory separately
-- QDir dir(absolutePath);
-- dir.cdUp();
-+ QStringList templateDirs;
-+ for (const QString& path : absolutePaths) {
-+ QDir dir(path);
-+ dir.cdUp();
-+ templateDirs << dir.absolutePath();
-+ }
-
- loader =
QSharedPointer<GrantleeTheme::QtResourceTemplateLoader>::create();
-- loader->setTemplateDirs({ dir.absolutePath() });
-+ loader->setTemplateDirs(templateDirs);
- loader->setTheme(dirName);
-
- if (!sEngine) {
-@@ -121,7 +124,7 @@ Theme::Theme(const QString &themePath, const QString
&dirName, const QString &de
- KConfigGroup group(&config, QStringLiteral("Desktop Entry"));
- if (group.isValid()) {
- d->dirName = dirName;
-- d->absolutePath = themePath;
-+ d->absolutePaths = QStringList(themePath);
- d->name = group.readEntry("Name", QString());
- d->description = group.readEntry("Description", QString());
- d->themeFileName = group.readEntry("FileName", QString());
-@@ -140,7 +143,7 @@ Theme::~Theme()
-
- bool Theme::operator==(const Theme &other) const
- {
-- return isValid() && other.isValid() && d->absolutePath ==
other.absolutePath();
-+ return isValid() && other.isValid() && d->absolutePaths ==
other.absolutePaths();
- }
-
- Theme &Theme::operator=(const Theme &other)
-@@ -184,7 +187,15 @@ QString Theme::dirName() const
-
- QString Theme::absolutePath() const
- {
-- return d->absolutePath;
-+ if (! d->absolutePaths.isEmpty()) {
-+ return d->absolutePaths.first();
-+ };
-+ return QString();
-+}
-+
-+QStringList Theme::absolutePaths() const
-+{
-+ return d->absolutePaths;
- }
-
- QString Theme::author() const
-@@ -223,6 +231,13 @@ QString Theme::render(const QString &templateName, const
QVariantHash &data, con
- return result;
- }
-
-+void Theme::addThemeDir(const QString& path)
-+{
-+ QDir dir(path);
-+ dir.cdUp();
-+ d->absolutePaths << dir.absolutePath();
-+}
-+
- void Theme::addPluginPath(const QString &path)
- {
- if (!ThemePrivate::sEngine) {
-diff --git a/src/grantleetheme.h b/src/grantleetheme.h
-index a25c27b..be38299 100644
---- a/src/grantleetheme.h
-+++ b/src/grantleetheme.h
-@@ -48,11 +48,14 @@ public:
- Q_REQUIRED_RESULT QStringList displayExtraVariables() const;
- Q_REQUIRED_RESULT QString dirName() const;
- Q_REQUIRED_RESULT QString absolutePath() const;
-+ Q_REQUIRED_RESULT QStringList absolutePaths() const;
- Q_REQUIRED_RESULT QString author() const;
- Q_REQUIRED_RESULT QString authorEmail() const;
-
- Q_REQUIRED_RESULT QString render(const QString &templateName, const
QVariantHash &data, const QByteArray &applicationDomain = QByteArray());
-
-+ void addThemeDir(const QString&);
-+
- static void addPluginPath(const QString &path);
-
- private:
-diff --git a/src/grantleetheme_p.h b/src/grantleetheme_p.h
-index eb73dcb..00510e9 100644
---- a/src/grantleetheme_p.h
-+++ b/src/grantleetheme_p.h
-@@ -43,7 +43,7 @@ public:
- QString description;
- QString name;
- QString dirName;
-- QString absolutePath;
-+ QStringList absolutePaths;
- QString author;
- QString email;
-
-diff --git a/src/grantleethememanager.cpp b/src/grantleethememanager.cpp
-index 606d717..dc99041 100644
---- a/src/grantleethememanager.cpp
-+++ b/src/grantleethememanager.cpp
-@@ -125,25 +125,18 @@ public:
-
- for (const QString &directory : qAsConst(themesDirectories)) {
- QDirIterator dirIt(directory, QStringList(), QDir::AllDirs |
QDir::NoDotAndDotDot);
-- QStringList alreadyLoadedThemeName;
- while (dirIt.hasNext()) {
- dirIt.next();
- const QString dirName = dirIt.fileName();
- GrantleeTheme::Theme theme = q->loadTheme(dirIt.filePath(),
dirName, defaultDesktopFileName);
- if (theme.isValid()) {
- QString themeName = theme.name();
-- if (alreadyLoadedThemeName.contains(themeName)) {
-- int i = 2;
-- const QString originalName(theme.name());
-- while (alreadyLoadedThemeName.contains(themeName)) {
-- themeName = originalName + QStringLiteral("
(%1)").arg(i);
-- ++i;
-- }
-- theme.d->name = themeName;
-+ QMap<QString, GrantleeTheme::Theme>::iterator i =
themes.find(dirName);
-+ if (i != themes.end()) {
-+ i.value().addThemeDir(dirIt.filePath());
-+ } else {
-+ themes.insert(dirName, theme);
- }
-- alreadyLoadedThemeName << themeName;
-- themes.insert(dirName, theme);
-- //qDebug()<<" theme.name()"<<theme.name();
- }
- }
- watch->addDir(directory);
-@@ -366,7 +359,7 @@ QString ThemeManager::pathFromThemes(const QString
&themesRelativePath, const QS
- GrantleeTheme::Theme theme = loadTheme(dirIt.filePath(),
dirName, defaultDesktopFileName);
- if (theme.isValid()) {
- if (dirName == themeName) {
-- return theme.absolutePath();
-+ return theme.absolutePaths().first();
- }
- }
- }
- branch staging updated (c4ce54055a -> a38889b14d), guix-commits, 2022/09/01
- 02/39: gnu: KDE Frameworks: Remove trailing booleans., guix-commits, 2022/09/01
- 10/39: gnu: KDE-PIM: Remove trailing booleans., guix-commits, 2022/09/01
- 01/39: gnu: KDE Frameworks: Update all packages to 5.92.0, guix-commits, 2022/09/01
- 07/39: gnu: KDE Plasma: Update all packages to 5.24.4., guix-commits, 2022/09/01
- 08/39: gnu: grantleetheme: Update to 21.12.3.,
guix-commits <=
- 09/39: gnu: KDE PIM: Update all packages to 21.12.3., guix-commits, 2022/09/01
- 06/39: gnu: phonon: Update home page., guix-commits, 2022/09/01
- 12/39: gnu: KDE: Update home-page links., guix-commits, 2022/09/01
- 11/39: gnu: KDE: Update all packages to 21.12.3., guix-commits, 2022/09/01
- 03/39: gnu: plasma-framework: Remove input labels., guix-commits, 2022/09/01
- 05/39: gnu: kfilemetadata: Remove input labels., guix-commits, 2022/09/01
- 04/39: gnu: kio: Remove input labels., guix-commits, 2022/09/01
- 14/39: gnu: KDE Internet: Update all packages to 21.12.3., guix-commits, 2022/09/01
- 13/39: gnu: Remove libraw-0.18., guix-commits, 2022/09/01
- 16/39: gnu: KDE Utils: Update all packages to 21.12.3., guix-commits, 2022/09/01