|
|
|
@ -32,100 +32,97 @@ Browser::Browser(
@@ -32,100 +32,97 @@ Browser::Browser(
|
|
|
|
|
* browserMain |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Init actions
|
|
|
|
|
// Init browser window actions
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_append", |
|
|
|
|
"refresh", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_append(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
browserMain->refresh(); |
|
|
|
|
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_page_update", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_update(); |
|
|
|
|
browserHeader->set_title( |
|
|
|
|
browserMain->get_current_tab_page_title() |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
browserHeader->set_subtitle( |
|
|
|
|
browserMain->get_current_tab_page_subtitle() |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Close
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_close", |
|
|
|
|
"debug", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_close(); |
|
|
|
|
// @TODO https://gitlab.gnome.org/GNOME/gtkmm/-/commit/5f3b82537d3daad7bda59dd01e719788070f4b6c
|
|
|
|
|
gtk_window_set_interactive_debugging( |
|
|
|
|
true |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Close submenu
|
|
|
|
|
// Tab actions
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_close_left", |
|
|
|
|
"main_tab_append", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_close_left(); |
|
|
|
|
browserMain->tab_append(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_close_right", |
|
|
|
|
"main_tab_close", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_close_right(); |
|
|
|
|
browserMain->tab_close(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_close_all", |
|
|
|
|
"main_tab_close_left", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_close_all(); |
|
|
|
|
browserMain->tab_close_left(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// History
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_page_navigation_history_try_back", |
|
|
|
|
"main_tab_close_right", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_page_navigation_history_try_back(); |
|
|
|
|
browserMain->tab_close_right(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_page_navigation_history_try_forward", |
|
|
|
|
"main_tab_close_all", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_page_navigation_history_try_forward(); |
|
|
|
|
browserMain->tab_close_all(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Tool
|
|
|
|
|
add_action( |
|
|
|
|
"debug", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
// @TODO https://gitlab.gnome.org/GNOME/gtkmm/-/commit/5f3b82537d3daad7bda59dd01e719788070f4b6c
|
|
|
|
|
gtk_window_set_interactive_debugging( |
|
|
|
|
true |
|
|
|
|
// Tab page navigation actions
|
|
|
|
|
add_action( |
|
|
|
|
"main_tab_page_navigation_update", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_page_update(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Hidden
|
|
|
|
|
add_action( |
|
|
|
|
"refresh", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->refresh(); |
|
|
|
|
|
|
|
|
|
browserHeader->set_title( |
|
|
|
|
browserMain->get_current_tab_page_title() |
|
|
|
|
add_action( |
|
|
|
|
"main_tab_page_navigation_history_try_back", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_page_navigation_history_try_back(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
browserHeader->set_subtitle( |
|
|
|
|
browserMain->get_current_tab_page_subtitle() |
|
|
|
|
add_action( |
|
|
|
|
"main_tab_page_navigation_history_try_forward", |
|
|
|
|
[this] |
|
|
|
|
{ |
|
|
|
|
browserMain->tab_page_navigation_history_try_forward(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |