Browse Source

draft history push method

CPP-GTK4
yggverse 2 months ago
parent
commit
8118613a1f
  1. 5
      src/app/browser/main/tab/page.cpp
  2. 8
      src/app/browser/main/tab/page/navbar.cpp
  3. 4
      src/app/browser/main/tab/page/navbar.hpp
  4. 7
      src/app/browser/main/tab/page/navbar/history.cpp
  5. 4
      src/app/browser/main/tab/page/navbar/history.hpp

5
src/app/browser/main/tab/page.cpp

@ -87,6 +87,11 @@ void Page::refresh() @@ -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(),

8
src/app/browser/main/tab/page/navbar.cpp

@ -96,6 +96,14 @@ Navbar::~Navbar() @@ -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

4
src/app/browser/main/tab/page/navbar.hpp

@ -38,6 +38,10 @@ namespace app::browser::main::tab::page @@ -38,6 +38,10 @@ namespace app::browser::main::tab::page
~Navbar();
// Actions
void history_push(
const Glib::ustring & VALUE
);
void refresh();
// Setters

7
src/app/browser/main/tab/page/navbar/history.cpp

@ -29,6 +29,13 @@ History::~History() @@ -29,6 +29,13 @@ History::~History()
delete forward;
};
// Actions
void History::push(
const Glib::ustring & VALUE
) {
// @TODO
}
void History::refresh()
{
back->set_sensitive(

4
src/app/browser/main/tab/page/navbar/history.hpp

@ -30,6 +30,10 @@ namespace app::browser::main::tab::page::navbar @@ -30,6 +30,10 @@ namespace app::browser::main::tab::page::navbar
~History();
void push(
const Glib::ustring & VALUE
);
void refresh();
};
}

Loading…
Cancel
Save