[pyzo] 37/68: Add copy path entry to editor context menu
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Sep 28 09:47:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository pyzo.
commit 9ccf75c00ba89f80a6ea8d1b0682c782b5932440
Author: Almar Klein <almar.klein at gmail.com>
Date: Fri Sep 16 00:17:36 2016 +0200
Add copy path entry to editor context menu
---
pyzo/core/menu.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyzo/core/menu.py b/pyzo/core/menu.py
index fbd70b2..9375527 100644
--- a/pyzo/core/menu.py
+++ b/pyzo/core/menu.py
@@ -1214,6 +1214,8 @@ class EditorTabContextMenu(Menu):
icons.page_delete_all, self._fileAction, "close_all")
self.addItem(translate("menu", "Rename ::: Rename this file."),
None, self._fileAction, "rename")
+ self.addItem(translate("menu", "Copy path ::: Copy the full path of this file."),
+ None, self._fileAction, "copypath")
self.addSeparator()
# todo: remove feature to pin files?
@@ -1253,6 +1255,9 @@ class EditorTabContextMenu(Menu):
os.remove(filename)
except Exception:
pass
+ elif action == 'copypath':
+ filename = item.filename
+ QtGui.qApp.clipboard().setText(filename)
elif action == "pin":
item._pinned = not item._pinned
elif action == "main":
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyzo.git
More information about the debian-science-commits
mailing list