Browse Source

added feature function to clear console manually

merge-requests/365/head
d3rrial 9 years ago
parent
commit
60baeef29c
  1. 3
      src/files.h
  2. 6
      src/menu.cc
  3. 3
      src/window.cc

3
src/files.h

@ -140,7 +140,8 @@ R"RAW(
#endif #endif
R"RAW( R"RAW(
"close_tab": "<primary>w", "close_tab": "<primary>w",
"window_toggle_split": "" "window_toggle_split": "",
"clear_console": "<primary><shift>c"
}, },
"project": { "project": {
"default_build_path_comment": "Use <project_directory_name> to insert the project top level directory name", "default_build_path_comment": "Use <project_directory_name> to insert the project top level directory name",

6
src/menu.cc

@ -349,6 +349,12 @@ Menu::Menu() {
<attribute name='action'>app.window_toggle_split</attribute> <attribute name='action'>app.window_toggle_split</attribute>
</item> </item>
</section> </section>
<section>
<item>
<attribute name='label' translatable='yes'>_Clear _Console</attribute>
<attribute name='action'>app.clear_console</attribute>
</item>
</section>
</submenu> </submenu>
</menu> </menu>
</interface> </interface>

3
src/window.cc

@ -1047,6 +1047,9 @@ void Window::set_menu_actions() {
menu.add_action("window_toggle_split", [this] { menu.add_action("window_toggle_split", [this] {
Notebook::get().toggle_split(); Notebook::get().toggle_split();
}); });
menu.add_action("clear_console", [this] {
Terminal::get().clear();
});
} }
void Window::activate_menu_items(bool activate) { void Window::activate_menu_items(bool activate) {

Loading…
Cancel
Save