Browse Source

update component objects namespace

CPP-GTK4
yggverse 3 months ago
parent
commit
c67435a0b8
  1. 28
      src/app/browser.cpp
  2. 4
      src/app/browser.hpp

28
src/app/browser.cpp

@ -19,17 +19,17 @@ Browser::Browser(
); );
// Init header widget // Init header widget
header = new browser::Header(); browserHeader = new browser::Header();
set_titlebar( set_titlebar(
* header * browserHeader
); );
// Init main widget // Init main widget
main = new browser::Main(); browserMain = new browser::Main();
set_child( set_child(
* main * browserMain
); );
// Init actions // Init actions
@ -37,7 +37,7 @@ Browser::Browser(
"tab_append", "tab_append",
[this] [this]
{ {
main->tab_append(); browserMain->tab_append();
} }
); );
@ -45,7 +45,7 @@ Browser::Browser(
"tab_update", "tab_update",
[this] [this]
{ {
main->tab_update(); browserMain->tab_update();
} }
); );
@ -54,7 +54,7 @@ Browser::Browser(
"tab_close", "tab_close",
[this] [this]
{ {
main->tab_close(); browserMain->tab_close();
} }
); );
@ -63,7 +63,7 @@ Browser::Browser(
"tab_close_left", "tab_close_left",
[this] [this]
{ {
main->tab_close_left(); browserMain->tab_close_left();
} }
); );
@ -71,7 +71,7 @@ Browser::Browser(
"tab_close_right", "tab_close_right",
[this] [this]
{ {
main->tab_close_right(); browserMain->tab_close_right();
} }
); );
@ -79,7 +79,7 @@ Browser::Browser(
"tab_close_all", "tab_close_all",
[this] [this]
{ {
main->tab_close_all(); browserMain->tab_close_all();
} }
); );
@ -99,8 +99,8 @@ Browser::Browser(
"refresh", "refresh",
[this] [this]
{ {
header->set_title( browserHeader->set_title(
main->get_current_tab_label_text() browserMain->get_current_tab_label_text()
); );
} }
); );
@ -108,6 +108,6 @@ Browser::Browser(
Browser::~Browser() Browser::~Browser()
{ {
delete header; delete browserHeader;
delete main; delete browserMain;
} }

4
src/app/browser.hpp

@ -19,8 +19,8 @@ namespace app
class Browser : public Gtk::ApplicationWindow class Browser : public Gtk::ApplicationWindow
{ {
app::browser::Header * header; app::browser::Header * browserHeader;
app::browser::Main * main; app::browser::Main * browserMain;
const int WIDTH = 640; const int WIDTH = 640;
const int HEIGHT = 480; const int HEIGHT = 480;

Loading…
Cancel
Save