From 98a572a1c0b737479875b6a0c06a887152588d6b Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 20 Aug 2024 15:25:31 +0300 Subject: [PATCH] implement set_title method --- src/app/browser/header.cpp | 10 +++++++++- src/app/browser/header.hpp | 5 +++++ src/app/browser/header/main.cpp | 8 ++++++++ src/app/browser/header/main.hpp | 5 +++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/app/browser/header.cpp b/src/app/browser/header.cpp index b667153f..193fe257 100644 --- a/src/app/browser/header.cpp +++ b/src/app/browser/header.cpp @@ -36,7 +36,15 @@ Header::Header() Header::~Header() { + delete main; delete menu; delete tab; - delete main; +} + +void Header::set_title( + const Glib::ustring text +) { + main->set_title( + text + ); } \ No newline at end of file diff --git a/src/app/browser/header.hpp b/src/app/browser/header.hpp index 01347630..b8376e5c 100644 --- a/src/app/browser/header.hpp +++ b/src/app/browser/header.hpp @@ -1,6 +1,7 @@ #ifndef APP_BROWSER_HEADER_HPP #define APP_BROWSER_HEADER_HPP +#include #include namespace app::browser @@ -23,6 +24,10 @@ namespace app::browser Header(); ~Header(); + + void set_title( + const Glib::ustring text + ); }; } diff --git a/src/app/browser/header/main.cpp b/src/app/browser/header/main.cpp index d7a393c9..105f2691 100644 --- a/src/app/browser/header/main.cpp +++ b/src/app/browser/header/main.cpp @@ -21,4 +21,12 @@ Main::Main() Main::~Main() { delete title; +} + +void Main::set_title( + const Glib::ustring text +) { + title->set_text( + text + ); } \ No newline at end of file diff --git a/src/app/browser/header/main.hpp b/src/app/browser/header/main.hpp index bee098c2..b1b56c09 100644 --- a/src/app/browser/header/main.hpp +++ b/src/app/browser/header/main.hpp @@ -1,6 +1,7 @@ #ifndef APP_BROWSER_HEADER_MAIN_HPP #define APP_BROWSER_HEADER_MAIN_HPP +#include #include namespace app::browser::header @@ -19,6 +20,10 @@ namespace app::browser::header Main(); ~Main(); + + void set_title( + const Glib::ustring text + ); }; }