diff --git a/config.json b/config.json index c31a3b0f..60dfc13c 100644 --- a/config.json +++ b/config.json @@ -13,6 +13,16 @@ "close":true } }, + "navigation": + { + "button": + { + "go": + { + "enabled":true + } + } + }, "width":640, "height":480 } diff --git a/src/Box/Navigation.php b/src/Box/Navigation.php index ae4e471b..131eeb62 100644 --- a/src/Box/Navigation.php +++ b/src/Box/Navigation.php @@ -9,6 +9,7 @@ class Navigation public \GtkBox $box; public \Yggverse\Yoda\Entry\Address $address; + public \Yggverse\Yoda\Button\Go $go; public function __construct( string $name = 'boxNavigation' @@ -16,7 +17,7 @@ class Navigation global $config; $this->box = new \GtkBox( - \GtkOrientation::VERTICAL + \GtkOrientation::HORIZONTAL ); $this->box->set_name( @@ -27,8 +28,23 @@ class Navigation $config->homepage ); - $this->box->add( - $this->address->entry + $this->box->pack_start( + $this->address->entry, + true, + true, + 8 ); + + if ($config->interface->window->navigation->button->go->enabled) + { + $this->go = new \Yggverse\Yoda\Button\Go(); + + $this->box->pack_end( + $this->go->button, + false, + false, + 8 + ); + } } } \ No newline at end of file diff --git a/src/Button/Go.php b/src/Button/Go.php new file mode 100644 index 00000000..5c5fdc1c --- /dev/null +++ b/src/Button/Go.php @@ -0,0 +1,18 @@ +button = \GtkButton::new_with_label( + $label + ); + } +} \ No newline at end of file