add a little safety
This commit is contained in:
parent
80ff07095a
commit
9b8394b701
@ -871,7 +871,7 @@ class Terminator:
|
|||||||
self.on_destroy_event (parent, gtk.gdk.Event (gtk.gdk.DESTROY))
|
self.on_destroy_event (parent, gtk.gdk.Event (gtk.gdk.DESTROY))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if isinstance (parent, gtk.Paned):
|
elif isinstance (parent, gtk.Paned):
|
||||||
index = self.term_list.index (widget)
|
index = self.term_list.index (widget)
|
||||||
grandparent = parent.get_parent ()
|
grandparent = parent.get_parent ()
|
||||||
|
|
||||||
@ -943,6 +943,8 @@ class Terminator:
|
|||||||
gdparent.pack2(sibling)
|
gdparent.pack2(sibling)
|
||||||
if isinstance(sibling, TerminatorTerm) and sibling.conf.titlebars and sibling.conf.extreme_tabs:
|
if isinstance(sibling, TerminatorTerm) and sibling.conf.titlebars and sibling.conf.extreme_tabs:
|
||||||
sibling._titlebox.show()
|
sibling._titlebox.show()
|
||||||
|
else:
|
||||||
|
err('Attempting to remove terminal from unknown parent: %s' % parent)
|
||||||
if self.conf.focus_on_close == 'prev' or ( self.conf.focus_on_close == 'auto' and focus_on_close == 'prev'):
|
if self.conf.focus_on_close == 'prev' or ( self.conf.focus_on_close == 'auto' and focus_on_close == 'prev'):
|
||||||
if index == 0: index = 1
|
if index == 0: index = 1
|
||||||
self.term_list[index - 1]._vte.grab_focus ()
|
self.term_list[index - 1]._vte.grab_focus ()
|
||||||
|
@ -1244,6 +1244,8 @@ text/plain
|
|||||||
'''Returns Gdk.Window.get_position(), pixel-based cursor position,
|
'''Returns Gdk.Window.get_position(), pixel-based cursor position,
|
||||||
and Gdk.Window.get_geometry()'''
|
and Gdk.Window.get_geometry()'''
|
||||||
reply = dict()
|
reply = dict()
|
||||||
|
if not self._vte.window:
|
||||||
|
return reply
|
||||||
x, y = self._vte.window.get_origin ()
|
x, y = self._vte.window.get_origin ()
|
||||||
reply.setdefault('origin_x',x)
|
reply.setdefault('origin_x',x)
|
||||||
reply.setdefault('origin_y',y)
|
reply.setdefault('origin_y',y)
|
||||||
|
Loading…
Reference in New Issue
Block a user