Browse Source

use local gtk show initiation instead of show_all method

PHP-GTK3
yggverse 4 months ago
parent
commit
12a1473d8c
  1. 4
      src/Abstract/Entity/Button.php
  2. 4
      src/Abstract/Entity/Entry.php
  3. 3
      src/Entity/Browser.php
  4. 3
      src/Entity/Browser/Container.php
  5. 5
      src/Entity/Browser/Container/Tab.php
  6. 2
      src/Entity/Browser/Container/Tab/Page.php
  7. 3
      src/Entity/Browser/Container/Tab/Page/Content.php
  8. 4
      src/Entity/Browser/Container/Tab/Page/Content/Data.php
  9. 3
      src/Entity/Browser/Container/Tab/Page/Content/Viewport.php
  10. 3
      src/Entity/Browser/Container/Tab/Page/Navbar.php
  11. 3
      src/Entity/Browser/Container/Tab/Page/Navbar/History.php
  12. 2
      src/Entity/Browser/Container/Tab/Page/Response.php
  13. 3
      src/Entity/Browser/Header.php
  14. 3
      src/Entity/Browser/Header/Navigation.php
  15. 3
      src/Entity/Browser/History.php
  16. 3
      src/Entity/Browser/History/Container.php
  17. 3
      src/Entity/Browser/History/Container/Content.php
  18. 5
      src/Entity/Browser/History/Container/Content/Table.php
  19. 3
      src/Entity/Browser/History/Container/Content/Viewport.php
  20. 3
      src/Entity/Browser/History/Container/Navbar.php
  21. 3
      src/Entity/Browser/History/Header.php
  22. 2
      src/Entity/Browser/Menu.php
  23. 5
      src/Entity/Browser/Menu/History.php
  24. 3
      src/Entity/Browser/Menu/Quit.php
  25. 3
      src/Entity/Browser/Menu/Tab.php
  26. 3
      src/Entity/Browser/Menu/Tab/Add.php
  27. 3
      src/Entity/Browser/Menu/Tab/Close.php
  28. 2
      src/Yoda.php

4
src/Abstract/Entity/Button.php

@ -23,6 +23,10 @@ abstract class Button @@ -23,6 +23,10 @@ abstract class Button
$this->_label
);
// Render
$this->gtk->show();
// Init events
$this->gtk->connect(
'clicked',
function(

4
src/Abstract/Entity/Entry.php

@ -28,6 +28,10 @@ abstract class Entry @@ -28,6 +28,10 @@ abstract class Entry
$this->_value
);
// Render
$this->gtk->show();
// Init events
$this->gtk->connect(
'activate',
function(

3
src/Entity/Browser.php

@ -59,5 +59,8 @@ class Browser @@ -59,5 +59,8 @@ class Browser
$this->gtk->add(
$this->container->gtk
);
// Render
$this->gtk->show();
}
}

3
src/Entity/Browser/Container.php

@ -38,6 +38,9 @@ class Container @@ -38,6 +38,9 @@ class Container
true,
0
);
// Render
$this->gtk->show();
}
public function refresh()

5
src/Entity/Browser/Container/Tab.php

@ -33,7 +33,7 @@ class Tab @@ -33,7 +33,7 @@ class Tab
'gemini://yggverse.cities.yesterweb.org'
);
// Connect events
// Init events
$this->gtk->connect(
'switch-page',
function (
@ -101,6 +101,7 @@ class Tab @@ -101,6 +101,7 @@ class Tab
);
}
$this->gtk->show_all();
// Render
$this->gtk->show();
}
}

2
src/Entity/Browser/Container/Tab/Page.php

@ -66,7 +66,7 @@ class Page @@ -66,7 +66,7 @@ class Page
);
// Render
$this->gtk->show_all();
$this->gtk->show();
}
public function refresh(): void

3
src/Entity/Browser/Container/Tab/Page/Content.php

@ -67,6 +67,9 @@ class Content @@ -67,6 +67,9 @@ class Content
$this->gtk->add(
$this->viewport->gtk
);
// Render
$this->gtk->show();
}
public function refresh()

4
src/Entity/Browser/Container/Tab/Page/Content/Data.php

@ -54,6 +54,10 @@ class Data @@ -54,6 +54,10 @@ class Data
0
);
// Render
$this->gtk->show();
// Init events
$this->gtk->connect(
'activate-link',
function(

3
src/Entity/Browser/Container/Tab/Page/Content/Viewport.php

@ -19,5 +19,8 @@ class Viewport @@ -19,5 +19,8 @@ class Viewport
// Init viewport
$this->gtk = new \GtkViewport;
// Render
$this->gtk->show();
}
}

3
src/Entity/Browser/Container/Tab/Page/Navbar.php

@ -94,6 +94,9 @@ class Navbar @@ -94,6 +94,9 @@ class Navbar
$this->gtk->add(
$this->go->gtk
);
// Render
$this->gtk->show();
}
public function refresh()

3
src/Entity/Browser/Container/Tab/Page/Navbar/History.php

@ -50,6 +50,9 @@ class History @@ -50,6 +50,9 @@ class History
$this->gtk->add(
$this->forward->gtk
);
// Render
$this->gtk->show();
}
public function add(

2
src/Entity/Browser/Container/Tab/Page/Response.php

@ -81,7 +81,7 @@ class Response @@ -81,7 +81,7 @@ class Response
public function show(): void
{
$this->gtk->show_all();
$this->gtk->show();
}
public function hide(): void

3
src/Entity/Browser/Header.php

@ -50,6 +50,9 @@ class Header @@ -50,6 +50,9 @@ class Header
$this->gtk->add(
$this->navigation->gtk
);
// Render
$this->gtk->show();
}
public function setTitle(

3
src/Entity/Browser/Header/Navigation.php

@ -33,5 +33,8 @@ class Navigation @@ -33,5 +33,8 @@ class Navigation
$this->gtk->set_popup(
$this->menu->gtk
);
// Render
$this->gtk->show();
}
}

3
src/Entity/Browser/History.php

@ -59,5 +59,8 @@ class History @@ -59,5 +59,8 @@ class History
$this->gtk->add(
$this->container->gtk
);
// Render
$this->gtk->show();
}
}

3
src/Entity/Browser/History/Container.php

@ -49,6 +49,9 @@ class Container @@ -49,6 +49,9 @@ class Container
true,
0
);
// Render
$this->gtk->show();
}
public function refresh()

3
src/Entity/Browser/History/Container/Content.php

@ -60,6 +60,9 @@ class Content @@ -60,6 +60,9 @@ class Content
$this->viewport->gtk
);
// Render
$this->gtk->show();
// Do initial search
$this->search();
}

5
src/Entity/Browser/History/Container/Content/Table.php

@ -66,7 +66,10 @@ class Table @@ -66,7 +66,10 @@ class Table
$this->data->gtk
);
// Connect events
// Render
$this->gtk->show();
// Init events
$this->gtk->connect(
'row-activated',
function()

3
src/Entity/Browser/History/Container/Content/Viewport.php

@ -19,5 +19,8 @@ class Viewport @@ -19,5 +19,8 @@ class Viewport
// Init viewport
$this->gtk = new \GtkViewport;
// Render
$this->gtk->show();
}
}

3
src/Entity/Browser/History/Container/Navbar.php

@ -94,6 +94,9 @@ class Navbar @@ -94,6 +94,9 @@ class Navbar
$this->gtk->add(
$this->search->gtk
);
// Render
$this->gtk->show();
}
public function refresh(): void

3
src/Entity/Browser/History/Header.php

@ -27,5 +27,8 @@ class Header @@ -27,5 +27,8 @@ class Header
$this->gtk->set_subtitle(
$this->_subtitle
);
// Render
$this->gtk->show();
}
}

2
src/Entity/Browser/Menu.php

@ -62,6 +62,6 @@ class Menu @@ -62,6 +62,6 @@ class Menu
);
// Render
$this->gtk->show_all();
$this->gtk->show();
}
}

5
src/Entity/Browser/Menu/History.php

@ -25,6 +25,9 @@ class History @@ -25,6 +25,9 @@ class History
$this->_label
);
// Render
$this->gtk->show();
// Int events
$this->gtk->connect(
'activate',
@ -33,8 +36,6 @@ class History @@ -33,8 +36,6 @@ class History
$history = new \Yggverse\Yoda\Entity\Browser\History(
$this->menu->browser
);
$history->gtk->show_all();
}
);
}

3
src/Entity/Browser/Menu/Quit.php

@ -25,6 +25,9 @@ class Quit @@ -25,6 +25,9 @@ class Quit
$this->_label
);
// Render
$this->gtk->show();
// Int events
$this->gtk->connect(
'activate',

3
src/Entity/Browser/Menu/Tab.php

@ -56,5 +56,8 @@ class Tab @@ -56,5 +56,8 @@ class Tab
$this->gtk->set_submenu(
$tab
);
// Render
$this->gtk->show();
}
}

3
src/Entity/Browser/Menu/Tab/Add.php

@ -25,6 +25,9 @@ class Add @@ -25,6 +25,9 @@ class Add
$this->_label
);
// Render
$this->gtk->show();
// Init events
$this->gtk->connect(
'activate',

3
src/Entity/Browser/Menu/Tab/Close.php

@ -25,6 +25,9 @@ class Close @@ -25,6 +25,9 @@ class Close
$this->_label
);
// Render
$this->gtk->show();
// Int events
$this->gtk->connect(
'activate',

2
src/Yoda.php

@ -36,6 +36,4 @@ $browser->gtk->connect( @@ -36,6 +36,4 @@ $browser->gtk->connect(
}
);
$browser->gtk->show_all();
\Gtk::main();
Loading…
Cancel
Save