Browse Source

reorder methods, add comments

CPP-GTK4
yggverse 3 months ago
parent
commit
1d0e99e913
  1. 34
      src/app/browser/main.cpp
  2. 3
      src/app/browser/main.hpp

34
src/app/browser/main.cpp

@ -38,21 +38,8 @@ Main::Main( @@ -38,21 +38,8 @@ Main::Main(
}
// Actions
void Main::update()
{
mainTab->update(
mainTab->get_current_page()
);
};
void Main::tab_append()
{
mainTab->append(
_("New tab"),
true
);
};
/// Session
void Main::clean()
{
mainTab->clean();
@ -68,6 +55,15 @@ void Main::save() @@ -68,6 +55,15 @@ void Main::save()
mainTab->save();
};
/// Tab actions
void Main::tab_append()
{
mainTab->append(
_("New tab"),
true
);
};
void Main::tab_close()
{
mainTab->close(
@ -90,6 +86,7 @@ void Main::tab_close_all() @@ -90,6 +86,7 @@ void Main::tab_close_all()
mainTab->close_all();
};
//// Tab page navigation
void Main::tab_page_navigation_reload() {
mainTab->page_navigation_reload(
mainTab->get_current_page(), // @TODO
@ -97,6 +94,7 @@ void Main::tab_page_navigation_reload() { @@ -97,6 +94,7 @@ void Main::tab_page_navigation_reload() {
);
};
///// Tab page navigation history
void Main::tab_page_navigation_history_back()
{
mainTab->page_navigation_history_back(
@ -111,6 +109,14 @@ void Main::tab_page_navigation_history_forward() @@ -111,6 +109,14 @@ void Main::tab_page_navigation_history_forward()
);
};
/// Other
void Main::update()
{
mainTab->update(
mainTab->get_current_page()
);
};
// Getters
Glib::ustring Main::get_tab_page_title()
{

3
src/app/browser/main.hpp

@ -37,7 +37,6 @@ namespace app::browser @@ -37,7 +37,6 @@ namespace app::browser
);
// Actions
void update();
void clean();
void restore();
void save();
@ -53,6 +52,8 @@ namespace app::browser @@ -53,6 +52,8 @@ namespace app::browser
void tab_page_navigation_history_back();
void tab_page_navigation_history_forward();
void update();
// Getters
Glib::ustring get_tab_page_title();
Glib::ustring get_tab_page_description();

Loading…
Cancel
Save