Add patch to fix Python 3 related issues with layout selection from Debian

https://bugs.debian.org/921824
This commit is contained in:
Markus Frosch 2019-02-28 21:15:11 +01:00 committed by Markus Frosch
parent 294a64df77
commit 04ba955b38
2 changed files with 3 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class LayoutLauncher:
"""Update the contents of the layout"""
self.layouttreestore.clear()
layouts = self.config.list_layouts()
for layout in sorted(layouts, cmp=lambda x,y: cmp(x.lower(), y.lower())):
for layout in sorted(layouts, key=str.lower):
if layout != "default":
self.layouttreestore.append([layout])
else:

View File

@ -3,6 +3,7 @@
# GPL v2 only
"""notebook.py - classes for the notebook widget"""
from functools import cmp_to_key
from gi.repository import GObject
from gi.repository import Gtk
from gi.repository import Gdk
@ -100,7 +101,7 @@ class Notebook(Container, Gtk.Notebook):
num = 0
keys = list(children.keys())
keys.sort(child_compare)
keys = sorted(keys, key=cmp_to_key(child_compare))
for child_key in keys:
child = children[child_key]