[gedit/gnome-3-36] snippets plugin: use gtk_source_file_get_location()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-36] snippets plugin: use gtk_source_file_get_location()
- Date: Thu, 19 Mar 2020 11:38:58 +0000 (UTC)
commit b91cb9aa9b56fae74942912adc51d15c80ae979b
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Mar 19 12:04:24 2020 +0100
snippets plugin: use gtk_source_file_get_location()
Not gedit_document_get_location() which was deprecated and then removed.
Fixes https://gitlab.gnome.org/GNOME/gedit/issues/272
plugins/snippets/snippets/document.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/snippets/snippets/document.py b/plugins/snippets/snippets/document.py
index eb20225e1..19dcf696b 100644
--- a/plugins/snippets/snippets/document.py
+++ b/plugins/snippets/snippets/document.py
@@ -438,7 +438,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
if isinstance(toplevel, Gedit.Window):
for doc in toplevel.get_documents():
- r = self.location_uri_for_env(doc.get_location())
+ r = self.location_uri_for_env(doc.get_file().get_location())
if isinstance(r, dict):
documents_uri['utf8'].append(r['utf8'])
@@ -457,7 +457,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
if isinstance(toplevel, Gedit.Window):
for doc in toplevel.get_documents():
- r = self.location_path_for_env(doc.get_location())
+ r = self.location_path_for_env(doc.get_file().get_location())
if isinstance(r, dict):
documents_path['utf8'].append(r['utf8'])
@@ -497,7 +497,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
environ['utf8'][var] = v
environ['noenc'][var] = str(v)
- self.env_add_for_location(environ, buf.get_location(), 'GEDIT_CURRENT_DOCUMENT')
+ self.env_add_for_location(environ, buf.get_file().get_location(), 'GEDIT_CURRENT_DOCUMENT')
return environ
@@ -881,7 +881,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
self.env_add_for_location(environ, gfile, 'GEDIT_DROP_DOCUMENT')
buf = self.view.get_buffer()
- location = buf.get_location()
+ location = buf.get_file().get_location()
relpath = location.get_relative_path(gfile)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]