[bug 835] 835-crash-after-unzooming-a-single-terminal-inside-a-tab #835
- removing the tab-change event dependency and having a simpler solution with focus-in
This commit is contained in:
parent
ff45920874
commit
c7c9fd0d4b
@ -524,8 +524,6 @@ class Notebook(Container, Gtk.Notebook):
|
|||||||
# if we can't find a last active term we must be starting up
|
# if we can't find a last active term we must be starting up
|
||||||
if term is not None:
|
if term is not None:
|
||||||
GObject.idle_add(term.ensure_visible_and_focussed)
|
GObject.idle_add(term.ensure_visible_and_focussed)
|
||||||
dbg('emit tab-change type: targe-plugin for page:%s' % page_num)
|
|
||||||
term.emit('tab-change', page_num, 'target-plugin')
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def on_scroll_event(self, notebook, event):
|
def on_scroll_event(self, notebook, event):
|
||||||
|
@ -68,7 +68,7 @@ class Terminal(Gtk.VBox):
|
|||||||
'navigate': (GObject.SignalFlags.RUN_LAST, None,
|
'navigate': (GObject.SignalFlags.RUN_LAST, None,
|
||||||
(GObject.TYPE_STRING,)),
|
(GObject.TYPE_STRING,)),
|
||||||
'tab-change': (GObject.SignalFlags.RUN_LAST, None,
|
'tab-change': (GObject.SignalFlags.RUN_LAST, None,
|
||||||
(GObject.TYPE_INT,GObject.TYPE_STRING,)),
|
(GObject.TYPE_INT,)),
|
||||||
'group-all': (GObject.SignalFlags.RUN_LAST, None, ()),
|
'group-all': (GObject.SignalFlags.RUN_LAST, None, ()),
|
||||||
'group-all-toggle': (GObject.SignalFlags.RUN_LAST, None, ()),
|
'group-all-toggle': (GObject.SignalFlags.RUN_LAST, None, ()),
|
||||||
'move-tab': (GObject.SignalFlags.RUN_LAST, None,
|
'move-tab': (GObject.SignalFlags.RUN_LAST, None,
|
||||||
@ -1985,40 +1985,40 @@ class Terminal(Gtk.VBox):
|
|||||||
self.zoom()
|
self.zoom()
|
||||||
|
|
||||||
def key_next_tab(self):
|
def key_next_tab(self):
|
||||||
self.emit('tab-change', -1, None)
|
self.emit('tab-change', -1)
|
||||||
|
|
||||||
def key_prev_tab(self):
|
def key_prev_tab(self):
|
||||||
self.emit('tab-change', -2, None)
|
self.emit('tab-change', -2)
|
||||||
|
|
||||||
def key_switch_to_tab_1(self):
|
def key_switch_to_tab_1(self):
|
||||||
self.emit('tab-change', 0, None)
|
self.emit('tab-change', 0)
|
||||||
|
|
||||||
def key_switch_to_tab_2(self):
|
def key_switch_to_tab_2(self):
|
||||||
self.emit('tab-change', 1, None)
|
self.emit('tab-change', 1)
|
||||||
|
|
||||||
def key_switch_to_tab_3(self):
|
def key_switch_to_tab_3(self):
|
||||||
self.emit('tab-change', 2, None)
|
self.emit('tab-change', 2)
|
||||||
|
|
||||||
def key_switch_to_tab_4(self):
|
def key_switch_to_tab_4(self):
|
||||||
self.emit('tab-change', 3, None)
|
self.emit('tab-change', 3)
|
||||||
|
|
||||||
def key_switch_to_tab_5(self):
|
def key_switch_to_tab_5(self):
|
||||||
self.emit('tab-change', 4, None)
|
self.emit('tab-change', 4)
|
||||||
|
|
||||||
def key_switch_to_tab_6(self):
|
def key_switch_to_tab_6(self):
|
||||||
self.emit('tab-change', 5, None)
|
self.emit('tab-change', 5)
|
||||||
|
|
||||||
def key_switch_to_tab_7(self):
|
def key_switch_to_tab_7(self):
|
||||||
self.emit('tab-change', 6, None)
|
self.emit('tab-change', 6)
|
||||||
|
|
||||||
def key_switch_to_tab_8(self):
|
def key_switch_to_tab_8(self):
|
||||||
self.emit('tab-change', 7, None)
|
self.emit('tab-change', 7)
|
||||||
|
|
||||||
def key_switch_to_tab_9(self):
|
def key_switch_to_tab_9(self):
|
||||||
self.emit('tab-change', 8, None)
|
self.emit('tab-change', 8)
|
||||||
|
|
||||||
def key_switch_to_tab_10(self):
|
def key_switch_to_tab_10(self):
|
||||||
self.emit('tab-change', 9, None)
|
self.emit('tab-change', 9)
|
||||||
|
|
||||||
def key_reset(self):
|
def key_reset(self):
|
||||||
self.vte.reset (True, False)
|
self.vte.reset (True, False)
|
||||||
|
@ -196,7 +196,6 @@ class Terminator(Borg):
|
|||||||
dbg('checking: %s (%s)' % (window.uuid.urn, window))
|
dbg('checking: %s (%s)' % (window.uuid.urn, window))
|
||||||
if window.uuid.urn == uuid:
|
if window.uuid.urn == uuid:
|
||||||
return window
|
return window
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def new_window(self, cwd=None, profile=None):
|
def new_window(self, cwd=None, profile=None):
|
||||||
@ -211,7 +210,7 @@ class Terminator(Borg):
|
|||||||
window.add(terminal)
|
window.add(terminal)
|
||||||
window.show(True)
|
window.show(True)
|
||||||
terminal.spawn_child()
|
terminal.spawn_child()
|
||||||
terminal.emit('tab-change', 0, None)
|
terminal.emit('tab-change', 0)
|
||||||
|
|
||||||
return(window, terminal)
|
return(window, terminal)
|
||||||
|
|
||||||
|
@ -738,14 +738,8 @@ class Window(Container, Gtk.Window):
|
|||||||
def disable_geometry_hints(self):
|
def disable_geometry_hints(self):
|
||||||
self.set_geometry_hints(None, None, 0)
|
self.set_geometry_hints(None, None, 0)
|
||||||
|
|
||||||
def tab_change(self, widget, num=None, event_type=None):
|
def tab_change(self, widget, num=None):
|
||||||
"""Change to a specific tab"""
|
"""Change to a specific tab"""
|
||||||
|
|
||||||
#we return if event_type is set by a component
|
|
||||||
#we only handle default
|
|
||||||
if event_type:
|
|
||||||
return
|
|
||||||
|
|
||||||
if self.is_zoomed():
|
if self.is_zoomed():
|
||||||
self.unzoom()
|
self.unzoom()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user