mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
add page title support, make arguments linked const
This commit is contained in:
parent
8b55faef35
commit
c75744f777
6 changed files with 40 additions and 12 deletions
|
|
@ -6,8 +6,12 @@
|
|||
using namespace app::browser::main::tab;
|
||||
|
||||
Page::Page(
|
||||
const Glib::ustring & navbar_request_text
|
||||
const Glib::ustring & TITLE,
|
||||
const Glib::ustring & REQUEST
|
||||
) {
|
||||
// Init extras
|
||||
title = TITLE;
|
||||
|
||||
// Init container
|
||||
set_orientation(
|
||||
Gtk::Orientation::VERTICAL
|
||||
|
|
@ -32,7 +36,7 @@ Page::Page(
|
|||
|
||||
// Init components
|
||||
pageNavbar = new page::Navbar(
|
||||
navbar_request_text
|
||||
REQUEST
|
||||
);
|
||||
|
||||
append(
|
||||
|
|
@ -63,8 +67,17 @@ Page::~Page()
|
|||
delete pageProgressbar;
|
||||
}
|
||||
|
||||
// Getters
|
||||
Glib::ustring Page::get_title()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
// Actions
|
||||
void Page::update()
|
||||
{
|
||||
title = _("Loading..");
|
||||
|
||||
// Reset progress
|
||||
pageProgressbar->set(
|
||||
0
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace app::browser::main::tab
|
|||
{
|
||||
char buffer[0xfffff]; // 1Mb
|
||||
|
||||
Glib::ustring title;
|
||||
|
||||
Glib::RefPtr<Gio::SocketClient> GioSocketClient_RefPtr;
|
||||
Glib::RefPtr<Gio::SocketConnection> GioSocketConnection_RefPtr;
|
||||
|
||||
|
|
@ -37,11 +39,16 @@ namespace app::browser::main::tab
|
|||
public:
|
||||
|
||||
Page(
|
||||
const Glib::ustring & navbar_request_text = ""
|
||||
const Glib::ustring & TITLE,
|
||||
const Glib::ustring & REQUEST = ""
|
||||
);
|
||||
|
||||
~Page();
|
||||
|
||||
// Getters
|
||||
Glib::ustring get_title();
|
||||
|
||||
// Actions
|
||||
void update();
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue