mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2026-10-22 18:02:08 +03:00
Use tkinter's clipboard handling instead of xclip on linux
This commit is contained in:
1 file changed
+3
-7
@@ -341,13 +341,9 @@ class SpanshRouter():
|
|||||||
logger.warning(''.join('!! ' + line for line in lines))
|
logger.warning(''.join('!! ' + line for line in lines))
|
||||||
|
|
||||||
def copy_waypoint(self):
|
def copy_waypoint(self):
|
||||||
if sys.platform == "linux" or sys.platform == "linux2":
|
self.parent.clipboard_clear()
|
||||||
command = subprocess.Popen(["echo", "-n", self.next_stop], stdout=subprocess.PIPE)
|
self.parent.clipboard_append(self.next_stop)
|
||||||
subprocess.Popen(["xclip", "-selection", "c"], stdin=command.stdout)
|
self.parent.update()
|
||||||
else:
|
|
||||||
self.parent.clipboard_clear()
|
|
||||||
self.parent.clipboard_append(self.next_stop)
|
|
||||||
self.parent.update()
|
|
||||||
|
|
||||||
def goto_next_waypoint(self):
|
def goto_next_waypoint(self):
|
||||||
if self.offset < self.route.__len__()-1:
|
if self.offset < self.route.__len__()-1:
|
||||||
|
|||||||
Reference in new issue
Block a user