From 946211167bc4ea4e2ad0dbea5067d0e58bab77be Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 6 Sep 2024 01:45:47 +0300 Subject: [PATCH] reorder methods --- src/app/browser/main.cpp | 30 +++++++++++++++--------------- src/app/browser/main.hpp | 8 ++++---- src/app/browser/main/tab.cpp | 26 +++++++++++++------------- src/app/browser/main/tab.hpp | 18 +++++++++--------- src/app/browser/main/tab/page.cpp | 22 +++++++++++----------- src/app/browser/main/tab/page.hpp | 8 ++++---- 6 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/app/browser/main.cpp b/src/app/browser/main.cpp index 462f846c..c0404ab1 100644 --- a/src/app/browser/main.cpp +++ b/src/app/browser/main.cpp @@ -22,21 +22,6 @@ Main::Main() ); } -// Getters -Glib::ustring Main::get_current_tab_page_title() -{ - return mainTab->get_page_title( - mainTab->get_current_page() - ); -}; - -Glib::ustring Main::get_current_tab_page_subtitle() -{ - return mainTab->get_page_subtitle( - mainTab->get_current_page() - ); -}; - // Actions void Main::refresh() { @@ -92,4 +77,19 @@ void Main::tab_page_navigation_history_forward() mainTab->page_navigation_history_forward( mainTab->get_current_page() // @TODO ); +}; + +// Getters +Glib::ustring Main::get_current_tab_page_title() +{ + return mainTab->get_page_title( + mainTab->get_current_page() + ); +}; + +Glib::ustring Main::get_current_tab_page_subtitle() +{ + return mainTab->get_page_subtitle( + mainTab->get_current_page() + ); }; \ No newline at end of file diff --git a/src/app/browser/main.hpp b/src/app/browser/main.hpp index 3b8fca37..bdacc6f6 100644 --- a/src/app/browser/main.hpp +++ b/src/app/browser/main.hpp @@ -25,10 +25,6 @@ namespace app::browser Main(); - // Getters - Glib::ustring get_current_tab_page_title(); - Glib::ustring get_current_tab_page_subtitle(); - // Actions void refresh(); @@ -41,6 +37,10 @@ namespace app::browser void tab_page_navigation_update(); void tab_page_navigation_history_back(); void tab_page_navigation_history_forward(); + + // Getters + Glib::ustring get_current_tab_page_title(); + Glib::ustring get_current_tab_page_subtitle(); }; } diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 10366fa8..26df2867 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -23,19 +23,6 @@ Tab::Tab() ); } -// Getters -Glib::ustring Tab::get_page_title( - const int & PAGE_NUMBER -) { - return get_tabPage(PAGE_NUMBER)->get_title(); -}; - -Glib::ustring Tab::get_page_subtitle( - const int & PAGE_NUMBER -) { - return get_tabPage(PAGE_NUMBER)->get_subtitle(); -}; - // Actions void Tab::refresh( const int & PAGE_NUMBER @@ -134,6 +121,19 @@ void Tab::page_navigation_history_forward( )->navigation_history_forward(); } +// Getters +Glib::ustring Tab::get_page_title( + const int & PAGE_NUMBER +) { + return get_tabPage(PAGE_NUMBER)->get_title(); +}; + +Glib::ustring Tab::get_page_subtitle( + const int & PAGE_NUMBER +) { + return get_tabPage(PAGE_NUMBER)->get_subtitle(); +}; + // Private helpers tab::Label * Tab::get_tabLabel( const int & PAGE_NUMBER diff --git a/src/app/browser/main/tab.hpp b/src/app/browser/main/tab.hpp index 34e4ca98..e35bf117 100644 --- a/src/app/browser/main/tab.hpp +++ b/src/app/browser/main/tab.hpp @@ -30,15 +30,6 @@ namespace app::browser::main Tab(); - // Getters - Glib::ustring get_page_title( - const int & PAGE_NUMBER - ); - - Glib::ustring get_page_subtitle( - const int & PAGE_NUMBER - ); - // Actions void refresh( const int & PAGE_NUMBER // @TODO @@ -70,6 +61,15 @@ namespace app::browser::main void page_navigation_history_forward( const int & PAGE_NUMBER ); + + // Getters + Glib::ustring get_page_title( + const int & PAGE_NUMBER + ); + + Glib::ustring get_page_subtitle( + const int & PAGE_NUMBER + ); }; } diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index 3b29faf2..98f9fec5 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -44,17 +44,6 @@ Page::Page( ); } -// Getters -Glib::ustring Page::get_title() -{ - return title; -} - -Glib::ustring Page::get_subtitle() -{ - return subtitle; -} - // Actions void Page::refresh( const Glib::ustring & TITLE, @@ -273,4 +262,15 @@ void Page::navigation_history_forward() false ); } +} + +// Getters +Glib::ustring Page::get_title() +{ + return title; +} + +Glib::ustring Page::get_subtitle() +{ + return subtitle; } \ No newline at end of file diff --git a/src/app/browser/main/tab/page.hpp b/src/app/browser/main/tab/page.hpp index 2711a23e..e86e2368 100644 --- a/src/app/browser/main/tab/page.hpp +++ b/src/app/browser/main/tab/page.hpp @@ -48,10 +48,6 @@ namespace app::browser::main::tab const Glib::ustring & REQUEST = "" ); - // Getters - Glib::ustring get_title(); - Glib::ustring get_subtitle(); - // Actions void refresh( const Glib::ustring & TITLE, @@ -65,6 +61,10 @@ namespace app::browser::main::tab void navigation_history_back(); void navigation_history_forward(); + + // Getters + Glib::ustring get_title(); + Glib::ustring get_subtitle(); }; }