summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyPixie2023-04-27 20:38:41 -0300
committerShyPixie2023-04-27 20:38:41 -0300
commit0f26ef7d0eb9fbcf158305c99c55a499040fc6d6 (patch)
tree6faa51449da1cf45891acd671c8cd9929482cab7
parentb4748f95253cbf11ff07e52d2e118912e2ac5ab6 (diff)
downloadaur-0f26ef7d0eb9fbcf158305c99c55a499040fc6d6.tar.gz
Add pygobject fix to steam-tools-ng
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
-rw-r--r--steam-tools-ng-3.0.1-pygobject-fix.patch49
3 files changed, 64 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0ee5f9888858..ce13f6f37a75 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = steam-tools-ng
pkgdesc = Some useful tools for use with steam client or compatible programs, websites
pkgver = 3.0.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/calendulish/steam-tools-ng
arch = any
license = GPL
@@ -17,6 +17,8 @@ pkgbase = steam-tools-ng
depends = python-gobject
depends = gtk4
source = https://github.com/calendulish/steam-tools-ng/archive/v3.0.1.tar.gz
+ source = steam-tools-ng-3.0.1-pygobject-fix.patch
sha256sums = c0fa03ec0e9d29aa35efce30fee65fa49e9dd6ae0bda2d289dd96171afca5b01
+ sha256sums = 4817bc7b0e816fa3789f9c960b3351affd73148b839fffaa63ca0537558100f3
pkgname = steam-tools-ng
diff --git a/PKGBUILD b/PKGBUILD
index a61e6282f5f5..b81c2135630b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,24 @@
pkgname=steam-tools-ng
pkgver=3.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Some useful tools for use with steam client or compatible programs, websites"
arch=('any')
url="https://github.com/calendulish/steam-tools-ng"
depends=('python>=3.9' 'python-certifi' 'python-aiohttp' 'python-stlib>=1.3' 'python-stlib-plugins>=1.2' 'python-gobject' 'gtk4')
makedepends=('python-build' 'python-installer' 'python-wheel' 'imagemagick')
license=('GPL')
-source=("https://github.com/calendulish/$pkgname/archive/v${pkgver}.tar.gz")
-sha256sums=('c0fa03ec0e9d29aa35efce30fee65fa49e9dd6ae0bda2d289dd96171afca5b01')
+source=(
+ "https://github.com/calendulish/$pkgname/archive/v${pkgver}.tar.gz"
+ "steam-tools-ng-3.0.1-pygobject-fix.patch"
+)
+sha256sums=('c0fa03ec0e9d29aa35efce30fee65fa49e9dd6ae0bda2d289dd96171afca5b01'
+ '4817bc7b0e816fa3789f9c960b3351affd73148b839fffaa63ca0537558100f3')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 < "../steam-tools-ng-3.0.1-pygobject-fix.patch"
+}
build() {
cd $pkgname-$pkgver
diff --git a/steam-tools-ng-3.0.1-pygobject-fix.patch b/steam-tools-ng-3.0.1-pygobject-fix.patch
new file mode 100644
index 000000000000..d47bcb68ddbd
--- /dev/null
+++ b/steam-tools-ng-3.0.1-pygobject-fix.patch
@@ -0,0 +1,49 @@
+diff --git a/src/steam_tools_ng/gtk/utils.py b/src/steam_tools_ng/gtk/utils.py
+index d9e2873..54d8cc4 100644
+--- a/src/steam_tools_ng/gtk/utils.py
++++ b/src/steam_tools_ng/gtk/utils.py
+@@ -273,7 +273,13 @@ class SimpleStatus(Gtk.Frame):
+ super().__init__()
+ self._style_context = self.get_style_context()
+ self._style_provider = Gtk.CssProvider()
+- self._style_provider.load_from_data(b"frame { background-color: black; }")
++
++ # TODO: Temporary fix for pygobject (#27)
++ if (Gtk.get_major_version(), Gtk.get_minor_version()) >= (4, 9):
++ self._style_provider.load_from_data("frame { background-color: black; }", -1)
++ else:
++ self._style_provider.load_from_data(b"frame { background-color: black; }")
++
+ self._style_context.add_provider(self._style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+
+ self._grid = Gtk.Grid()
+diff --git a/src/steam_tools_ng/gtk/window.py b/src/steam_tools_ng/gtk/window.py
+index 0c3ed4a..d475aa1 100644
+--- a/src/steam_tools_ng/gtk/window.py
++++ b/src/steam_tools_ng/gtk/window.py
+@@ -46,11 +46,20 @@ class Main(Gtk.ApplicationWindow):
+ _display = Gdk.Display.get_default()
+ _style_provider = Gtk.CssProvider()
+
+- _style_provider.load_from_data(
+- b"* { border-radius: 2px; }"
+- b"label.warning { background-color: darkblue; color: white; }"
+- b"label.critical { background-color: darkred; color: white; }"
+- )
++ # TODO: Temporary fix for pygobject (#27)
++ if (Gtk.get_major_version(), Gtk.get_minor_version()) >= (4, 9):
++ _style_provider.load_from_data(
++ "* { border-radius: 2px; }"
++ "label.warning { background-color: darkblue; color: white; }"
++ "label.critical { background-color: darkred; color: white; }",
++ -1
++ )
++ else:
++ _style_provider.load_from_data(
++ b"* { border-radius: 2px; }"
++ b"label.warning { background-color: darkblue; color: white; }"
++ b"label.critical { background-color: darkred; color: white; }"
++ )
+
+ _style_context = self.get_style_context()
+