diff --git a/.gitignore b/.gitignore index 78a131f..a48d31b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/background-logo-extension-40.rc.tar.xz +background-logo-extension-47.alpha.tar.xz diff --git a/.gnome-shell-extension-background-logo.metadata b/.gnome-shell-extension-background-logo.metadata deleted file mode 100644 index 5c878b4..0000000 --- a/.gnome-shell-extension-background-logo.metadata +++ /dev/null @@ -1 +0,0 @@ -9fd1c98a8e561a7f316619d251e23cfbd6229668 SOURCES/background-logo-extension-40.rc.tar.xz diff --git a/SOURCES/0001-Adjust-default-values-for-RHEL.patch b/SOURCES/0001-Adjust-default-values-for-RHEL.patch deleted file mode 100644 index cef5503..0000000 --- a/SOURCES/0001-Adjust-default-values-for-RHEL.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ca8d41f48b41f181e86804b940b2737b4255e4ef Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Mon, 28 Feb 2022 13:49:34 +0100 -Subject: [PATCH] Adjust default values for RHEL - ---- - .../org.fedorahosted.background-logo-extension.gschema.xml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/schemas/org.fedorahosted.background-logo-extension.gschema.xml b/schemas/org.fedorahosted.background-logo-extension.gschema.xml -index 74bc3a8..f7e8f07 100644 ---- a/schemas/org.fedorahosted.background-logo-extension.gschema.xml -+++ b/schemas/org.fedorahosted.background-logo-extension.gschema.xml -@@ -13,7 +13,7 @@ - - -- '/usr/share/fedora-logos/fedora_lightbackground.svg' -+ '/usr/share/redhat-logos/fedora_logo_darkbackground.svg' - Logo file - The full logo file path - -@@ -29,7 +29,7 @@ - - - -- 9.0 -+ 15.0 - Logo size - The logo size in percent relative to the screen width - --- -2.35.1 - diff --git a/SOURCES/0001-Support-positioning-at-the-top.patch b/SOURCES/0001-Support-positioning-at-the-top.patch deleted file mode 100644 index 0374b36..0000000 --- a/SOURCES/0001-Support-positioning-at-the-top.patch +++ /dev/null @@ -1,135 +0,0 @@ -From ff01583cb7eb00cbe012011b3de34298243787bc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Tue, 8 Feb 2022 13:41:18 +0100 -Subject: [PATCH] Support positioning at the top - -Fedora has always placed the logo at the bottom, but for RHEL the -placement will likely be at the top. ---- - extension.js | 30 ++++++++----------- - prefs.js | 30 +++++++++---------- - ...sted.background-logo-extension.gschema.xml | 6 +++- - 3 files changed, 33 insertions(+), 33 deletions(-) - -diff --git a/extension.js b/extension.js -index d1bf35b..8255617 100644 ---- a/extension.js -+++ b/extension.js -@@ -166,26 +166,22 @@ class BackgroundLogo extends St.Widget { - - _updatePosition() { - let xAlign, yAlign; -- switch (this._settings.get_string('logo-position')) { -- case 'center': -- xAlign = Clutter.ActorAlign.CENTER; -- yAlign = Clutter.ActorAlign.CENTER; -- break; -- case 'bottom-left': -+ const position = this._settings.get_string('logo-position'); -+ if (position.endsWith('left')) - xAlign = Clutter.ActorAlign.START; -- yAlign = Clutter.ActorAlign.END; -- break; -- case 'bottom-center': -- xAlign = Clutter.ActorAlign.CENTER; -- yAlign = Clutter.ActorAlign.END; -- break; -- case 'bottom-right': -+ else if (position.endsWith('right')) - xAlign = Clutter.ActorAlign.END; -+ else -+ xAlign = Clutter.ActorAlign.CENTER; -+ -+ if (position.startsWith('top')) -+ yAlign = Clutter.ActorAlign.START; -+ else if (position.startsWith('bottom')) - yAlign = Clutter.ActorAlign.END; -- break; -- } -- this._bin.x_align = xAlign; -- this._bin.y_align = yAlign; -+ else -+ yAlign = Clutter.ActorAlign.CENTER; -+ -+ this._bin.set({ xAlign, yAlign }); - } - - _updateBorder() { -diff --git a/prefs.js b/prefs.js -index a2ce27a..c8d5903 100644 ---- a/prefs.js -+++ b/prefs.js -@@ -76,6 +76,9 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid { - comboBox.append('bottom-left', 'Bottom left'); - comboBox.append('bottom-center', 'Bottom center'); - comboBox.append('bottom-right', 'Bottom right'); -+ comboBox.append('top-left', 'Top left'); -+ comboBox.append('top-center', 'Top center'); -+ comboBox.append('top-right', 'Top right'); - this._settings.bind('logo-position', - comboBox, 'active-id', - Gio.SettingsBindFlags.DEFAULT); -@@ -196,24 +199,21 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid { - _getLogoPosition(width, height) { - let scaledBorder = this._settings.get_uint('logo-border'); - let x, y; -- switch (this._settings.get_string('logo-position')) { -- case 'center': -- x = (width - this._logo.get_width()) / 2; -- y = (height - this._logo.get_height()) / 2; -- break; -- case 'bottom-left': -+ const position = this._settings.get_string('logo-position'); -+ if (position.endsWith('left')) - x = scaledBorder; -- y = height - this._logo.get_height() - scaledBorder; -- break; -- case 'bottom-center': -+ else if (position.endsWith('right')) -+ x = (width - this._logo.get_width() - scaledBorder); -+ else - x = (width - this._logo.get_width()) / 2; -+ -+ if (position.startsWith('top')) -+ y = scaledBorder; -+ else if (position.startsWith('bottom')) - y = height - this._logo.get_height() - scaledBorder; -- break; -- case 'bottom-right': -- x = width - this._logo.get_width() - scaledBorder; -- y = height - this._logo.get_height() - scaledBorder; -- break; -- } -+ else -+ y = (height - this._logo.get_height()) / 2; -+ - return [x, y]; - } - -diff --git a/schemas/org.fedorahosted.background-logo-extension.gschema.xml b/schemas/org.fedorahosted.background-logo-extension.gschema.xml -index abacefb..74bc3a8 100644 ---- a/schemas/org.fedorahosted.background-logo-extension.gschema.xml -+++ b/schemas/org.fedorahosted.background-logo-extension.gschema.xml -@@ -5,6 +5,9 @@ - - - -+ -+ -+ - - - Logo position - - The position logo of the logo; valid values are 'center', -- 'bottom-left', 'bottom-center' and 'bottom-right' -+ 'bottom-left', 'bottom-center', 'bottom-right', -+ 'top-left', 'top-center' and 'top-right' - - - --- -2.33.1 - diff --git a/SOURCES/0001-prefs-Scale-preview-border.patch b/SOURCES/0001-prefs-Scale-preview-border.patch deleted file mode 100644 index 05cbd59..0000000 --- a/SOURCES/0001-prefs-Scale-preview-border.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ab86a3469bca9246ba5a6039d0cce8c6afae1fc9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Tue, 15 Feb 2022 15:25:43 +0100 -Subject: [PATCH] prefs: Scale preview border - -We currently pick up the settings value directly, which is the -border that is used on the actual (i.e. monitor-sized) background. - -That's way too big when applied as-is on the preview, so assume a -common monitor size and compute an appropriate scale from that. ---- - prefs.js | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/prefs.js b/prefs.js -index c8d5903..ba78322 100644 ---- a/prefs.js -+++ b/prefs.js -@@ -13,6 +13,7 @@ const ExtensionUtils = imports.misc.extensionUtils; - - const BACKGROUND_SCHEMA = 'org.gnome.desktop.background'; - -+const MONITOR_WIDTH = 1920; - const PREVIEW_WIDTH = 400; - - let BackgroundLogoPrefsWidget = GObject.registerClass( -@@ -197,7 +198,9 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid { - } - - _getLogoPosition(width, height) { -- let scaledBorder = this._settings.get_uint('logo-border'); -+ const previewScale = PREVIEW_WIDTH / MONITOR_WIDTH; -+ const scaledBorder = -+ previewScale * this._settings.get_uint('logo-border'); - let x, y; - const position = this._settings.get_string('logo-position'); - if (position.endsWith('left')) --- -2.33.1 - diff --git a/SOURCES/32.patch b/SOURCES/32.patch deleted file mode 100644 index d1d4dfc..0000000 --- a/SOURCES/32.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 423119599c7a98dc51dda6e5260c992e21438d60 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Mar 31 2021 16:40:10 +0000 -Subject: extension: Do not relayout on scale changes - - -This makes the background logo position flicker as we enter the -overview. This actor is part of the BackgroundActor actor hierarchy, -and can be left to scale neatly with it. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1943938 - ---- - -diff --git a/extension.js b/extension.js -index d1bf35b..edf2868 100644 ---- a/extension.js -+++ b/extension.js -@@ -25,13 +25,6 @@ var IconContainer = GObject.registerClass( - class IconContainer extends St.Widget { - _init(params) { - super._init(params); -- -- this.connect('notify::scale-x', () => { -- this.queue_relayout(); -- }); -- this.connect('notify::scale-y', () => { -- this.queue_relayout(); -- }); - } - - vfunc_get_preferred_width(forHeight) { - diff --git a/SPECS/gnome-shell-extension-background-logo.spec b/gnome-shell-extension-background-logo.spec similarity index 67% rename from SPECS/gnome-shell-extension-background-logo.spec rename to gnome-shell-extension-background-logo.spec index f2f4261..8629fc1 100644 --- a/SPECS/gnome-shell-extension-background-logo.spec +++ b/gnome-shell-extension-background-logo.spec @@ -1,14 +1,24 @@ -%global shell_version 40.rc -%global upstream_version 40.rc +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +%global tarball_version %%(echo %{version} | tr '~' '.') +%global shell_version %%(cut -d "." -f 1 <<<%{version}) Name: gnome-shell-extension-background-logo -Version: 40.0~rc -Release: 4%{?dist} +Version: 47~alpha +Release: %autorelease Summary: Background logo extension for GNOME Shell -License: GPLv2+ +License: GPL-2.0-or-later URL: https://pagure.io/background-logo-extension -Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{upstream_version}.tar.xz +Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{tarball_version}.tar.xz BuildArch: noarch BuildRequires: meson @@ -18,19 +28,11 @@ BuildRequires: git Requires: gnome-shell >= %{shell_version} Requires: system-logos -Patch0: 0001-Adjust-default-values-for-RHEL.patch - -# https://pagure.io/background-logo-extension/pull-request/32 -Patch1: 32.patch - -Patch2: 0001-Support-positioning-at-the-top.patch -Patch3: 0001-prefs-Scale-preview-border.patch - %description Show your pride! Display the Fedora logo (or any other graphic) in the corner of your desktop. %prep -%autosetup -n background-logo-extension-%{upstream_version} -S git +%autosetup -n background-logo-extension-%{tarball_version} -S git %build %meson @@ -45,13 +47,66 @@ Show your pride! Display the Fedora logo (or any other graphic) in the corner of %{_datadir}/gnome-shell/extensions/background-logo@fedorahosted.org/ %changelog -* Mon Feb 28 2022 Florian Müllner - 40.0~rc-4 -- Adjust default values for RHEL - Resolves: #2057150 +## START: Generated by rpmautospec +* Tue Jul 23 2024 Florian Müllner - 47~alpha-1 +- Update to 47.alpha -* Tue Feb 22 2022 Florian Müllner - 40.0~rc-3 -- Backport support for top positioning in RHEL - Related: #2052594 +* Wed Jun 26 2024 Tomas Pelka - 46.0-3 +- Add gating.yaml via API + +* Mon Jun 24 2024 Troy Dawson - 46.0-2 +- Bump release for June 2024 mass rebuild + +* Thu Apr 11 2024 Florian Müllner - 46.0-1 +- Backport changes from F40 + +* Mon Jan 29 2024 Fedora Release Engineering - 45~beta-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 45~beta-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 45~beta-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Dec 13 2023 Miroslav Suchý - 45~beta-2 +- Migrate to SPDX license + +* Mon Aug 07 2023 Florian Müllner - 45~beta-1 +- Update to 45.beta + +* Wed Jul 19 2023 Fedora Release Engineering - 44.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Mar 20 2023 Florian Müllner - 44.0-1 +- Update to 44.0 + +* Tue Feb 14 2023 Florian Müllner - 44~beta-1 +- Update to 44.beta + +* Thu Jan 19 2023 Fedora Release Engineering - 43.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Sep 17 2022 Florian Müllner - 43.0-1 +- Update to 43.0 + +* Thu Jul 21 2022 Fedora Release Engineering - 42.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Apr 04 2022 Florian Müllner - 42.0-1 +- Update to 42.0 + +* Tue Feb 15 2022 Florian Müllner - 42~beta-1 +- Update to 42.beta + +* Thu Jan 20 2022 Fedora Release Engineering - 41.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Sep 29 2021 Florian Müllner - 41.0-1 +- Update to 41.0 + +* Thu Jul 22 2021 Fedora Release Engineering - 40.0~rc-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Mar 31 2021 Michael Catanzaro - 40.0~rc-2 - Fix logo flickering @@ -212,3 +267,5 @@ Show your pride! Display the Fedora logo (or any other graphic) in the corner of * Fri Nov 07 2014 Kalev Lember - 3.14.0-1 - Initial Fedora packaging + +## END: Generated by rpmautospec diff --git a/sources b/sources new file mode 100644 index 0000000..2585a2e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (background-logo-extension-47.alpha.tar.xz) = 07e79049eefbeedf1d22431944d31ef4e94844f806ba2f82870c70281b6af98b2782668e5db75a24d9bd95a343ec27e2335eec930827fbca47161b7b9d442cf0