[meld] sourceview: Fix PangoLayout.set_text() usage for older pygobject (#488)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] sourceview: Fix PangoLayout.set_text() usage for older pygobject (#488)
- Date: Mon, 20 Jul 2020 07:47:11 +0000 (UTC)
commit e4d4d05e7b1a0e7f08e50d28f5f8c2a0507d099c
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon Jul 20 17:43:48 2020 +1000
sourceview: Fix PangoLayout.set_text() usage for older pygobject (#488)
This override wasn't added until pygobject 3.31.1. Since it's a very
minor convenience, it doesn't seem worth bumping our version requirement
just for this.
meld/sourceview.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/sourceview.py b/meld/sourceview.py
index 0c93ed87..0e1a9dc4 100644
--- a/meld/sourceview.py
+++ b/meld/sourceview.py
@@ -216,7 +216,7 @@ class MeldSourceView(GtkSource.View, SourceViewHelperMixin):
if not getattr(self, '_approx_line_height', None):
context = self.get_pango_context()
layout = Pango.Layout(context)
- layout.set_text('X')
+ layout.set_text('X', -1)
_width, self._approx_line_height = layout.get_pixel_size()
return self._approx_line_height
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]