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