Browse Source

make tab widgets managed

CPP-GTK4
yggverse 3 months ago
parent
commit
6dcfb669bf
  1. 7
      src/app/browser/main/tab.cpp
  2. 3
      src/app/browser/main/tab.hpp

7
src/app/browser/main/tab.cpp

@ -23,8 +23,6 @@ Tab::Tab()
); );
} }
Tab::~Tab() = default;
// Getters // Getters
Glib::ustring Tab::get_page_title( Glib::ustring Tab::get_page_title(
const int & PAGE_NUMBER const int & PAGE_NUMBER
@ -44,12 +42,12 @@ void Tab::append(
const Glib::ustring & REQUEST, const Glib::ustring & REQUEST,
const bool & FOCUS const bool & FOCUS
) { ) {
auto tabPage = new tab::Page( auto tabPage = Gtk::make_managed<tab::Page>(
TITLE, TITLE,
REQUEST REQUEST
); );
auto tabLabel = new tab::Label( auto tabLabel = Gtk::make_managed<tab::Label>(
TITLE TITLE
); );
@ -78,7 +76,6 @@ void Tab::close(
PAGE_NUMBER PAGE_NUMBER
); );
// @TODO memory cleanup
// @TODO fix GtkGizmo reported min height, but sizes must be >= 0 // @TODO fix GtkGizmo reported min height, but sizes must be >= 0
} }

3
src/app/browser/main/tab.hpp

@ -4,6 +4,7 @@
#include <glibmm/i18n.h> #include <glibmm/i18n.h>
#include <glibmm/ustring.h> #include <glibmm/ustring.h>
#include <gtkmm/notebook.h> #include <gtkmm/notebook.h>
#include <gtkmm/object.h>
namespace app::browser::main namespace app::browser::main
{ {
@ -30,8 +31,6 @@ namespace app::browser::main
Tab(); Tab();
~Tab();
Glib::ustring get_page_title( Glib::ustring get_page_title(
const int & PAGE_NUMBER const int & PAGE_NUMBER
); );

Loading…
Cancel
Save