mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
listen enabled buttons only, disable home button on same url
This commit is contained in:
parent
75806cd295
commit
46a6a240cc
1 changed files with 36 additions and 19 deletions
|
|
@ -30,6 +30,8 @@ class Browser extends \Yggverse\Yoda\Abstract\Window
|
|||
}
|
||||
);
|
||||
|
||||
if ($this->config->interface->window->navigation->button->go)
|
||||
{
|
||||
$this->tab->navigation->go->button->connect(
|
||||
'released',
|
||||
function ($entry)
|
||||
|
|
@ -39,7 +41,10 @@ class Browser extends \Yggverse\Yoda\Abstract\Window
|
|||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->config->interface->window->navigation->button->reload)
|
||||
{
|
||||
$this->tab->navigation->reload->button->connect(
|
||||
'released',
|
||||
function ($entry)
|
||||
|
|
@ -49,8 +54,9 @@ class Browser extends \Yggverse\Yoda\Abstract\Window
|
|||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->config->homepage)
|
||||
if ($this->config->interface->window->navigation->button->home && $this->config->homepage)
|
||||
{
|
||||
$this->tab->navigation->home->button->connect(
|
||||
'released',
|
||||
|
|
@ -65,6 +71,10 @@ class Browser extends \Yggverse\Yoda\Abstract\Window
|
|||
);
|
||||
}
|
||||
);
|
||||
|
||||
$this->tab->navigation->home->button->set_sensitive(
|
||||
!($url == $this->config->homepage)
|
||||
);
|
||||
}
|
||||
|
||||
$this->window->add(
|
||||
|
|
@ -168,5 +178,12 @@ class Browser extends \Yggverse\Yoda\Abstract\Window
|
|||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($this->config->interface->window->navigation->button->home && $this->config->homepage)
|
||||
{
|
||||
$this->tab->navigation->home->button->set_sensitive(
|
||||
!($url == $this->config->homepage)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue