From ec1864a858ace9ada148a448327211b2e733bdbf Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 8 Sep 2024 07:47:39 +0300 Subject: [PATCH] update header refresh api --- src/app/browser.cpp | 11 ++++++----- src/app/browser/header.cpp | 13 +++++-------- src/app/browser/header.hpp | 9 +++------ 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/app/browser.cpp b/src/app/browser.cpp index 23571e96..63177b04 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -15,11 +15,8 @@ Browser::Browser( { browserMain->refresh(); - browserHeader->set_title( - browserMain->get_current_tab_page_title() - ); - - browserHeader->set_subtitle( + browserHeader->refresh( + browserMain->get_current_tab_page_title(), browserMain->get_current_tab_page_subtitle() ); } @@ -92,6 +89,10 @@ Browser::Browser( } ); + ACTION__MAIN_TAB_PAGE_NAVIGATION_UPDATE->set_enabled( + false + ); + const auto ACTION__MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK = add_action( "main_tab_page_navigation_history_back", [this] diff --git a/src/app/browser/header.cpp b/src/app/browser/header.cpp index a3fa2c99..d79b4378 100644 --- a/src/app/browser/header.cpp +++ b/src/app/browser/header.cpp @@ -34,18 +34,15 @@ Header::Header() ); } -void Header::set_title( - const Glib::ustring & VALUE +void Header::refresh( + const Glib::ustring & TITLE, + const Glib::ustring & SUBTITLE ) { headerMain->set_title( - VALUE + TITLE ); -} -void Header::set_subtitle( - const Glib::ustring & VALUE -) { headerMain->set_subtitle( - VALUE + SUBTITLE ); } \ No newline at end of file diff --git a/src/app/browser/header.hpp b/src/app/browser/header.hpp index 8c26b583..31b0d1e6 100644 --- a/src/app/browser/header.hpp +++ b/src/app/browser/header.hpp @@ -28,12 +28,9 @@ namespace app::browser Header(); - void set_title( - const Glib::ustring & VALUE - ); - - void set_subtitle( - const Glib::ustring & VALUE + void refresh( + const Glib::ustring & TITLE, + const Glib::ustring & SUBTITLE ); }; }