Browse Source

reorder methods, add comments

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

3
src/app/browser/main.hpp

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

Loading…
Cancel
Save