diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 143b170242..e2e3c5602d 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -937,7 +937,6 @@ namespace Terminal { terminal_widget.window_title_changed.connect (check_for_tabs_with_same_name); terminal_widget.cwd_changed.connect (cwd_changed); - terminal_widget.zoom_changed.connect (zoom_changed); terminal_widget.set_font (term_font); @@ -1205,14 +1204,17 @@ namespace Terminal { private void action_zoom_in_font () { current_terminal.increment_size (); + save_opened_terminal_zoom (current_terminal); } private void action_zoom_out_font () { current_terminal.decrement_size (); + save_opened_terminal_zoom (current_terminal); } private void action_zoom_default_font () { current_terminal.set_default_font_size (); + save_opened_terminal_zoom (current_terminal); } private void action_next_tab () { @@ -1344,10 +1346,6 @@ namespace Terminal { return; } - private void zoom_changed (TerminalWidget terminal_widget) { - save_opened_terminal_zoom (terminal_widget); - } - private void cwd_changed () { check_for_tabs_with_same_name (); save_opened_terminals (); diff --git a/src/Widgets/TerminalWidget.vala b/src/Widgets/TerminalWidget.vala index 256f656850..72b3220fd2 100644 --- a/src/Widgets/TerminalWidget.vala +++ b/src/Widgets/TerminalWidget.vala @@ -128,8 +128,6 @@ namespace Terminal { public signal void cwd_changed (); - public signal void zoom_changed (TerminalWidget terminal_widget); - public TerminalWidget (MainWindow parent_window) { pointer_autohide = true; @@ -203,11 +201,11 @@ namespace Terminal { if ((event.state & Gdk.ModifierType.CONTROL_MASK) > 0) { switch (event.direction) { case Gdk.ScrollDirection.UP: - increment_size (); + window.get_simple_action (MainWindow.ACTION_ZOOM_IN_FONT).activate (null); return Gdk.EVENT_STOP; case Gdk.ScrollDirection.DOWN: - decrement_size (); + window.get_simple_action (MainWindow.ACTION_ZOOM_OUT_FONT).activate (null); return Gdk.EVENT_STOP; case Gdk.ScrollDirection.SMOOTH: @@ -452,17 +450,14 @@ namespace Terminal { public void increment_size () { font_scale = (font_scale + 0.1).clamp (MIN_SCALE, MAX_SCALE); - zoom_changed (this); } public void decrement_size () { font_scale = (font_scale - 0.1).clamp (MIN_SCALE, MAX_SCALE); - zoom_changed (this); } public void set_default_font_size () { font_scale = 1.0; - zoom_changed (this); } public bool is_init_complete () {