|
|
@ -5,7 +5,7 @@ |
|
|
|
using namespace app; |
|
|
|
using namespace app; |
|
|
|
|
|
|
|
|
|
|
|
Browser::Browser( |
|
|
|
Browser::Browser( |
|
|
|
//const Glib::RefPtr<Gtk::Application> & app,
|
|
|
|
const Glib::RefPtr<Gtk::Application> & APP |
|
|
|
//const std::shared_ptr<lib::Database> & db
|
|
|
|
//const std::shared_ptr<lib::Database> & db
|
|
|
|
) { |
|
|
|
) { |
|
|
|
// Init window actions
|
|
|
|
// Init window actions
|
|
|
@ -33,7 +33,11 @@ Browser::Browser( |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Tab actions
|
|
|
|
APP->set_accel_for_action( |
|
|
|
|
|
|
|
"win.debug", |
|
|
|
|
|
|
|
"<Primary>i" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
add_action( |
|
|
|
add_action( |
|
|
|
"main_tab_append", |
|
|
|
"main_tab_append", |
|
|
|
[this] |
|
|
|
[this] |
|
|
@ -42,6 +46,11 @@ Browser::Browser( |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APP->set_accel_for_action( |
|
|
|
|
|
|
|
"win.main_tab_append", |
|
|
|
|
|
|
|
"<Primary>t" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const auto ACTION__MAIN_TAB_CLOSE = add_action( |
|
|
|
const auto ACTION__MAIN_TAB_CLOSE = add_action( |
|
|
|
"main_tab_close", |
|
|
|
"main_tab_close", |
|
|
|
[this] |
|
|
|
[this] |
|
|
@ -93,6 +102,11 @@ Browser::Browser( |
|
|
|
false |
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APP->set_accel_for_action( |
|
|
|
|
|
|
|
"win.main_tab_page_navigation_update", |
|
|
|
|
|
|
|
"<Primary>r" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const auto ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK = add_action( |
|
|
|
const auto ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK = add_action( |
|
|
|
"main_tab_page_navigation_history_back", |
|
|
|
"main_tab_page_navigation_history_back", |
|
|
|
[this] |
|
|
|
[this] |
|
|
@ -101,6 +115,15 @@ Browser::Browser( |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK->set_enabled( |
|
|
|
|
|
|
|
false |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APP->set_accel_for_action( |
|
|
|
|
|
|
|
"win.main_tab_page_navigation_history_back", |
|
|
|
|
|
|
|
"<Primary>Left" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const auto ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_FORWARD = add_action( |
|
|
|
const auto ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_FORWARD = add_action( |
|
|
|
"main_tab_page_navigation_history_forward", |
|
|
|
"main_tab_page_navigation_history_forward", |
|
|
|
[this] |
|
|
|
[this] |
|
|
@ -109,6 +132,15 @@ Browser::Browser( |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_FORWARD->set_enabled( |
|
|
|
|
|
|
|
false |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APP->set_accel_for_action( |
|
|
|
|
|
|
|
"win.main_tab_page_navigation_history_forward", |
|
|
|
|
|
|
|
"<Primary>Right" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Init widget
|
|
|
|
// Init widget
|
|
|
|
set_title( |
|
|
|
set_title( |
|
|
|
_("Yoda") |
|
|
|
_("Yoda") |
|
|
|