summaryrefslogtreecommitdiffstats
path: root/system/virt-manager/1-xmleditor_Handle_gtksourceview3_as_well_as_gtksourceview4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/virt-manager/1-xmleditor_Handle_gtksourceview3_as_well_as_gtksourceview4.patch')
-rw-r--r--system/virt-manager/1-xmleditor_Handle_gtksourceview3_as_well_as_gtksourceview4.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/system/virt-manager/1-xmleditor_Handle_gtksourceview3_as_well_as_gtksourceview4.patch b/system/virt-manager/1-xmleditor_Handle_gtksourceview3_as_well_as_gtksourceview4.patch
new file mode 100644
index 0000000000..66d5f6c82d
--- /dev/null
+++ b/system/virt-manager/1-xmleditor_Handle_gtksourceview3_as_well_as_gtksourceview4.patch
@@ -0,0 +1,32 @@
+From 033e97021e6654c9859776dedd9cd0504973f1d6 Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso@redhat.com>
+Date: Tue, 18 Jun 2019 09:46:05 -0400
+Subject: [PATCH] xmleditor: Handle gtksourceview3 as well as gtksourceview4
+
+API differences don't seem to affect our usage
+---
+ virtManager/xmleditor.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/virtManager/xmleditor.py b/virtManager/xmleditor.py
+index 9e55f83d7..e58373ecc 100644
+--- a/virtManager/xmleditor.py
++++ b/virtManager/xmleditor.py
+@@ -1,9 +1,16 @@
+ # This work is licensed under the GNU GPLv2 or later.
+ # See the COPYING file in the top-level directory.
+
++# pylint: disable=wrong-import-order,ungrouped-imports
+ import gi
+
+-gi.require_version('GtkSource', '4')
++# We can use either gtksourceview3 or gtksourceview4
++try:
++ gi.require_version("GtkSource", "4.0")
++ log.debug("Using GtkSource 4.0")
++except ValueError:
++ gi.require_version("GtkSource", "3.0")
++ log.debug("Using GtkSource 3.0")
+ from gi.repository import GtkSource
+
+ from .lib import uiutil