File gedit-plugins-fix-terminal-change-directory.patch of Package gedit-plugins.17005

From 037349942a37394f27145b88bd3d26b18c2911bd Mon Sep 17 00:00:00 2001
From: Sebastien Lafargue <slafargue@gnome.org>
Date: Tue, 4 Sep 2018 18:39:18 +0200
Subject: [PATCH] Terminal plugin: fix vte_terminal_feed_child calls

Since 0.52, the Vte signature for vte_terminal_feed_child
binding has changed:

https://gitlab.gnome.org/GNOME/vte/commit/a1cd4a4e6e00022a6d874cef92980160973a9c01

The terminal plugin does not have strong vte-2.91 version requirement
but org.gnoe.Platform 3.30 use vte-2.91 0.53 so
we can validate the change.

FIX #1
---
 plugins/terminal/terminal.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/terminal/terminal.py b/plugins/terminal/terminal.py
index 84024279..8a7e9f14 100644
--- a/plugins/terminal/terminal.py
+++ b/plugins/terminal/terminal.py
@@ -70,7 +70,8 @@ class GeditTerminal(Vte.Terminal):
 
     def do_drag_data_received(self, drag_context, x, y, data, info, time):
         if info == self.TARGET_URI_LIST:
-            self.feed_child(' '.join(["'" + Gio.file_new_for_uri(item).get_path() + "'" for item in Gedit.utils_drop_get_uris(data)]), -1)
+            self.feed_child(' '.join(["'" + Gio.file_new_for_uri(item).get_path() + "'" for item in Gedit.utils_drop_get_uris(data)]).encode('utf-8'))
+            print ("ok")
             Gtk.drag_finish(drag_context, True, False, time);
         else:
             Vte.Terminal.do_drag_data_received(self, drag_context, x, y, data, info, time)
@@ -296,7 +297,7 @@ class GeditTerminalPanel(Gtk.Box):
 
     def change_directory(self, path):
         path = path.replace('\\', '\\\\').replace('"', '\\"')
-        self._vte.feed_child('cd "%s"\n' % path, -1)
+        self._vte.feed_child(('cd "%s"\n' % path).encode('utf-8'))
         self._vte.grab_focus()
 
 class TerminalPlugin(GObject.Object, Gedit.WindowActivatable):
-- 
GitLab

openSUSE Build Service is sponsored by