Browse Source

show homepage button only if provided in settings

PHP-GTK3
yggverse 6 months ago
parent
commit
b2e4cf70b9
  1. 2
      src/Box/Navigation.php
  2. 27
      src/Box/Tab.php

2
src/Box/Navigation.php

@ -29,7 +29,7 @@ class Navigation @@ -29,7 +29,7 @@ class Navigation
$name
);
if ($config->interface->window->navigation->button->home)
if ($config->interface->window->navigation->button->home && $config->homepage)
{
$this->home = new \Yggverse\Yoda\Button\Home();

27
src/Box/Tab.php

@ -109,19 +109,22 @@ class Tab @@ -109,19 +109,22 @@ class Tab
}
);
$this->navigation->home->button->connect(
'released',
function ($entry)
{
$this->navigation->address->entry->set_text(
$this->config->homepage
);
if ($this->config->homepage)
{
$this->navigation->home->button->connect(
'released',
function ($entry)
{
$this->navigation->address->entry->set_text(
$this->config->homepage
);
$this->navigate(
$this->config->homepage
);
}
);
$this->navigate(
$this->config->homepage
);
}
);
}
// @TODO back, forward buttons
}

Loading…
Cancel
Save