Browse Source

Implemented full screen feature

merge-requests/365/head
Ingmar Lehmann 9 years ago
parent
commit
918bbba8c0
  1. 3
      src/files.h
  2. 6
      src/menu.cc
  3. 9
      src/window.cc
  4. 1
      src/window.h

3
src/files.h

@ -156,7 +156,8 @@ R"RAW(
"close_tab": "<primary>w", "close_tab": "<primary>w",
"window_toggle_split": "", "window_toggle_split": "",
"window_toggle_tabs": "", "window_toggle_tabs": "",
"window_clear_terminal": "" "window_clear_terminal": "",
"full_screen": "F11"
}, },
"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

@ -454,6 +454,12 @@ const Glib::ustring menu_xml= R"RAW(<interface>
<attribute name='action'>app.window_clear_terminal</attribute> <attribute name='action'>app.window_clear_terminal</attribute>
</item> </item>
</section> </section>
<section>
<item>
<attribute name='label' translatable='yes'>_Full _Screen</attribute>
<attribute name='action'>app.full_screen</attribute>
</item>
</section>
</submenu> </submenu>
</menu> </menu>
</interface> </interface>

9
src/window.cc

@ -1184,6 +1184,15 @@ void Window::set_menu_actions() {
menu.add_action("window_clear_terminal", [this] { menu.add_action("window_clear_terminal", [this] {
Terminal::get().clear(); Terminal::get().clear();
}); });
menu.add_action("full_screen", [this] {
if(!is_full_screen){
Window::get().fullscreen();
is_full_screen = true;
} else {
Window::get().unfullscreen();
is_full_screen = false;
}
});
menu.add_action("window_toggle_tabs", [this] { menu.add_action("window_toggle_tabs", [this] {
Notebook::get().toggle_tabs(); Notebook::get().toggle_tabs();
}); });

1
src/window.h

@ -35,6 +35,7 @@ private:
bool case_sensitive_search=true; bool case_sensitive_search=true;
bool regex_search=false; bool regex_search=false;
bool search_entry_shown=false; bool search_entry_shown=false;
bool is_full_screen=false;
}; };
#endif // JUCI_WINDOW_H #endif // JUCI_WINDOW_H

Loading…
Cancel
Save