set tab label title on construct

This commit is contained in:
yggverse 2024-08-27 14:26:27 +03:00
parent a55dce8008
commit faa32d68bd
3 changed files with 11 additions and 5 deletions

View File

@ -58,7 +58,9 @@ void Tab::append(
REQUEST
);
auto tabLabel = new tab::Label;
auto tabLabel = new tab::Label(
TITLE
);
int page_number = append_page(
* tabPage,

View File

@ -2,10 +2,11 @@
using namespace app::browser::main::tab;
Label::Label()
{
Label::Label(
const Glib::ustring & TEXT
) {
set_text(
_("New tab")
TEXT
);
// Setup label controller

View File

@ -3,6 +3,7 @@
#include <glibmm/i18n.h>
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
#include <gtkmm/gestureclick.h>
#include <gtkmm/label.h>
@ -20,7 +21,9 @@ namespace app::browser::main::tab
public:
Label();
Label(
const Glib::ustring & TEXT
);
~Label();
};