From 618d8bd530ad8c0d039a12e2151299c25ebe1a57 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 9 Sep 2024 22:23:23 +0300 Subject: [PATCH] remove extra arguments --- src/app/browser/main.cpp | 7 ++----- src/app/browser/main/tab.cpp | 30 +++++++++++++----------------- src/app/browser/main/tab.hpp | 7 ++----- 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/src/app/browser/main.cpp b/src/app/browser/main.cpp index 13127eb7..ca6e93b7 100644 --- a/src/app/browser/main.cpp +++ b/src/app/browser/main.cpp @@ -47,11 +47,8 @@ void Main::refresh() void Main::tab_append() { - const unsigned char * REQUEST; // @TODO - - mainTab->append( - REQUEST, - true + mainTab->set_current_page( + mainTab->append() ); }; diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 6b9cc97c..483f99ac 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -68,12 +68,17 @@ Tab::Tab( { while (sqlite3_step(statement) == SQLITE_ROW) { - append( - ::sqlite3_column_text( - statement, - DB::APP_BROWSER_MAIN_TAB::REQUEST - ), - true + const int PAGE_NUMBER = append(); + + /* @TODO set request + ::sqlite3_column_text( + statement, + DB::APP_BROWSER_MAIN_TAB::REQUEST + ); + */ + + set_current_page( + PAGE_NUMBER ); } } @@ -167,10 +172,8 @@ void Tab::refresh( ); } -int Tab::append( - const unsigned char * REQUEST, - const bool & FOCUS -) { +int Tab::append() +{ const auto TAB_PAGE = new tab::Page( action__refresh, action__tab_page_navigation_history_back, @@ -192,13 +195,6 @@ int Tab::append( REORDERABLE ); - if (FOCUS) - { - set_current_page( - PAGE_NUMBER - ); - } - return PAGE_NUMBER; }; diff --git a/src/app/browser/main/tab.hpp b/src/app/browser/main/tab.hpp index 1a9d825f..9a0dedc9 100644 --- a/src/app/browser/main/tab.hpp +++ b/src/app/browser/main/tab.hpp @@ -66,13 +66,10 @@ namespace app::browser::main // Actions void refresh( - const int & PAGE_NUMBER // @TODO + const int & PAGE_NUMBER ); - int append( - const unsigned char * REQUEST, - const bool & FOCUS - ); + int append(); void close( const int & PAGE_NUMBER