diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 8fe9811a..3fe30d1f 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -826,6 +826,7 @@ class Terminator: if fontscale: self.cnid = widget.connect ("size-allocate", self.zoom_scale_font) + dbg ('zoom_term: registered font zoom handler to %s with cnid: %s'%(widget, self.cnid)) else: self._maximised = True @@ -836,6 +837,9 @@ class Terminator: new_rows = widget._vte.get_row_count () new_font = widget._vte.get_font () + dbg ('zoom_scale_font: Disconnecting %s from %s'%(self.cnid, widget)) + widget.disconnect (self.cnid) + dbg ('zoom_scale_font: I just went from %dx%d to %dx%d. Raa!'%(self.old_columns, self.old_rows, new_columns, new_rows)) if new_rows != self.old_rows: @@ -862,7 +866,6 @@ class Terminator: new_font.set_size (self.old_font.get_size() * (area_factor / 2)) dbg ('zoom_scale_font: Scaled font from %f to %f'%(self.old_font.get_size () / pango.SCALE, new_font.get_size () / pango.SCALE)) widget._vte.set_font (new_font) - widget.disconnect (self.cnid) def unzoom_term (self, widget, fontscale = False): """Proof of concept: Go back to previous application