Track a couple of pre-existing connection IDs in Terminal.cnxid
This commit is contained in:
parent
cc11effd3b
commit
be413d3622
|
@ -79,9 +79,6 @@ class Terminal(gtk.VBox):
|
||||||
composite_support = None
|
composite_support = None
|
||||||
|
|
||||||
cnxids = None
|
cnxids = None
|
||||||
# FIXME: These two are old and should be updated to use cnxids[]
|
|
||||||
confcnxid = None
|
|
||||||
zoomcnxid = None
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Class initialiser"""
|
"""Class initialiser"""
|
||||||
|
@ -290,7 +287,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
self.vte.connect('enter_notify_event',
|
self.vte.connect('enter_notify_event',
|
||||||
self.on_vte_notify_enter)
|
self.on_vte_notify_enter)
|
||||||
|
|
||||||
self.confcnxid = self.vte.connect_after('realize', self.reconfigure)
|
self.cnxids['conf'] = self.vte.connect_after('realize', self.reconfigure)
|
||||||
|
|
||||||
def create_popup_group_menu(self, widget, event = None):
|
def create_popup_group_menu(self, widget, event = None):
|
||||||
"""Pop up a menu for the group widget"""
|
"""Pop up a menu for the group widget"""
|
||||||
|
@ -465,9 +462,9 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
def reconfigure(self, widget=None):
|
def reconfigure(self, widget=None):
|
||||||
"""Reconfigure our settings"""
|
"""Reconfigure our settings"""
|
||||||
dbg('Terminal::reconfigure')
|
dbg('Terminal::reconfigure')
|
||||||
if self.confcnxid:
|
if self.cnxids.has_key('conf'):
|
||||||
self.vte.disconnect(self.confcnxid)
|
self.vte.disconnect(self.cnxids['conf'])
|
||||||
self.confcnxid = None
|
self.cnxids.remove('conf')
|
||||||
|
|
||||||
# FIXME: actually reconfigure our settings
|
# FIXME: actually reconfigure our settings
|
||||||
pass
|
pass
|
||||||
|
@ -772,8 +769,8 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
|
|
||||||
def zoom_scale(self, widget, allocation, old_data):
|
def zoom_scale(self, widget, allocation, old_data):
|
||||||
"""Scale our font correctly based on how big we are not vs before"""
|
"""Scale our font correctly based on how big we are not vs before"""
|
||||||
self.disconnect(self.zoomcnxid)
|
self.disconnect(self.cnxids['zoom'])
|
||||||
self.zoomcnxid = None
|
self.cnxids.remove('zoom')
|
||||||
|
|
||||||
new_columns = self.vte.get_column_count()
|
new_columns = self.vte.get_column_count()
|
||||||
new_rows = self.vte.get_row_count()
|
new_rows = self.vte.get_row_count()
|
||||||
|
|
|
@ -275,7 +275,7 @@ class Window(Container, gtk.Window):
|
||||||
self.set_property('term_zoomed', True)
|
self.set_property('term_zoomed', True)
|
||||||
|
|
||||||
if font_scale:
|
if font_scale:
|
||||||
widget.zoomcnxid = widget.connect('size-allocate',
|
widget.cnxids['zoom'] = widget.connect('size-allocate',
|
||||||
widget.zoom_scale, self.zoom_data)
|
widget.zoom_scale, self.zoom_data)
|
||||||
|
|
||||||
widget.grab_focus()
|
widget.grab_focus()
|
||||||
|
|
Loading…
Reference in New Issue