From c44c278c33d7af5c50b5df1c13c5b27f2c8be185 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 11 Sep 2024 06:30:50 +0300 Subject: [PATCH] fix tab update action --- src/app/browser/main/tab.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 2f4984ba..82ab90dd 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -70,7 +70,7 @@ int Tab::restore() while (sqlite3_step(statement) == SQLITE_ROW) { const int PAGE_NUMBER = append( - _("Restore.."), + _("Restore"), sqlite3_column_int( statement, DB::SESSION::IS_CURRENT @@ -85,7 +85,7 @@ int Tab::restore() statement, DB::SESSION::ID ) - ); + ); // maybe not much reasons to restore as page title in use @TODO get_tabPage( PAGE_NUMBER @@ -150,18 +150,27 @@ void Tab::save() void Tab::update( const int & PAGE_NUMBER ) { + // Get tab page const auto TAB_PAGE = get_tabPage( PAGE_NUMBER ); + // Update tab page component + TAB_PAGE->update( + TAB_PAGE->get_mime(), + TAB_PAGE->get_title(), + TAB_PAGE->get_description(), + TAB_PAGE->get_progress_fraction() + ); // just action delegate @TODO + + // Update tab label component get_tabLabel( PAGE_NUMBER )->set_label( TAB_PAGE->get_title() ); - // TAB_PAGE->update(); @TODO meant refresh? - + // Update tab actions status action__tab_close_active->set_enabled( get_n_pages() > 0 );