| 1026 | } |
| 1027 | |
| 1028 | UIMenu* SettingsMenu::createTerminalMenu() { |
| 1029 | mTerminalMenu = UIPopUpMenu::New(); |
| 1030 | |
| 1031 | mTerminalMenu->on( Event::OnMenuShow, [this]( auto ) { updateTerminalMenu(); } ); |
| 1032 | |
| 1033 | mTerminalMenu->add( i18n( "current_terminal", "Current Terminal" ) ) |
| 1034 | ->setTextAlign( UI_HALIGN_CENTER ); |
| 1035 | |
| 1036 | UIMenuCheckBox* exclusiveChk = |
| 1037 | mTerminalMenu->addCheckBox( i18n( "exclusive_mode", "Exclusive Mode" ), false, |
| 1038 | getKeybind( UITerminal::getExclusiveModeToggleCommandName() ) ); |
| 1039 | |
| 1040 | exclusiveChk |
| 1041 | ->setTooltipText( i18n( |
| 1042 | "exclusive_mode_tooltip", |
| 1043 | "Global Keybindings are disabled when exclusive mode is enabled.\nThis is to " |
| 1044 | "avoid keyboard shortcut overlapping between the terminal and the application." ) ) |
| 1045 | ->setId( "exclusive-mode" ); |
| 1046 | |
| 1047 | mTerminalMenu |
| 1048 | ->add( i18n( "rename_session", "Rename Session" ), nullptr, |
| 1049 | getKeybind( "terminal-rename" ) ) |
| 1050 | ->setId( "terminal-rename" ); |
| 1051 | |
| 1052 | mTerminalMenu->addSeparator()->setId( "end_current_terminal" ); |
| 1053 | |
| 1054 | #if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN |
| 1055 | UIMenuSubMenu* termColorSchemeMenu = mTerminalMenu->addSubMenu( |
| 1056 | i18n( "terminal_color_scheme", "Terminal Color Scheme" ), findIcon( "palette" ), |
| 1057 | mApp->getTerminalManager()->createColorSchemeMenu( true ) ); |
| 1058 | termColorSchemeMenu->on( Event::OnMenuShow, [this, termColorSchemeMenu]( const Event* ) { |
| 1059 | mApp->getTerminalManager()->updateMenuColorScheme( termColorSchemeMenu ); |
| 1060 | } ); |
| 1061 | #endif |
| 1062 | |
| 1063 | UIPopUpMenu* newTerminalBehaviorSubMenu = UIPopUpMenu::New(); |
| 1064 | auto currentOrientation = mApp->getConfig().term.newTerminalOrientation; |
| 1065 | |
| 1066 | newTerminalBehaviorSubMenu |
| 1067 | ->addRadioButton( i18n( "open_in_same_tabbar", "Open In Current Tab Bar" ) ) |
| 1068 | ->setActive( currentOrientation == NewTerminalOrientation::Same ) |
| 1069 | ->setId( "same" ); |
| 1070 | newTerminalBehaviorSubMenu |
| 1071 | ->addRadioButton( i18n( "open_in_vertical_split", "Open In New Vertical Split" ) ) |
| 1072 | ->setActive( currentOrientation == NewTerminalOrientation::Vertical ) |
| 1073 | ->setId( "vertical" ); |
| 1074 | newTerminalBehaviorSubMenu |
| 1075 | ->addRadioButton( i18n( "open_in_horizontal_split", "Open In New Horizontal Split" ) ) |
| 1076 | ->setActive( currentOrientation == NewTerminalOrientation::Horizontal ) |
| 1077 | ->setId( "horizontal" ); |
| 1078 | newTerminalBehaviorSubMenu |
| 1079 | ->addRadioButton( i18n( "open_in_statusbar_panel", "Open In Status Bar Panel" ) ) |
| 1080 | ->setActive( currentOrientation == NewTerminalOrientation::StatusBarPanel ) |
| 1081 | ->setId( "statusbar_panel" ); |
| 1082 | |
| 1083 | mTerminalMenu->addSubMenu( i18n( "new_terminal_behavior", "New Terminal Behavior" ), |
| 1084 | findIcon( "terminal" ), newTerminalBehaviorSubMenu ); |
| 1085 |
nothing calls this directly
no test coverage detected