mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 04:54:15 +00:00
update methods namespace
This commit is contained in:
parent
f834d783ef
commit
c77bfbbc7b
@ -85,18 +85,18 @@ Browser::Browser(
|
||||
|
||||
// History
|
||||
add_action(
|
||||
"main_tab_page_navigation_history_back",
|
||||
"main_tab_page_navigation_history_try_back",
|
||||
[this]
|
||||
{
|
||||
browserMain->tab_page_navigation_history_back();
|
||||
browserMain->tab_page_navigation_history_try_back();
|
||||
}
|
||||
);
|
||||
|
||||
add_action(
|
||||
"main_tab_page_navigation_history_forward",
|
||||
"main_tab_page_navigation_history_try_forward",
|
||||
[this]
|
||||
{
|
||||
browserMain->tab_page_navigation_history_forward();
|
||||
browserMain->tab_page_navigation_history_try_forward();
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -74,18 +74,34 @@ void Main::tab_close_all()
|
||||
mainTab->close_all();
|
||||
};
|
||||
|
||||
void Main::tab_page_navigation_history_back()
|
||||
bool Main::tab_page_navigation_history_try_back()
|
||||
{
|
||||
mainTab->page_navigation_history_back(
|
||||
mainTab->get_current_page()
|
||||
);
|
||||
const int & PAGE_NUMBER = mainTab->get_current_page();
|
||||
|
||||
if (PAGE_NUMBER >= 0)
|
||||
{
|
||||
return mainTab->page_navigation_history_try_back(
|
||||
PAGE_NUMBER
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
void Main::tab_page_navigation_history_forward()
|
||||
bool Main::tab_page_navigation_history_try_forward()
|
||||
{
|
||||
mainTab->page_navigation_history_forward(
|
||||
mainTab->get_current_page()
|
||||
);
|
||||
const int & PAGE_NUMBER = mainTab->get_current_page();
|
||||
|
||||
if (PAGE_NUMBER >= 0)
|
||||
{
|
||||
return mainTab->page_navigation_history_try_forward(
|
||||
PAGE_NUMBER
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
void Main::refresh()
|
||||
|
@ -35,10 +35,12 @@ namespace app::browser
|
||||
void tab_close_left();
|
||||
void tab_close_right();
|
||||
void tab_close();
|
||||
void tab_page_navigation_history_back();
|
||||
void tab_page_navigation_history_forward();
|
||||
|
||||
void tab_update();
|
||||
|
||||
bool tab_page_navigation_history_try_back();
|
||||
bool tab_page_navigation_history_try_forward();
|
||||
|
||||
void refresh();
|
||||
};
|
||||
}
|
||||
|
@ -96,20 +96,20 @@ void Tab::close_all()
|
||||
}
|
||||
}
|
||||
|
||||
void Tab::page_navigation_history_back(
|
||||
bool Tab::page_navigation_history_try_back(
|
||||
const int & PAGE_NUMBER
|
||||
) {
|
||||
get_tabPage(
|
||||
return get_tabPage(
|
||||
PAGE_NUMBER
|
||||
)->navigation_history_back();
|
||||
)->navigation_history_try_back();
|
||||
}
|
||||
|
||||
void Tab::page_navigation_history_forward(
|
||||
bool Tab::page_navigation_history_try_forward(
|
||||
const int & PAGE_NUMBER
|
||||
) {
|
||||
get_tabPage(
|
||||
return get_tabPage(
|
||||
PAGE_NUMBER
|
||||
)->navigation_history_forward();
|
||||
)->navigation_history_try_forward();
|
||||
}
|
||||
|
||||
void Tab::refresh(
|
||||
|
@ -54,11 +54,11 @@ namespace app::browser::main
|
||||
void close_right();
|
||||
void close_all();
|
||||
|
||||
void page_navigation_history_back(
|
||||
bool page_navigation_history_try_back(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
|
||||
void page_navigation_history_forward(
|
||||
bool page_navigation_history_try_forward(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
|
||||
|
@ -73,14 +73,14 @@ Glib::ustring Page::get_subtitle()
|
||||
}
|
||||
|
||||
// Actions
|
||||
void Page::navigation_history_back()
|
||||
bool Page::navigation_history_try_back()
|
||||
{
|
||||
pageNavigation->history_back();
|
||||
return pageNavigation->history_try_back();
|
||||
}
|
||||
|
||||
void Page::navigation_history_forward()
|
||||
bool Page::navigation_history_try_forward()
|
||||
{
|
||||
pageNavigation->history_forward();
|
||||
return pageNavigation->history_try_forward();
|
||||
}
|
||||
|
||||
void Page::refresh(
|
||||
|
@ -54,8 +54,8 @@ namespace app::browser::main::tab
|
||||
Glib::ustring get_subtitle();
|
||||
|
||||
// Actions
|
||||
void navigation_history_back();
|
||||
void navigation_history_forward();
|
||||
bool navigation_history_try_back();
|
||||
bool navigation_history_try_forward();
|
||||
|
||||
void refresh(
|
||||
const Glib::ustring & TITLE,
|
||||
|
@ -87,7 +87,7 @@ Navigation::Navigation(
|
||||
}
|
||||
|
||||
// Actions
|
||||
void Navigation::history_back()
|
||||
bool Navigation::history_try_back()
|
||||
{
|
||||
navigation::History::Memory match;
|
||||
|
||||
@ -98,10 +98,14 @@ void Navigation::history_back()
|
||||
);
|
||||
|
||||
navigationUpdate->activate();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Navigation::history_forward()
|
||||
bool Navigation::history_try_forward()
|
||||
{
|
||||
navigation::History::Memory match;
|
||||
|
||||
@ -112,7 +116,11 @@ void Navigation::history_forward()
|
||||
);
|
||||
|
||||
navigationUpdate->activate();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Navigation::history_add(
|
||||
|
@ -41,9 +41,8 @@ namespace app::browser::main::tab::page
|
||||
const Glib::ustring & VALUE
|
||||
);
|
||||
|
||||
void history_back();
|
||||
void history_forward();
|
||||
|
||||
bool history_try_back();
|
||||
bool history_try_forward();
|
||||
|
||||
void refresh();
|
||||
|
||||
|
@ -5,7 +5,7 @@ using namespace app::browser::main::tab::page::navigation::history;
|
||||
Back::Back()
|
||||
{
|
||||
set_action_name(
|
||||
"win.main_tab_page_navigation_history_back"
|
||||
"win.main_tab_page_navigation_history_try_back"
|
||||
);
|
||||
|
||||
set_icon_name(
|
||||
|
@ -5,7 +5,7 @@ using namespace app::browser::main::tab::page::navigation::history;
|
||||
Forward::Forward()
|
||||
{
|
||||
set_action_name(
|
||||
"win.main_tab_page_navigation_history_forward"
|
||||
"win.main_tab_page_navigation_history_try_forward"
|
||||
);
|
||||
|
||||
set_icon_name(
|
||||
|
Loading…
x
Reference in New Issue
Block a user