mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
remove data type from variables name
This commit is contained in:
parent
d812e59794
commit
c52a9a3f78
4 changed files with 21 additions and 21 deletions
|
|
@ -10,14 +10,14 @@ Label::Label(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Setup label controller
|
// Setup label controller
|
||||||
auto GtkGestureClick_RefPtr = Gtk::GestureClick::create();
|
auto GtkGestureClick = Gtk::GestureClick::create();
|
||||||
|
|
||||||
/* @TODO remove as default
|
/* @TODO remove as default
|
||||||
controller->set_button(
|
controller->set_button(
|
||||||
GDK_BUTTON_PRIMARY
|
GDK_BUTTON_PRIMARY
|
||||||
);*/
|
);*/
|
||||||
|
|
||||||
GtkGestureClick_RefPtr->signal_pressed().connect(
|
GtkGestureClick->signal_pressed().connect(
|
||||||
[this](int n, double x, double y)
|
[this](int n, double x, double y)
|
||||||
{
|
{
|
||||||
if (n == 2) // double click
|
if (n == 2) // double click
|
||||||
|
|
@ -30,7 +30,7 @@ Label::Label(
|
||||||
);
|
);
|
||||||
|
|
||||||
add_controller(
|
add_controller(
|
||||||
GtkGestureClick_RefPtr
|
GtkGestureClick
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ Page::Page(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init actions group
|
// Init actions group
|
||||||
auto GioSimpleActionGroup_RefPtr = Gio::SimpleActionGroup::create();
|
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
|
||||||
|
|
||||||
// Define group actions
|
// Define group actions
|
||||||
GioSimpleActionGroup_RefPtr->add_action(
|
GioSimpleActionGroup->add_action(
|
||||||
"update",
|
"update",
|
||||||
[this]
|
[this]
|
||||||
{
|
{
|
||||||
|
|
@ -29,7 +29,7 @@ Page::Page(
|
||||||
|
|
||||||
insert_action_group(
|
insert_action_group(
|
||||||
"page",
|
"page",
|
||||||
GioSimpleActionGroup_RefPtr
|
GioSimpleActionGroup
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init components
|
// Init components
|
||||||
|
|
@ -130,21 +130,21 @@ void Page::update(
|
||||||
else if ("gemini" == pageNavbar->get_request_scheme())
|
else if ("gemini" == pageNavbar->get_request_scheme())
|
||||||
{
|
{
|
||||||
// Create new socket connection
|
// Create new socket connection
|
||||||
GioSocketClient_RefPtr = Gio::SocketClient::create();
|
GioSocketClient = Gio::SocketClient::create();
|
||||||
|
|
||||||
GioSocketClient_RefPtr->set_tls(
|
GioSocketClient->set_tls(
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
GioSocketClient_RefPtr->set_tls_validation_flags(
|
GioSocketClient->set_tls_validation_flags(
|
||||||
Gio::TlsCertificateFlags::NO_FLAGS
|
Gio::TlsCertificateFlags::NO_FLAGS
|
||||||
);
|
);
|
||||||
|
|
||||||
GioSocketClient_RefPtr->set_timeout(
|
GioSocketClient->set_timeout(
|
||||||
15 // @TODO
|
15 // @TODO
|
||||||
);
|
);
|
||||||
|
|
||||||
GioSocketClient_RefPtr->connect_to_uri_async(
|
GioSocketClient->connect_to_uri_async(
|
||||||
pageNavbar->get_request_text(), 1965,
|
pageNavbar->get_request_text(), 1965,
|
||||||
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
|
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
|
||||||
{
|
{
|
||||||
|
|
@ -158,7 +158,7 @@ void Page::update(
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GioSocketConnection_RefPtr = GioSocketClient_RefPtr->connect_to_uri_finish(
|
GioSocketConnection = GioSocketClient->connect_to_uri_finish(
|
||||||
result
|
result
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -172,11 +172,11 @@ void Page::update(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connection established, begin request
|
// Connection established, begin request
|
||||||
if (GioSocketConnection_RefPtr != nullptr)
|
if (GioSocketConnection != nullptr)
|
||||||
{
|
{
|
||||||
const Glib::ustring request = pageNavbar->get_request_text() + "\r\n";
|
const Glib::ustring request = pageNavbar->get_request_text() + "\r\n";
|
||||||
|
|
||||||
GioSocketConnection_RefPtr->get_output_stream()->write_async(
|
GioSocketConnection->get_output_stream()->write_async(
|
||||||
request.data(),
|
request.data(),
|
||||||
request.size(),
|
request.size(),
|
||||||
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
|
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
|
||||||
|
|
@ -191,7 +191,7 @@ void Page::update(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Response
|
// Response
|
||||||
GioSocketConnection_RefPtr->get_input_stream()->read_async( // | read_all_async
|
GioSocketConnection->get_input_stream()->read_async( // | read_all_async
|
||||||
buffer,
|
buffer,
|
||||||
sizeof(buffer) - 1,
|
sizeof(buffer) - 1,
|
||||||
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
|
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
|
||||||
|
|
@ -237,7 +237,7 @@ void Page::update(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
GioSocketConnection_RefPtr->close();
|
GioSocketConnection->close();
|
||||||
|
|
||||||
refresh(
|
refresh(
|
||||||
pageNavbar->get_request_host(), // @TODO title
|
pageNavbar->get_request_host(), // @TODO title
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ namespace app::browser::main::tab
|
||||||
// Socket
|
// Socket
|
||||||
char buffer[0xfffff]; // 1Mb
|
char buffer[0xfffff]; // 1Mb
|
||||||
|
|
||||||
Glib::RefPtr<Gio::SocketClient> GioSocketClient_RefPtr;
|
Glib::RefPtr<Gio::SocketClient> GioSocketClient;
|
||||||
Glib::RefPtr<Gio::SocketConnection> GioSocketConnection_RefPtr;
|
Glib::RefPtr<Gio::SocketConnection> GioSocketConnection;
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
page::Content * pageContent;
|
page::Content * pageContent;
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,10 @@ Navbar::Navbar(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init actions group
|
// Init actions group
|
||||||
auto GioSimpleActionGroup_RefPtr = Gio::SimpleActionGroup::create();
|
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
|
||||||
|
|
||||||
// Define group actions
|
// Define group actions
|
||||||
GioSimpleActionGroup_RefPtr->add_action(
|
GioSimpleActionGroup->add_action(
|
||||||
"refresh",
|
"refresh",
|
||||||
[this]
|
[this]
|
||||||
{
|
{
|
||||||
|
|
@ -82,7 +82,7 @@ Navbar::Navbar(
|
||||||
|
|
||||||
insert_action_group(
|
insert_action_group(
|
||||||
"navbar",
|
"navbar",
|
||||||
GioSimpleActionGroup_RefPtr
|
GioSimpleActionGroup
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue