From 8d74798eddc25fd665a388c078f0a22cfb7b14a9 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 29 Aug 2024 03:46:36 +0300 Subject: [PATCH] draft refresh method --- src/app/browser/main/tab/page/navbar.cpp | 3 +++ src/app/browser/main/tab/page/navbar/history.cpp | 11 +++++++++++ src/app/browser/main/tab/page/navbar/history.hpp | 2 ++ 3 files changed, 16 insertions(+) diff --git a/src/app/browser/main/tab/page/navbar.cpp b/src/app/browser/main/tab/page/navbar.cpp index b1961ec3..bdda84d8 100644 --- a/src/app/browser/main/tab/page/navbar.cpp +++ b/src/app/browser/main/tab/page/navbar.cpp @@ -107,6 +107,9 @@ void Navbar::refresh() navbarUpdate->set_sensitive( navbarRequest->get_text_length() > 0 ); + + // Refresh history widget + navbarHistory->refresh(); } // Setters diff --git a/src/app/browser/main/tab/page/navbar/history.cpp b/src/app/browser/main/tab/page/navbar/history.cpp index 6c90566e..42d81093 100644 --- a/src/app/browser/main/tab/page/navbar/history.cpp +++ b/src/app/browser/main/tab/page/navbar/history.cpp @@ -28,3 +28,14 @@ History::~History() delete back; delete forward; }; + +void History::refresh() +{ + back->set_sensitive( + false // @TODO + ); + + forward->set_sensitive( + false // @TODO + ); +} \ No newline at end of file diff --git a/src/app/browser/main/tab/page/navbar/history.hpp b/src/app/browser/main/tab/page/navbar/history.hpp index fd4a6bc0..7a7a8b80 100644 --- a/src/app/browser/main/tab/page/navbar/history.hpp +++ b/src/app/browser/main/tab/page/navbar/history.hpp @@ -29,6 +29,8 @@ namespace app::browser::main::tab::page::navbar History(); ~History(); + + void refresh(); }; }