update new tab api

This commit is contained in:
yggverse 2024-08-26 22:29:09 +03:00
parent 65bc5ef6f4
commit dd68120c10
9 changed files with 77 additions and 52 deletions

View file

@ -3,17 +3,27 @@
using namespace app::browser::main::tab::page::navbar;
// Construct
Request::Request()
{
Request::Request(
const Glib::ustring & text
) {
// Init entry
set_placeholder_text(
_("URL or search term...")
);
set_hexpand(
true
HEXPAND
);
if (!text.empty())
{
set_text(
text
);
parse();
}
// Connect events
signal_changed().connect(
[this]

View file

@ -10,6 +10,8 @@ namespace app::browser::main::tab::page::navbar
{
class Request : public Gtk::Entry
{
const bool HEXPAND = true;
Glib::ustring scheme,
host,
port,
@ -20,7 +22,9 @@ namespace app::browser::main::tab::page::navbar
public:
Request();
Request(
const Glib::ustring & text = ""
);
~Request();