mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-12 05:31:06 +00:00
remove default values, add follow argument
This commit is contained in:
parent
4cde44025f
commit
ab0c28badf
@ -78,7 +78,8 @@ void Page::navigation_update(
|
||||
if (ADD_HISTORY)
|
||||
{
|
||||
pageNavigation->history_add(
|
||||
pageNavigation->get_request_text()
|
||||
pageNavigation->get_request_text(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
@ -246,7 +247,7 @@ void Page::navigation_history_back()
|
||||
{
|
||||
Glib::ustring request;
|
||||
|
||||
if (pageNavigation->try_history_back(request))
|
||||
if (pageNavigation->try_history_back(request, true))
|
||||
{
|
||||
pageNavigation->set_request_text(
|
||||
request
|
||||
@ -262,7 +263,7 @@ void Page::navigation_history_forward()
|
||||
{
|
||||
Glib::ustring request;
|
||||
|
||||
if (pageNavigation->try_history_forward(request))
|
||||
if (pageNavigation->try_history_forward(request, true))
|
||||
{
|
||||
pageNavigation->set_request_text(
|
||||
request
|
||||
|
@ -88,10 +88,12 @@ Navigation::Navigation(
|
||||
|
||||
// Actions
|
||||
void Navigation::history_add(
|
||||
const Glib::ustring & REQUEST
|
||||
const Glib::ustring & REQUEST,
|
||||
const bool & FOLLOW
|
||||
) {
|
||||
navigationHistory->add(
|
||||
REQUEST
|
||||
REQUEST,
|
||||
FOLLOW
|
||||
);
|
||||
}
|
||||
|
||||
@ -153,12 +155,14 @@ Glib::ustring Navigation::get_request_port()
|
||||
return navigationRequest->get_port();
|
||||
}
|
||||
|
||||
// Actionable getters
|
||||
bool Navigation::try_history_back(
|
||||
Glib::ustring & request
|
||||
Glib::ustring & request,
|
||||
const bool & FOLLOW
|
||||
) {
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_back(match))
|
||||
if (navigationHistory->try_back(match, FOLLOW))
|
||||
{
|
||||
request = match.request;
|
||||
|
||||
@ -169,11 +173,12 @@ bool Navigation::try_history_back(
|
||||
}
|
||||
|
||||
bool Navigation::try_history_forward(
|
||||
Glib::ustring & request
|
||||
Glib::ustring & request,
|
||||
const bool & FOLLOW
|
||||
) {
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_forward(match))
|
||||
if (navigationHistory->try_forward(match, FOLLOW))
|
||||
{
|
||||
request = match.request;
|
||||
|
||||
|
@ -38,7 +38,8 @@ namespace app::browser::main::tab::page
|
||||
|
||||
// Actions
|
||||
void history_add(
|
||||
const Glib::ustring & REQUEST
|
||||
const Glib::ustring & REQUEST,
|
||||
const bool & FOLLOW
|
||||
);
|
||||
|
||||
void refresh();
|
||||
@ -57,12 +58,15 @@ namespace app::browser::main::tab::page
|
||||
Glib::ustring get_request_path();
|
||||
Glib::ustring get_request_query();
|
||||
|
||||
// Actionable getters
|
||||
bool try_history_back(
|
||||
Glib::ustring & request
|
||||
Glib::ustring & request,
|
||||
const bool & FOLLOW
|
||||
);
|
||||
|
||||
bool try_history_forward(
|
||||
Glib::ustring & request
|
||||
Glib::ustring & request,
|
||||
const bool & FOLLOW
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace app::browser::main::tab::page::navigation
|
||||
// Actions
|
||||
void add(
|
||||
const Glib::ustring & REQUEST,
|
||||
const bool & FOLLOW = true
|
||||
const bool & FOLLOW
|
||||
);
|
||||
|
||||
void refresh();
|
||||
@ -51,12 +51,12 @@ namespace app::browser::main::tab::page::navigation
|
||||
|
||||
bool try_back(
|
||||
Memory & match,
|
||||
const bool & FOLLOW = true
|
||||
const bool & FOLLOW
|
||||
);
|
||||
|
||||
bool try_forward(
|
||||
Memory & match,
|
||||
const bool & FOLLOW = true
|
||||
const bool & FOLLOW
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user