diff --git a/src/app/browser/main/tab/page/navigation.cpp b/src/app/browser/main/tab/page/navigation.cpp index dd87ef01..f8a43f98 100644 --- a/src/app/browser/main/tab/page/navigation.cpp +++ b/src/app/browser/main/tab/page/navigation.cpp @@ -87,16 +87,6 @@ Navigation::Navigation( } // Actions -void Navigation::history_add( - const Glib::ustring & REQUEST, - const bool & UPDATE_MEMORY_INDEX -) { - navigationHistory->add( - REQUEST, - UPDATE_MEMORY_INDEX - ); -} - void Navigation::refresh() { // Toggle base button sensibility @@ -113,46 +103,14 @@ void Navigation::refresh() navigationHistory->refresh(); } -// Setters @TODO is really wanted? -void Navigation::set_request_text( - const Glib::ustring & VALUE +void Navigation::history_add( + const Glib::ustring & REQUEST, + const bool & UPDATE_MEMORY_INDEX ) { - navigationRequest->set_text( - VALUE + navigationHistory->add( + REQUEST, + UPDATE_MEMORY_INDEX ); - - // refresh(); not wanted as on change listener do same @TODO -} - -// Getters @TODO & -Glib::ustring Navigation::get_request_text() -{ - return navigationRequest->get_text(); -} - -Glib::ustring Navigation::get_request_scheme() -{ - return navigationRequest->get_scheme(); -} - -Glib::ustring Navigation::get_request_host() -{ - return navigationRequest->get_host(); -} - -Glib::ustring Navigation::get_request_path() -{ - return navigationRequest->get_path(); -} - -Glib::ustring Navigation::get_request_query() -{ - return navigationRequest->get_query(); -} - -Glib::ustring Navigation::get_request_port() -{ - return navigationRequest->get_port(); } // Actionable getters @@ -186,4 +144,44 @@ bool Navigation::try_history_forward( } return false; +} + +// Getters @TODO & +Glib::ustring Navigation::get_request_text() +{ + return navigationRequest->get_text(); +} + +Glib::ustring Navigation::get_request_scheme() +{ + return navigationRequest->get_scheme(); +} + +Glib::ustring Navigation::get_request_host() +{ + return navigationRequest->get_host(); +} + +Glib::ustring Navigation::get_request_path() +{ + return navigationRequest->get_path(); +} + +Glib::ustring Navigation::get_request_query() +{ + return navigationRequest->get_query(); +} + +Glib::ustring Navigation::get_request_port() +{ + return navigationRequest->get_port(); +} + +// Setters +void Navigation::set_request_text( + const Glib::ustring & VALUE +) { + navigationRequest->set_text( + VALUE + ); } \ No newline at end of file diff --git a/src/app/browser/main/tab/page/navigation.hpp b/src/app/browser/main/tab/page/navigation.hpp index b1c7dd37..339cd02e 100644 --- a/src/app/browser/main/tab/page/navigation.hpp +++ b/src/app/browser/main/tab/page/navigation.hpp @@ -37,27 +37,13 @@ namespace app::browser::main::tab::page ); // Actions + void refresh(); + void history_add( const Glib::ustring & REQUEST, const bool & UPDATE_MEMORY_INDEX ); - void refresh(); - - // Setters - void set_request_text( - const Glib::ustring & VALUE - ); - - // Getters - Glib::ustring get_request_text(); - - Glib::ustring get_request_scheme(); - Glib::ustring get_request_host(); - Glib::ustring get_request_port(); - Glib::ustring get_request_path(); - Glib::ustring get_request_query(); - // Actionable getters bool try_history_back( Glib::ustring & request, @@ -68,6 +54,20 @@ namespace app::browser::main::tab::page Glib::ustring & request, const bool & UPDATE_MEMORY_INDEX ); + + // Getters + Glib::ustring get_request_text(); + + Glib::ustring get_request_scheme(); + Glib::ustring get_request_host(); + Glib::ustring get_request_port(); + Glib::ustring get_request_path(); + Glib::ustring get_request_query(); + + // Setters + void set_request_text( + const Glib::ustring & VALUE + ); }; }