From 2c792d9773666c20ba552615f91fa0a888cd4c4e Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 11 Sep 2024 05:52:05 +0300 Subject: [PATCH] add get_progress_fraction method, remove action extra call --- src/app/browser/main/tab/page.cpp | 12 +++++++----- src/app/browser/main/tab/page.hpp | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index 5a3ab984..1f4bda11 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -125,19 +125,16 @@ void Page::update( const Glib::ustring & DESCRIPTION, const double & PROGRESS_FRACTION ) { - // Refresh page data + // Update page data mime = MIME; title = TITLE; description = DESCRIPTION; progress_fraction = PROGRESS_FRACTION; - // Refresh children components + // Update children components pageNavigation->update( progress_fraction ); - - // Refresh parent window - action__refresh->activate(); } void Page::navigation_update( @@ -389,6 +386,11 @@ Glib::ustring Page::get_description() return description; } +double Page::get_progress_fraction() +{ + return progress_fraction; +} + Glib::ustring Page::get_navigation_request_text() { return pageNavigation->get_request_text(); diff --git a/src/app/browser/main/tab/page.hpp b/src/app/browser/main/tab/page.hpp index d8522316..f0297efd 100644 --- a/src/app/browser/main/tab/page.hpp +++ b/src/app/browser/main/tab/page.hpp @@ -144,8 +144,9 @@ namespace app::browser::main::tab MIME get_mime(); Glib::ustring get_title(); Glib::ustring get_description(); + double get_progress_fraction(); - Glib::ustring get_navigation_request_text(); + Glib::ustring get_navigation_request_text(); // Setters void set_navbar_request_text(