mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
use local gtk show initiation instead of show_all method
This commit is contained in:
parent
5fda126ea9
commit
12a1473d8c
28 changed files with 79 additions and 10 deletions
|
|
@ -23,6 +23,10 @@ abstract class Button
|
||||||
$this->_label
|
$this->_label
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
|
// Init events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'clicked',
|
'clicked',
|
||||||
function(
|
function(
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@ abstract class Entry
|
||||||
$this->_value
|
$this->_value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
|
// Init events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'activate',
|
'activate',
|
||||||
function(
|
function(
|
||||||
|
|
|
||||||
|
|
@ -59,5 +59,8 @@ class Browser
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->container->gtk
|
$this->container->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -38,6 +38,9 @@ class Container
|
||||||
true,
|
true,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh()
|
public function refresh()
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class Tab
|
||||||
'gemini://yggverse.cities.yesterweb.org'
|
'gemini://yggverse.cities.yesterweb.org'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Connect events
|
// Init events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'switch-page',
|
'switch-page',
|
||||||
function (
|
function (
|
||||||
|
|
@ -101,6 +101,7 @@ class Tab
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->gtk->show_all();
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ class Page
|
||||||
);
|
);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
$this->gtk->show_all();
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh(): void
|
public function refresh(): void
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,9 @@ class Content
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->viewport->gtk
|
$this->viewport->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh()
|
public function refresh()
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,10 @@ class Data
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
|
// Init events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'activate-link',
|
'activate-link',
|
||||||
function(
|
function(
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,8 @@ class Viewport
|
||||||
|
|
||||||
// Init viewport
|
// Init viewport
|
||||||
$this->gtk = new \GtkViewport;
|
$this->gtk = new \GtkViewport;
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -94,6 +94,9 @@ class Navbar
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->go->gtk
|
$this->go->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh()
|
public function refresh()
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,9 @@ class History
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->forward->gtk
|
$this->forward->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add(
|
public function add(
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class Response
|
||||||
|
|
||||||
public function show(): void
|
public function show(): void
|
||||||
{
|
{
|
||||||
$this->gtk->show_all();
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hide(): void
|
public function hide(): void
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,9 @@ class Header
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->navigation->gtk
|
$this->navigation->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTitle(
|
public function setTitle(
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,8 @@ class Navigation
|
||||||
$this->gtk->set_popup(
|
$this->gtk->set_popup(
|
||||||
$this->menu->gtk
|
$this->menu->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -59,5 +59,8 @@ class History
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->container->gtk
|
$this->container->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -49,6 +49,9 @@ class Container
|
||||||
true,
|
true,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh()
|
public function refresh()
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,9 @@ class Content
|
||||||
$this->viewport->gtk
|
$this->viewport->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
// Do initial search
|
// Do initial search
|
||||||
$this->search();
|
$this->search();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,10 @@ class Table
|
||||||
$this->data->gtk
|
$this->data->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
// Connect events
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
|
// Init events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'row-activated',
|
'row-activated',
|
||||||
function()
|
function()
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,8 @@ class Viewport
|
||||||
|
|
||||||
// Init viewport
|
// Init viewport
|
||||||
$this->gtk = new \GtkViewport;
|
$this->gtk = new \GtkViewport;
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -94,6 +94,9 @@ class Navbar
|
||||||
$this->gtk->add(
|
$this->gtk->add(
|
||||||
$this->search->gtk
|
$this->search->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refresh(): void
|
public function refresh(): void
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,8 @@ class Header
|
||||||
$this->gtk->set_subtitle(
|
$this->gtk->set_subtitle(
|
||||||
$this->_subtitle
|
$this->_subtitle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -62,6 +62,6 @@ class Menu
|
||||||
);
|
);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
$this->gtk->show_all();
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -25,6 +25,9 @@ class History
|
||||||
$this->_label
|
$this->_label
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
// Int events
|
// Int events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'activate',
|
'activate',
|
||||||
|
|
@ -33,8 +36,6 @@ class History
|
||||||
$history = new \Yggverse\Yoda\Entity\Browser\History(
|
$history = new \Yggverse\Yoda\Entity\Browser\History(
|
||||||
$this->menu->browser
|
$this->menu->browser
|
||||||
);
|
);
|
||||||
|
|
||||||
$history->gtk->show_all();
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ class Quit
|
||||||
$this->_label
|
$this->_label
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
// Int events
|
// Int events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'activate',
|
'activate',
|
||||||
|
|
|
||||||
|
|
@ -56,5 +56,8 @@ class Tab
|
||||||
$this->gtk->set_submenu(
|
$this->gtk->set_submenu(
|
||||||
$tab
|
$tab
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -25,6 +25,9 @@ class Add
|
||||||
$this->_label
|
$this->_label
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
// Init events
|
// Init events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'activate',
|
'activate',
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ class Close
|
||||||
$this->_label
|
$this->_label
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Render
|
||||||
|
$this->gtk->show();
|
||||||
|
|
||||||
// Int events
|
// Int events
|
||||||
$this->gtk->connect(
|
$this->gtk->connect(
|
||||||
'activate',
|
'activate',
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,4 @@ $browser->gtk->connect(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$browser->gtk->show_all();
|
|
||||||
|
|
||||||
\Gtk::main();
|
\Gtk::main();
|
||||||
Loading…
Add table
Add a link
Reference in a new issue