diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index a2276599..3c4fa5bd 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -46,12 +46,19 @@ void Tab::refresh( )->set_label( tabPage->get_title() ); + + tabPage->refresh( + tabPage->get_title(), + tabPage->get_subtitle(), + 0 // @TODO + ); } void Tab::append( const bool & FOCUS ) { auto tabPage = new tab::Page( + action__refresh, action__tab_page_navigation_history_back, action__tab_page_navigation_history_forward, action__tab_page_navigation_update diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index 5d8ff70d..57567beb 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -5,12 +5,14 @@ using namespace app::browser::main::tab; Page::Page( + const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__PAGE_NAVIGATION_HISTORY_BACK, const Glib::RefPtr & ACTION__PAGE_NAVIGATION_HISTORY_FORWARD, const Glib::RefPtr & ACTION__PAGE_NAVIGATION_UPDATE ) { // Init components pageNavigation = Gtk::make_managed( + ACTION__REFRESH, ACTION__PAGE_NAVIGATION_HISTORY_BACK, ACTION__PAGE_NAVIGATION_HISTORY_FORWARD, ACTION__PAGE_NAVIGATION_UPDATE diff --git a/src/app/browser/main/tab/page.hpp b/src/app/browser/main/tab/page.hpp index d4e2b9a1..13c5254b 100644 --- a/src/app/browser/main/tab/page.hpp +++ b/src/app/browser/main/tab/page.hpp @@ -42,6 +42,7 @@ namespace app::browser::main::tab public: Page( + const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__PAGE_NAVIGATION_HISTORY_BACK, const Glib::RefPtr & ACTION__PAGE_NAVIGATION_HISTORY_FORWARD, const Glib::RefPtr & ACTION__PAGE_NAVIGATION_UPDATE diff --git a/src/app/browser/main/tab/page/navigation.cpp b/src/app/browser/main/tab/page/navigation.cpp index 9d4e7929..9c0b79e0 100644 --- a/src/app/browser/main/tab/page/navigation.cpp +++ b/src/app/browser/main/tab/page/navigation.cpp @@ -8,6 +8,7 @@ using namespace app::browser::main::tab::page; Navigation::Navigation( + const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__NAVIGATION_HISTORY_BACK, const Glib::RefPtr & ACTION__NAVIGATION_HISTORY_FORWARD, const Glib::RefPtr & ACTION__NAVIGATION_UPDATE @@ -62,6 +63,7 @@ Navigation::Navigation( ); navigationRequest = Gtk::make_managed( + ACTION__REFRESH, ACTION__NAVIGATION_UPDATE ); @@ -74,23 +76,6 @@ Navigation::Navigation( append( * navigationBookmark ); - - // Init actions group - auto GioSimpleActionGroup = Gio::SimpleActionGroup::create(); - - // Define group actions - GioSimpleActionGroup->add_action( - "refresh", - [this] - { - refresh(0); - } - ); - - insert_action_group( - "navigation", - GioSimpleActionGroup - ); } // Actions diff --git a/src/app/browser/main/tab/page/navigation.hpp b/src/app/browser/main/tab/page/navigation.hpp index 12239ffb..654dce85 100644 --- a/src/app/browser/main/tab/page/navigation.hpp +++ b/src/app/browser/main/tab/page/navigation.hpp @@ -2,7 +2,6 @@ #define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP #include -#include #include #include #include @@ -35,6 +34,7 @@ namespace app::browser::main::tab::page public: Navigation( + const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__NAVIGATION_HISTORY_BACK, const Glib::RefPtr & ACTION__NAVIGATION_HISTORY_FORWARD, const Glib::RefPtr & ACTION__NAVIGATION_UPDATE diff --git a/src/app/browser/main/tab/page/navigation/request.cpp b/src/app/browser/main/tab/page/navigation/request.cpp index 949331b3..b9d30ee1 100644 --- a/src/app/browser/main/tab/page/navigation/request.cpp +++ b/src/app/browser/main/tab/page/navigation/request.cpp @@ -4,10 +4,12 @@ using namespace app::browser::main::tab::page::navigation; // Construct Request::Request( + const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__UPDATE ) { // Init actions - action__update = ACTION__UPDATE; + action__refresh = ACTION__REFRESH; + action__update = ACTION__UPDATE; // Init widget set_placeholder_text( @@ -28,9 +30,7 @@ Request::Request( { parse(); - activate_action( - "navigation.refresh" // @TODO - ); + action__refresh->activate(); } ); diff --git a/src/app/browser/main/tab/page/navigation/request.hpp b/src/app/browser/main/tab/page/navigation/request.hpp index c6aad43a..7ccea522 100644 --- a/src/app/browser/main/tab/page/navigation/request.hpp +++ b/src/app/browser/main/tab/page/navigation/request.hpp @@ -14,7 +14,8 @@ namespace app::browser::main::tab::page::navigation class Request : public Gtk::Entry { // Actions - Glib::RefPtr action__update; + Glib::RefPtr action__refresh, + action__update; // Extras double progress_fraction; @@ -36,6 +37,7 @@ namespace app::browser::main::tab::page::navigation public: Request( + const Glib::RefPtr & ACTION__REFRESH, const Glib::RefPtr & ACTION__UPDATE );