From 8118613a1f8e5ec842e79062405d8abdc63e95c3 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 29 Aug 2024 04:02:38 +0300 Subject: [PATCH] draft history push method --- src/app/browser/main/tab/page.cpp | 5 +++++ src/app/browser/main/tab/page/navbar.cpp | 8 ++++++++ src/app/browser/main/tab/page/navbar.hpp | 4 ++++ src/app/browser/main/tab/page/navbar/history.cpp | 7 +++++++ src/app/browser/main/tab/page/navbar/history.hpp | 4 ++++ 5 files changed, 28 insertions(+) diff --git a/src/app/browser/main/tab/page.cpp b/src/app/browser/main/tab/page.cpp index 5ede0b34..bf18b472 100644 --- a/src/app/browser/main/tab/page.cpp +++ b/src/app/browser/main/tab/page.cpp @@ -87,6 +87,11 @@ void Page::refresh() void Page::update() { + // Update navigation history + pageNavbar->history_push( + pageNavbar->get_request_text() + ); + // Update page extras set( pageNavbar->get_request_host(), diff --git a/src/app/browser/main/tab/page/navbar.cpp b/src/app/browser/main/tab/page/navbar.cpp index bdda84d8..cef16d91 100644 --- a/src/app/browser/main/tab/page/navbar.cpp +++ b/src/app/browser/main/tab/page/navbar.cpp @@ -96,6 +96,14 @@ Navbar::~Navbar() }; // Actions +void Navbar::history_push( + const Glib::ustring & VALUE +) { + navbarHistory->push( + VALUE + ); +} + void Navbar::refresh() { // Toggle base button sensibility diff --git a/src/app/browser/main/tab/page/navbar.hpp b/src/app/browser/main/tab/page/navbar.hpp index 2698e552..005974c1 100644 --- a/src/app/browser/main/tab/page/navbar.hpp +++ b/src/app/browser/main/tab/page/navbar.hpp @@ -38,6 +38,10 @@ namespace app::browser::main::tab::page ~Navbar(); // Actions + void history_push( + const Glib::ustring & VALUE + ); + void 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 42d81093..466e07c8 100644 --- a/src/app/browser/main/tab/page/navbar/history.cpp +++ b/src/app/browser/main/tab/page/navbar/history.cpp @@ -29,6 +29,13 @@ History::~History() delete forward; }; +// Actions +void History::push( + const Glib::ustring & VALUE +) { + // @TODO +} + void History::refresh() { back->set_sensitive( diff --git a/src/app/browser/main/tab/page/navbar/history.hpp b/src/app/browser/main/tab/page/navbar/history.hpp index 7a7a8b80..6077856d 100644 --- a/src/app/browser/main/tab/page/navbar/history.hpp +++ b/src/app/browser/main/tab/page/navbar/history.hpp @@ -30,6 +30,10 @@ namespace app::browser::main::tab::page::navbar ~History(); + void push( + const Glib::ustring & VALUE + ); + void refresh(); }; }