From 6dcfb669bfa3b7b60d9a6126bcddb2df3c23549a Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 2 Sep 2024 19:07:18 +0300 Subject: [PATCH] make tab widgets managed --- src/app/browser/main/tab.cpp | 7 ++----- src/app/browser/main/tab.hpp | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/browser/main/tab.cpp b/src/app/browser/main/tab.cpp index 50f4ef3..68976b7 100644 --- a/src/app/browser/main/tab.cpp +++ b/src/app/browser/main/tab.cpp @@ -23,8 +23,6 @@ Tab::Tab() ); } -Tab::~Tab() = default; - // Getters Glib::ustring Tab::get_page_title( const int & PAGE_NUMBER @@ -44,12 +42,12 @@ void Tab::append( const Glib::ustring & REQUEST, const bool & FOCUS ) { - auto tabPage = new tab::Page( + auto tabPage = Gtk::make_managed( TITLE, REQUEST ); - auto tabLabel = new tab::Label( + auto tabLabel = Gtk::make_managed( TITLE ); @@ -78,7 +76,6 @@ void Tab::close( PAGE_NUMBER ); - // @TODO memory cleanup // @TODO fix GtkGizmo reported min height, but sizes must be >= 0 } diff --git a/src/app/browser/main/tab.hpp b/src/app/browser/main/tab.hpp index 87272be..df6efb0 100644 --- a/src/app/browser/main/tab.hpp +++ b/src/app/browser/main/tab.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace app::browser::main { @@ -30,8 +31,6 @@ namespace app::browser::main Tab(); - ~Tab(); - Glib::ustring get_page_title( const int & PAGE_NUMBER );