Skip to content

Commit

Permalink
MainWindow: Move Actions and Keyboard Handling Related to The View to…
Browse files Browse the repository at this point in the history
… TerminalWidget (#749)

* MainWindow: move terminal key handling to TerminalWidget

* MainWindow: move terminal related actions to TerminalWidget
  • Loading branch information
Marukesu authored Nov 28, 2023
1 parent a76636d commit beabb94
Showing 4 changed files with 315 additions and 296 deletions.
10 changes: 10 additions & 0 deletions src/Application.vala
Original file line number Diff line number Diff line change
@@ -213,6 +213,16 @@ public class Terminal.Application : Gtk.Application {

set_accels_for_action ("app.new-window", { "<Control><Shift>N" });
set_accels_for_action ("app.quit", { "<Control><Shift>Q" });

set_accels_for_action (TerminalWidget.ACTION_COPY, TerminalWidget.ACCELS_COPY);
set_accels_for_action (TerminalWidget.ACTION_COPY_OUTPUT, TerminalWidget.ACCELS_COPY_OUTPUT);
set_accels_for_action (TerminalWidget.ACTION_PASTE, TerminalWidget.ACCELS_PASTE);
set_accels_for_action (TerminalWidget.ACTION_RELOAD, TerminalWidget.ACCELS_RELOAD);
set_accels_for_action (TerminalWidget.ACTION_SCROLL_TO_COMMAND, TerminalWidget.ACCELS_SCROLL_TO_COMMAND);
set_accels_for_action (TerminalWidget.ACTION_SELECT_ALL, TerminalWidget.ACCELS_SELECT_ALL);
set_accels_for_action (TerminalWidget.ACTION_ZOOM_DEFAULT, TerminalWidget.ACCELS_ZOOM_DEFAULT);
set_accels_for_action (TerminalWidget.ACTION_ZOOM_IN, TerminalWidget.ACCELS_ZOOM_IN);
set_accels_for_action (TerminalWidget.ACTION_ZOOM_OUT, TerminalWidget.ACCELS_ZOOM_OUT);
}

protected override int command_line (ApplicationCommandLine command_line) {
Loading

0 comments on commit beabb94

Please sign in to comment.