Unquote filenames dragged onto the terminal

This commit is contained in:
Chris Jones 2009-12-01 22:57:54 +00:00
parent 9abbeaa0c3
commit 40e0814a12

View File

@ -19,7 +19,7 @@
import pygtk import pygtk
pygtk.require ("2.0") pygtk.require ("2.0")
import gobject, gtk, pango import gobject, gtk, pango
import os, signal, sys, subprocess, pwd, re import os, signal, sys, subprocess, pwd, re, urllib2
#import version details #import version details
from terminatorlib.version import * from terminatorlib.version import *
@ -544,7 +544,7 @@ text/plain
#print "%s %s" % (selection_data.type, selection_data.target) #print "%s %s" % (selection_data.type, selection_data.target)
txt = selection_data.data.strip() txt = selection_data.data.strip()
if txt[0:7] == "file://": if txt[0:7] == "file://":
txt = "'%s'" % txt[7:] txt = "'%s'" % urllib2.unquote(txt[7:])
for term in self.get_target_terms(): for term in self.get_target_terms():
term._vte.feed_child(txt) term._vte.feed_child(txt)
return return