[meld/Python3] ui.notebook: Handle more 3.20 CSS breakage



commit df83035b6531adb8153fbdb00141fb4e3cd1bbcc
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jul 24 07:47:13 2016 +1000

    ui.notebook: Handle more 3.20 CSS breakage

 meld/ui/notebook.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/meld/ui/notebook.py b/meld/ui/notebook.py
index 1624c7f..f10a585 100644
--- a/meld/ui/notebook.py
+++ b/meld/ui/notebook.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 Kai Willadsen <kai willadsen gmail com>
+# Copyright (C) 2015-2016 Kai Willadsen <kai willadsen gmail com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,10 +34,14 @@ class MeldNotebook(Gtk.Notebook):
         'page-label-changed': (0, None, (GObject.TYPE_STRING,)),
     }
 
-    css = b"""
+    # Python 3.4; no bytes formatting
+    css = (
+        b"""
         @binding-set TabSwitchBindings {}
-        MeldNotebook { gtk-key-bindings: TabSwitchBindings; }
-    """
+        MeldNotebook { """ +
+        (b"" if Gtk.get_minor_version() <= 18 else b"-") +
+        b"gtk-key-bindings: TabSwitchBindings; }"
+    )
 
     ui = """
         <?xml version="1.0" encoding="UTF-8"?>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]