mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
update history actions api
This commit is contained in:
parent
9ef5b169d3
commit
0a09de1fdd
12 changed files with 106 additions and 109 deletions
|
|
@ -87,47 +87,11 @@ Navigation::Navigation(
|
|||
}
|
||||
|
||||
// Actions
|
||||
bool Navigation::history_try_back()
|
||||
{
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_back(match))
|
||||
{
|
||||
navigationRequest->set_text(
|
||||
match.request
|
||||
);
|
||||
|
||||
return activate_action(
|
||||
"win.main_tab_page_navigation_update"
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Navigation::history_try_forward()
|
||||
{
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_forward(match))
|
||||
{
|
||||
navigationRequest->set_text(
|
||||
match.request
|
||||
);
|
||||
|
||||
return activate_action(
|
||||
"win.main_tab_page_navigation_update"
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Navigation::history_add(
|
||||
const Glib::ustring & VALUE
|
||||
const Glib::ustring & REQUEST
|
||||
) {
|
||||
navigationHistory->add(
|
||||
VALUE
|
||||
REQUEST
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -187,4 +151,34 @@ Glib::ustring Navigation::get_request_query()
|
|||
Glib::ustring Navigation::get_request_port()
|
||||
{
|
||||
return navigationRequest->get_port();
|
||||
}
|
||||
|
||||
bool Navigation::try_history_back(
|
||||
Glib::ustring & request
|
||||
) {
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_back(match))
|
||||
{
|
||||
request = match.request;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Navigation::try_history_forward(
|
||||
Glib::ustring & request
|
||||
) {
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_forward(match))
|
||||
{
|
||||
request = match.request;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue