diff --git a/config.json b/config.json index 1160d66a..73a9f0e1 100644 --- a/config.json +++ b/config.json @@ -17,6 +17,10 @@ { "button": { + "home":true, + "back":true, + "forward":true, + "reload":true, "go":true } }, diff --git a/src/Box/Navigation.php b/src/Box/Navigation.php index 69da102c..64e09a8a 100644 --- a/src/Box/Navigation.php +++ b/src/Box/Navigation.php @@ -9,6 +9,11 @@ class Navigation public \GtkBox $box; public \Yggverse\Yoda\Entry\Address $address; + + public \Yggverse\Yoda\Button\Home $home; + public \Yggverse\Yoda\Button\Back $back; + public \Yggverse\Yoda\Button\Forward $forward; + public \Yggverse\Yoda\Button\Reload $reload; public \Yggverse\Yoda\Button\Go $go; public function __construct( @@ -24,6 +29,54 @@ class Navigation $name ); + if ($config->interface->window->navigation->button->home) + { + $this->home = new \Yggverse\Yoda\Button\Home(); + + $this->box->pack_start( + $this->home->button, + false, + false, + 8 + ); + } + + if ($config->interface->window->navigation->button->back) + { + $this->back = new \Yggverse\Yoda\Button\Back(); + + $this->box->pack_start( + $this->back->button, + false, + false, + 8 + ); + } + + if ($config->interface->window->navigation->button->forward) + { + $this->forward = new \Yggverse\Yoda\Button\Forward(); + + $this->box->pack_start( + $this->forward->button, + false, + false, + 8 + ); + } + + if ($config->interface->window->navigation->button->reload) + { + $this->reload = new \Yggverse\Yoda\Button\Reload(); + + $this->box->pack_start( + $this->reload->button, + false, + false, + 8 + ); + } + $this->address = new \Yggverse\Yoda\Entry\Address( $config->homepage ); diff --git a/src/Button/Back.php b/src/Button/Back.php new file mode 100644 index 00000000..acd131ae --- /dev/null +++ b/src/Button/Back.php @@ -0,0 +1,18 @@ +button = \GtkButton::new_with_label( + $label + ); + } +} \ No newline at end of file diff --git a/src/Button/Forward.php b/src/Button/Forward.php new file mode 100644 index 00000000..6619b689 --- /dev/null +++ b/src/Button/Forward.php @@ -0,0 +1,18 @@ +button = \GtkButton::new_with_label( + $label + ); + } +} \ No newline at end of file diff --git a/src/Button/Home.php b/src/Button/Home.php new file mode 100644 index 00000000..d4194079 --- /dev/null +++ b/src/Button/Home.php @@ -0,0 +1,18 @@ +button = \GtkButton::new_with_label( + $label + ); + } +} \ No newline at end of file diff --git a/src/Button/Reload.php b/src/Button/Reload.php new file mode 100644 index 00000000..2f97768f --- /dev/null +++ b/src/Button/Reload.php @@ -0,0 +1,18 @@ +button = \GtkButton::new_with_label( + $label + ); + } +} \ No newline at end of file