From ea0370d07eaee25c42f01eaf4247a6d31dc774b2 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 20 Jul 2024 12:23:47 +0300 Subject: [PATCH] draft source_remove --- .../Browser/Container/Page/Navbar/Request.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Entity/Browser/Container/Page/Navbar/Request.php b/src/Entity/Browser/Container/Page/Navbar/Request.php index 5198af5b..c4666394 100644 --- a/src/Entity/Browser/Container/Page/Navbar/Request.php +++ b/src/Entity/Browser/Container/Page/Navbar/Request.php @@ -8,6 +8,8 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb { protected string $_placeholder = 'URL or search term...'; + private ?int $_changed = null; + protected function _onActivate( \GtkEntry $entry ): void @@ -36,8 +38,15 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb // Update session on tab initiated only if (isset($this->navbar->page->container->tab)) { - \Gtk::timeout_add( - 1000, // wait for one second to apply changes + // Reset previous event + if ($this->_changed) + { + // @TODO source_remove #125 + } + + // Wait for one second to apply act + $this->_changed = \Gtk::timeout_add( + 1000, function() { $this->navbar->page->container->tab->update();