Browse Source

remove data type from variables name

CPP-GTK4
yggverse 3 months ago
parent
commit
c52a9a3f78
  1. 6
      src/app/browser/main/tab/label.cpp
  2. 26
      src/app/browser/main/tab/page.cpp
  3. 4
      src/app/browser/main/tab/page.hpp
  4. 6
      src/app/browser/main/tab/page/navbar.cpp

6
src/app/browser/main/tab/label.cpp

@ -10,14 +10,14 @@ Label::Label( @@ -10,14 +10,14 @@ Label::Label(
);
// Setup label controller
auto GtkGestureClick_RefPtr = Gtk::GestureClick::create();
auto GtkGestureClick = Gtk::GestureClick::create();
/* @TODO remove as default
controller->set_button(
GDK_BUTTON_PRIMARY
);*/
GtkGestureClick_RefPtr->signal_pressed().connect(
GtkGestureClick->signal_pressed().connect(
[this](int n, double x, double y)
{
if (n == 2) // double click
@ -30,7 +30,7 @@ Label::Label( @@ -30,7 +30,7 @@ Label::Label(
);
add_controller(
GtkGestureClick_RefPtr
GtkGestureClick
);
}

26
src/app/browser/main/tab/page.cpp

@ -16,10 +16,10 @@ Page::Page( @@ -16,10 +16,10 @@ Page::Page(
);
// Init actions group
auto GioSimpleActionGroup_RefPtr = Gio::SimpleActionGroup::create();
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
// Define group actions
GioSimpleActionGroup_RefPtr->add_action(
GioSimpleActionGroup->add_action(
"update",
[this]
{
@ -29,7 +29,7 @@ Page::Page( @@ -29,7 +29,7 @@ Page::Page(
insert_action_group(
"page",
GioSimpleActionGroup_RefPtr
GioSimpleActionGroup
);
// Init components
@ -130,21 +130,21 @@ void Page::update( @@ -130,21 +130,21 @@ void Page::update(
else if ("gemini" == pageNavbar->get_request_scheme())
{
// Create new socket connection
GioSocketClient_RefPtr = Gio::SocketClient::create();
GioSocketClient = Gio::SocketClient::create();
GioSocketClient_RefPtr->set_tls(
GioSocketClient->set_tls(
true
);
GioSocketClient_RefPtr->set_tls_validation_flags(
GioSocketClient->set_tls_validation_flags(
Gio::TlsCertificateFlags::NO_FLAGS
);
GioSocketClient_RefPtr->set_timeout(
GioSocketClient->set_timeout(
15 // @TODO
);
GioSocketClient_RefPtr->connect_to_uri_async(
GioSocketClient->connect_to_uri_async(
pageNavbar->get_request_text(), 1965,
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
{
@ -158,7 +158,7 @@ void Page::update( @@ -158,7 +158,7 @@ void Page::update(
try
{
GioSocketConnection_RefPtr = GioSocketClient_RefPtr->connect_to_uri_finish(
GioSocketConnection = GioSocketClient->connect_to_uri_finish(
result
);
}
@ -172,11 +172,11 @@ void Page::update( @@ -172,11 +172,11 @@ void Page::update(
}
// Connection established, begin request
if (GioSocketConnection_RefPtr != nullptr)
if (GioSocketConnection != nullptr)
{
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.size(),
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
@ -191,7 +191,7 @@ void Page::update( @@ -191,7 +191,7 @@ void Page::update(
);
// Response
GioSocketConnection_RefPtr->get_input_stream()->read_async( // | read_all_async
GioSocketConnection->get_input_stream()->read_async( // | read_all_async
buffer,
sizeof(buffer) - 1,
[this](const Glib::RefPtr<Gio::AsyncResult> & result)
@ -237,7 +237,7 @@ void Page::update( @@ -237,7 +237,7 @@ void Page::update(
);
}
GioSocketConnection_RefPtr->close();
GioSocketConnection->close();
refresh(
pageNavbar->get_request_host(), // @TODO title

4
src/app/browser/main/tab/page.hpp

@ -33,8 +33,8 @@ namespace app::browser::main::tab @@ -33,8 +33,8 @@ namespace app::browser::main::tab
// Socket
char buffer[0xfffff]; // 1Mb
Glib::RefPtr<Gio::SocketClient> GioSocketClient_RefPtr;
Glib::RefPtr<Gio::SocketConnection> GioSocketConnection_RefPtr;
Glib::RefPtr<Gio::SocketClient> GioSocketClient;
Glib::RefPtr<Gio::SocketConnection> GioSocketConnection;
// Components
page::Content * pageContent;

6
src/app/browser/main/tab/page/navbar.cpp

@ -69,10 +69,10 @@ Navbar::Navbar( @@ -69,10 +69,10 @@ Navbar::Navbar(
);
// Init actions group
auto GioSimpleActionGroup_RefPtr = Gio::SimpleActionGroup::create();
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
// Define group actions
GioSimpleActionGroup_RefPtr->add_action(
GioSimpleActionGroup->add_action(
"refresh",
[this]
{
@ -82,7 +82,7 @@ Navbar::Navbar( @@ -82,7 +82,7 @@ Navbar::Navbar(
insert_action_group(
"navbar",
GioSimpleActionGroup_RefPtr
GioSimpleActionGroup
);
}

Loading…
Cancel
Save