[arch-commits] Commit in lutris/trunk (PKGBUILD sort_new_with_model_fix.patch)

Filipe Laíns ffy00 at archlinux.org
Tue Feb 18 12:44:00 UTC 2020


    Date: Tuesday, February 18, 2020 @ 12:43:58
  Author: ffy00
Revision: 575837

minor fix (0.5.4-2)

Added:
  lutris/trunk/sort_new_with_model_fix.patch
Modified:
  lutris/trunk/PKGBUILD

-------------------------------+
 PKGBUILD                      |   14 +++++++++++---
 sort_new_with_model_fix.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-18 12:43:51 UTC (rev 575836)
+++ PKGBUILD	2020-02-18 12:43:58 UTC (rev 575837)
@@ -4,7 +4,7 @@
 
 pkgname=lutris
 pkgver=0.5.4
-pkgrel=1
+pkgrel=2
 pkgdesc='Open Gaming Platform'
 arch=('any')
 url='https://lutris.net'
@@ -17,9 +17,17 @@
             'vulkan-icd-loader: Vulkan support'
             'lib32-vulkan-icd-loader: Vulkan support')
 makedepends=('python-setuptools')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/lutris/lutris/archive/v$pkgver.tar.gz")
-sha512sums=('758c2a854912e29ac579c2030ec118e406db97aa0ecb9be394b2910e48e19c87a774972299b0c83e73fb57e8db3c98a2c52d1545e8071e378d3aff263d325cc4')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/lutris/lutris/archive/v$pkgver.tar.gz"
+        'sort_new_with_model_fix.patch')
+sha512sums=('758c2a854912e29ac579c2030ec118e406db97aa0ecb9be394b2910e48e19c87a774972299b0c83e73fb57e8db3c98a2c52d1545e8071e378d3aff263d325cc4'
+            '4c80024c47ae7165a57d94b4421bf8d61b926b5957b231570b0b2b3489d88ac08b1b16ba337ce9bc50174aa057987764363a42465af643286e5dd9cdce16e5d9')
 
+prepare() {
+  cd $pkgname-$pkgver
+
+  patch -p1 -i ../sort_new_with_model_fix.patch
+}
+
 build() {
   cd $pkgname-$pkgver
 

Added: sort_new_with_model_fix.patch
===================================================================
--- sort_new_with_model_fix.patch	                        (rev 0)
+++ sort_new_with_model_fix.patch	2020-02-18 12:43:58 UTC (rev 575837)
@@ -0,0 +1,26 @@
+From 12a458db3c590c3f1972594e091a24cb4d65b610 Mon Sep 17 00:00:00 2001
+From: Mathieu Comandon <strycore at gmail.com>
+Date: Wed, 1 Jan 2020 12:47:55 -0800
+Subject: [PATCH] Support both sort_new_with_model and new_with_model
+
+---
+ lutris/gui/views/store.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lutris/gui/views/store.py b/lutris/gui/views/store.py
+index 9e843e9e4..8fe5decf5 100644
+--- a/lutris/gui/views/store.py
++++ b/lutris/gui/views/store.py
+@@ -140,7 +140,11 @@ def __init__(
+         self.prevent_sort_update = False  # prevent recursion with signals
+         self.modelfilter = self.store.filter_new()
+         self.modelfilter.set_visible_func(self.filter_view)
+-        self.modelsort = Gtk.TreeModelSort.sort_new_with_model(self.modelfilter)
++        try:
++            self.modelsort = Gtk.TreeModelSort.sort_new_with_model(self.modelfilter)
++        except AttributeError:
++            # Apparently some API breaking changes on GTK minor versions.
++            self.modelsort = Gtk.TreeModelSort.new_with_model(self.modelfilter)
+         self.modelsort.connect("sort-column-changed", self.on_sort_column_changed)
+         self.modelsort.set_sort_func(sort_col, sort_func, sort_col)
+         self.sort_view(sort_key, sort_ascending)



More information about the arch-commits mailing list