From 45dc3b160aaf67acad9c1410d73c03a8af81438d Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 8 Sep 2024 02:30:48 +0300 Subject: [PATCH] draft refresh methods --- src/app/browser/main/tab/page/navigation/history.cpp | 4 ++-- src/app/browser/main/tab/page/navigation/history/back.cpp | 6 ++++++ src/app/browser/main/tab/page/navigation/history/back.hpp | 4 ++++ .../browser/main/tab/page/navigation/history/forward.cpp | 6 ++++++ .../browser/main/tab/page/navigation/history/forward.hpp | 4 ++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/app/browser/main/tab/page/navigation/history.cpp b/src/app/browser/main/tab/page/navigation/history.cpp index 02c9d895..aca2cb7e 100644 --- a/src/app/browser/main/tab/page/navigation/history.cpp +++ b/src/app/browser/main/tab/page/navigation/history.cpp @@ -28,14 +28,14 @@ void History::refresh() { Memory match; - historyBack->set_sensitive( // @TODO operate with action status + historyBack->refresh( try_back( match, false ) ); - historyForward->set_sensitive( // @TODO operate with action status + historyForward->refresh( try_forward( match, false diff --git a/src/app/browser/main/tab/page/navigation/history/back.cpp b/src/app/browser/main/tab/page/navigation/history/back.cpp index 327e111a..d02f4130 100644 --- a/src/app/browser/main/tab/page/navigation/history/back.cpp +++ b/src/app/browser/main/tab/page/navigation/history/back.cpp @@ -16,3 +16,9 @@ Back::Back() _("Back") ); } + +void Back::refresh( + const bool & ENABLED +) { + // @TODO update action status +} \ No newline at end of file diff --git a/src/app/browser/main/tab/page/navigation/history/back.hpp b/src/app/browser/main/tab/page/navigation/history/back.hpp index d5804312..7519043b 100644 --- a/src/app/browser/main/tab/page/navigation/history/back.hpp +++ b/src/app/browser/main/tab/page/navigation/history/back.hpp @@ -11,6 +11,10 @@ namespace app::browser::main::tab::page::navigation::history public: Back(); + + void refresh( + const bool & ENABLED + ); }; } diff --git a/src/app/browser/main/tab/page/navigation/history/forward.cpp b/src/app/browser/main/tab/page/navigation/history/forward.cpp index 98fe5b15..45c66f38 100644 --- a/src/app/browser/main/tab/page/navigation/history/forward.cpp +++ b/src/app/browser/main/tab/page/navigation/history/forward.cpp @@ -15,4 +15,10 @@ Forward::Forward() set_tooltip_text( _("Forward") ); +} + +void Forward::refresh( + const bool & ENABLED +) { + // @TODO update action status } \ No newline at end of file diff --git a/src/app/browser/main/tab/page/navigation/history/forward.hpp b/src/app/browser/main/tab/page/navigation/history/forward.hpp index 337c6c40..80b3a338 100644 --- a/src/app/browser/main/tab/page/navigation/history/forward.hpp +++ b/src/app/browser/main/tab/page/navigation/history/forward.hpp @@ -11,6 +11,10 @@ namespace app::browser::main::tab::page::navigation::history public: Forward(); + + void refresh( + const bool & ENABLED + ); }; }