Extra guarding against crashy gtk functions. Closes LP#1089190

This commit is contained in:
Chris Jones 2013-01-30 10:53:53 +00:00
parent b609914cc1
commit abf0dbfd8c
1 changed files with 3 additions and 2 deletions

View File

@ -903,8 +903,9 @@ class Terminal(gtk.VBox):
def on_drag_motion(self, widget, drag_context, x, y, _time, _data): def on_drag_motion(self, widget, drag_context, x, y, _time, _data):
"""*shrug*""" """*shrug*"""
if gtk.targets_include_text(drag_context.targets) or \ if not drag_context.targets == ['vte'] and \
gtk.targets_include_uri(drag_context.targets): (gtk.targets_include_text(drag_context.targets) or \
gtk.targets_include_uri(drag_context.targets)):
# copy text from another widget # copy text from another widget
return return
srcwidget = drag_context.get_source_widget() srcwidget = drag_context.get_source_widget()