[gedit] Fixed relative document path for snippets drop target
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fixed relative document path for snippets drop target
- Date: Fri, 9 Apr 2010 13:59:44 +0000 (UTC)
commit b0a402df19fa276c61a5fc2fc96c8e742f029d12
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Fri Apr 9 15:59:36 2010 +0200
Fixed relative document path for snippets drop target
plugins/snippets/snippets/Document.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/snippets/snippets/Document.py b/plugins/snippets/snippets/Document.py
index 422a722..9f0d543 100644
--- a/plugins/snippets/snippets/Document.py
+++ b/plugins/snippets/snippets/Document.py
@@ -879,8 +879,9 @@ class Document:
os.environ['GEDIT_DROP_DOCUMENT_TYPE'] = mime
buf = self.view.get_buffer()
- filename = self.env_get_document_path(buf)
- os.environ['GEDIT_DROP_DOCUMENT_RELATIVE_PATH'] = self.relative_path(filename, uri, mime)
+ relpath = self.relative_path(buf.get_uri() or "", uri, mime)
+
+ os.environ['GEDIT_DROP_DOCUMENT_RELATIVE_PATH'] = relpath
mark = buf.get_mark('gtk_drag_target')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]