diff --git a/src/Yoda/Browser.cpp b/src/Yoda/Browser.cpp index eed81774..cb139cba 100644 --- a/src/Yoda/Browser.cpp +++ b/src/Yoda/Browser.cpp @@ -9,13 +9,6 @@ Yoda::Browser::Browser( ) ); - gtk_window_set_title( - GTK_WINDOW( - this->gtk - ), - Browser::TITLE - ); - gtk_window_set_default_size( GTK_WINDOW( this->gtk @@ -24,15 +17,11 @@ Yoda::Browser::Browser( Browser::HEIGHT ); - GtkWidget *label = gtk_label_new( - "Hello, World!" - ); - - gtk_window_set_child( + gtk_window_set_titlebar( GTK_WINDOW( this->gtk ), - label + (new YodaBrowser::Header())->gtk ); gtk_widget_show( @@ -40,6 +29,4 @@ Yoda::Browser::Browser( this->gtk ) ); - - // @TODO signals } \ No newline at end of file diff --git a/src/Yoda/Browser.h b/src/Yoda/Browser.h index 5081342b..952f2adb 100644 --- a/src/Yoda/Browser.h +++ b/src/Yoda/Browser.h @@ -3,6 +3,8 @@ #include "../main.h" +#include "Browser/Header.h" + namespace Yoda { class Browser @@ -13,7 +15,6 @@ namespace Yoda const guint WIDTH = 640; const guint HEIGHT = 480; - const gchar* TITLE = "Yoda"; Browser( GtkApplication *application diff --git a/src/Yoda/Browser/Header.cpp b/src/Yoda/Browser/Header.cpp index 6283b2ae..ccb2a137 100644 --- a/src/Yoda/Browser/Header.cpp +++ b/src/Yoda/Browser/Header.cpp @@ -1,8 +1,7 @@ #include "Header.h" -YodaBrowser::Header::Header( - Yoda::Browser *browser -) { +YodaBrowser::Header::Header() +{ // Init GTK this->gtk = gtk_header_bar_new(); diff --git a/src/Yoda/Browser/Header.h b/src/Yoda/Browser/Header.h index 8b32cb88..719148b6 100644 --- a/src/Yoda/Browser/Header.h +++ b/src/Yoda/Browser/Header.h @@ -3,27 +3,17 @@ #include "../../main.h" -#include "../Browser.h" - namespace YodaBrowser { class Header { public: - // GTK GtkWidget *gtk; - // Dependencies - Yoda::Browser *browser; - - // Defaults const gboolean SHOW_TITLE_BUTTONS = true; - // Construct - Header( - Yoda::Browser *browser - ); + Header(); }; };