From c574d6e8bf8b4f7a8d4d0d6049a9614a1fd239b3 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 11 Sep 2024 02:34:02 +0300 Subject: [PATCH] rename refresh method to update --- src/app/browser.cpp | 4 ++-- src/app/browser/header.cpp | 2 +- src/app/browser/header.hpp | 2 +- src/app/browser/main.cpp | 4 ++-- src/app/browser/main.hpp | 2 +- src/app/browser/main/tab.cpp | 6 +++--- src/app/browser/main/tab.hpp | 2 +- src/app/browser/main/tab/page.cpp | 4 ++-- src/app/browser/main/tab/page.hpp | 2 +- src/app/browser/main/tab/page/navigation.cpp | 8 ++++---- src/app/browser/main/tab/page/navigation.hpp | 2 +- src/app/browser/main/tab/page/navigation/history.cpp | 6 +++--- src/app/browser/main/tab/page/navigation/history.hpp | 2 +- src/app/browser/main/tab/page/navigation/history/back.cpp | 2 +- src/app/browser/main/tab/page/navigation/history/back.hpp | 2 +- .../browser/main/tab/page/navigation/history/forward.cpp | 2 +- .../browser/main/tab/page/navigation/history/forward.hpp | 2 +- src/app/browser/main/tab/page/navigation/request.cpp | 2 +- src/app/browser/main/tab/page/navigation/request.hpp | 2 +- src/app/browser/main/tab/page/navigation/update.cpp | 2 +- src/app/browser/main/tab/page/navigation/update.hpp | 2 +- 21 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/app/browser.cpp b/src/app/browser.cpp index 56ec5b11..a7c5e3fd 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -13,9 +13,9 @@ Browser::Browser( "refresh", [this] { - browserMain->refresh(); + browserMain->update(); - browserHeader->refresh( + browserHeader->update( browserMain->get_current_tab_page_title(), browserMain->get_current_tab_page_description() ); diff --git a/src/app/browser/header.cpp b/src/app/browser/header.cpp index c2798387..9f412d88 100644 --- a/src/app/browser/header.cpp +++ b/src/app/browser/header.cpp @@ -53,7 +53,7 @@ Header::Header( ); } -void Header::refresh( +void Header::update( const Glib::ustring & TITLE, const Glib::ustring & SUBTITLE ) { diff --git a/src/app/browser/header.hpp b/src/app/browser/header.hpp index bea4ccc1..85bd020e 100644 --- a/src/app/browser/header.hpp +++ b/src/app/browser/header.hpp @@ -41,7 +41,7 @@ namespace app::browser const Glib::RefPtr & ACTION__MAIN_TAB_PAGE_NAVIGATION_UPDATE ); - void refresh( + void update( const Glib::ustring & TITLE, const Glib::ustring & SUBTITLE ); diff --git a/src/app/browser/main.cpp b/src/app/browser/main.cpp index fa42ee27..f746b554 100644 --- a/src/app/browser/main.cpp +++ b/src/app/browser/main.cpp @@ -38,9 +38,9 @@ Main::Main( } // Actions -void Main::refresh() +void Main::update() { - mainTab->refresh( + mainTab->update( mainTab->get_current_page() ); }; diff --git a/src/app/browser/main.hpp b/src/app/browser/main.hpp index 76cbfcd9..841fbb19 100644 --- a/src/app/browser/main.hpp +++ b/src/app/browser/main.hpp @@ -37,7 +37,7 @@ namespace app::browser ); // Actions - void refresh(); + void update(); void restore(); void save(); diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 8db3ea2b..9e7abb44 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -131,7 +131,7 @@ void Tab::save() } // Actions -void Tab::refresh( +void Tab::update( const int & PAGE_NUMBER ) { const auto TAB_PAGE = get_tabPage( @@ -144,7 +144,7 @@ void Tab::refresh( TAB_PAGE->get_title() ); - TAB_PAGE->refresh(); + TAB_PAGE->update(); action__tab_close_active->set_enabled( get_n_pages() > 0 @@ -192,7 +192,7 @@ int Tab::append( ); } - refresh( + update( PAGE_NUMBER ); diff --git a/src/app/browser/main/tab.hpp b/src/app/browser/main/tab.hpp index 9cbff628..916eef1b 100644 --- a/src/app/browser/main/tab.hpp +++ b/src/app/browser/main/tab.hpp @@ -119,7 +119,7 @@ namespace app::browser::main const int & PAGE_NUMBER ); - void refresh( + void update( const int & PAGE_NUMBER ); diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index 83c73150..94eb4f72 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -63,9 +63,9 @@ Page::Page( } // Actions -void Page::refresh() +void Page::update() { - pageNavigation->refresh( + pageNavigation->update( progress_fraction ); } diff --git a/src/app/browser/main/tab/page.hpp b/src/app/browser/main/tab/page.hpp index f3780e76..256c298a 100644 --- a/src/app/browser/main/tab/page.hpp +++ b/src/app/browser/main/tab/page.hpp @@ -117,7 +117,7 @@ namespace app::browser::main::tab ); // Actions - void refresh(); + void update(); int save( const sqlite3_int64 & APP_BROWSER_MAIN_TAB__SESSION__ID diff --git a/src/app/browser/main/tab/page/navigation.cpp b/src/app/browser/main/tab/page/navigation.cpp index 7451551b..7833b49c 100644 --- a/src/app/browser/main/tab/page/navigation.cpp +++ b/src/app/browser/main/tab/page/navigation.cpp @@ -86,7 +86,7 @@ Navigation::Navigation( } // Actions -void Navigation::refresh( +void Navigation::update( const double & PROGRESS_FRACTION ) { // Toggle base button sensibility @@ -95,15 +95,15 @@ void Navigation::refresh( ); // Refresh history widget - navigationHistory->refresh(); + navigationHistory->update(); // Toggle update button sensibility - navigationUpdate->refresh( + navigationUpdate->update( navigationRequest->get_text_length() > 0 ); // Refresh request area (with progressbar) - navigationRequest->refresh( + navigationRequest->update( PROGRESS_FRACTION ); } diff --git a/src/app/browser/main/tab/page/navigation.hpp b/src/app/browser/main/tab/page/navigation.hpp index e258f8c7..e987f453 100644 --- a/src/app/browser/main/tab/page/navigation.hpp +++ b/src/app/browser/main/tab/page/navigation.hpp @@ -88,7 +88,7 @@ namespace app::browser::main::tab::page ); // Actions - void refresh( + void update( const double & PROGRESS_FRACTION ); diff --git a/src/app/browser/main/tab/page/navigation/history.cpp b/src/app/browser/main/tab/page/navigation/history.cpp index 5e37d3a4..978c9974 100644 --- a/src/app/browser/main/tab/page/navigation/history.cpp +++ b/src/app/browser/main/tab/page/navigation/history.cpp @@ -30,18 +30,18 @@ History::History( } // Actions -void History::refresh() +void History::update() { Memory match; - historyBack->refresh( + historyBack->update( try_back( match, false ) ); - historyForward->refresh( + historyForward->update( try_forward( match, false diff --git a/src/app/browser/main/tab/page/navigation/history.hpp b/src/app/browser/main/tab/page/navigation/history.hpp index 326dec30..1a9b8186 100644 --- a/src/app/browser/main/tab/page/navigation/history.hpp +++ b/src/app/browser/main/tab/page/navigation/history.hpp @@ -50,7 +50,7 @@ namespace app::browser::main::tab::page::navigation const bool & UPDATE_MEMORY_INDEX ); - void refresh(); + void update(); void save(); // @TODO save history to the permanent storage diff --git a/src/app/browser/main/tab/page/navigation/history/back.cpp b/src/app/browser/main/tab/page/navigation/history/back.cpp index adaf49da..fc833876 100644 --- a/src/app/browser/main/tab/page/navigation/history/back.cpp +++ b/src/app/browser/main/tab/page/navigation/history/back.cpp @@ -29,7 +29,7 @@ Back::Back( ); } -void Back::refresh( +void Back::update( const bool & ENABLED ) { set_sensitive( diff --git a/src/app/browser/main/tab/page/navigation/history/back.hpp b/src/app/browser/main/tab/page/navigation/history/back.hpp index 37b903ca..4169d71e 100644 --- a/src/app/browser/main/tab/page/navigation/history/back.hpp +++ b/src/app/browser/main/tab/page/navigation/history/back.hpp @@ -18,7 +18,7 @@ namespace app::browser::main::tab::page::navigation::history const Glib::RefPtr & ACTION__BACK ); - void refresh( + void update( const bool & ENABLED ); }; diff --git a/src/app/browser/main/tab/page/navigation/history/forward.cpp b/src/app/browser/main/tab/page/navigation/history/forward.cpp index 8dc5bd04..62fae5fd 100644 --- a/src/app/browser/main/tab/page/navigation/history/forward.cpp +++ b/src/app/browser/main/tab/page/navigation/history/forward.cpp @@ -29,7 +29,7 @@ Forward::Forward( ); } -void Forward::refresh( +void Forward::update( const bool & ENABLED ) { set_sensitive( diff --git a/src/app/browser/main/tab/page/navigation/history/forward.hpp b/src/app/browser/main/tab/page/navigation/history/forward.hpp index 60e260c7..95f04e1d 100644 --- a/src/app/browser/main/tab/page/navigation/history/forward.hpp +++ b/src/app/browser/main/tab/page/navigation/history/forward.hpp @@ -18,7 +18,7 @@ namespace app::browser::main::tab::page::navigation::history const Glib::RefPtr & ACTION__FORWARD ); - void refresh( + void update( const bool & ENABLED ); }; diff --git a/src/app/browser/main/tab/page/navigation/request.cpp b/src/app/browser/main/tab/page/navigation/request.cpp index 7a19cba3..87a500e9 100644 --- a/src/app/browser/main/tab/page/navigation/request.cpp +++ b/src/app/browser/main/tab/page/navigation/request.cpp @@ -51,7 +51,7 @@ Request::Request( } // Actions -void Request::refresh( +void Request::update( const double & PROGRESS_FRACTION ) { // Update progress diff --git a/src/app/browser/main/tab/page/navigation/request.hpp b/src/app/browser/main/tab/page/navigation/request.hpp index f7e821ef..b24b0eab 100644 --- a/src/app/browser/main/tab/page/navigation/request.hpp +++ b/src/app/browser/main/tab/page/navigation/request.hpp @@ -91,7 +91,7 @@ namespace app::browser::main::tab::page::navigation ); // Actions - void refresh( + void update( const double & PROGRESS_FRACTION ); diff --git a/src/app/browser/main/tab/page/navigation/update.cpp b/src/app/browser/main/tab/page/navigation/update.cpp index 18657e8a..a835a5d0 100644 --- a/src/app/browser/main/tab/page/navigation/update.cpp +++ b/src/app/browser/main/tab/page/navigation/update.cpp @@ -29,7 +29,7 @@ Update::Update( ); } -void Update::refresh( +void Update::update( const bool & ENABLED ) { set_sensitive( diff --git a/src/app/browser/main/tab/page/navigation/update.hpp b/src/app/browser/main/tab/page/navigation/update.hpp index 2f375539..7be8437d 100644 --- a/src/app/browser/main/tab/page/navigation/update.hpp +++ b/src/app/browser/main/tab/page/navigation/update.hpp @@ -18,7 +18,7 @@ namespace app::browser::main::tab::page::navigation const Glib::RefPtr & ACTION__UPDATE ); - void refresh( + void update( const bool & ENABLED ); };