Browse Source

change menu namespace

PHP-GTK3
yggverse 5 months ago
parent
commit
445b6c06fc
  1. 2
      src/Entity/Browser/Header.php
  2. 6
      src/Entity/Browser/Header/Navigation.php
  3. 16
      src/Entity/Browser/Menu.php
  4. 8
      src/Entity/Browser/Menu/History.php
  5. 6
      src/Entity/Browser/Menu/Quit.php

2
src/Entity/Browser/Header.php

@ -42,7 +42,7 @@ class Header @@ -42,7 +42,7 @@ class Header
$this->_subtitle
);
// Init navigation element
// Init navigation
$this->navigation = new Navigation(
$this
);

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

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Header;
use \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu;
use \Yggverse\Yoda\Entity\Browser\Menu;
class Navigation
{
@ -14,7 +14,7 @@ class Navigation @@ -14,7 +14,7 @@ class Navigation
public \Yggverse\Yoda\Entity\Browser\Header $header;
// Requirements
public \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu $menu;
public \Yggverse\Yoda\Entity\Browser\Menu $menu;
public function __construct(
\Yggverse\Yoda\Entity\Browser\Header $header
@ -27,7 +27,7 @@ class Navigation @@ -27,7 +27,7 @@ class Navigation
// Init menu
$this->menu = new Menu(
$this
$this->header->browser
);
$this->gtk->set_popup(

16
src/Entity/Browser/Header/Navigation/Menu.php → src/Entity/Browser/Menu.php

@ -2,27 +2,27 @@ @@ -2,27 +2,27 @@
declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Header\Navigation;
namespace Yggverse\Yoda\Entity\Browser;
use \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu\History;
use \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu\Quit;
use \Yggverse\Yoda\Entity\Browser\Menu\History;
use \Yggverse\Yoda\Entity\Browser\Menu\Quit;
class Menu
{
public \GtkMenu $gtk;
// Dependencies
public \Yggverse\Yoda\Entity\Browser\Header\Navigation $navigation;
public \Yggverse\Yoda\Entity\Browser $browser;
// Requirements
public \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu\History $history;
public \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu\Quit $quit;
public \Yggverse\Yoda\Entity\Browser\Menu\History $history;
public \Yggverse\Yoda\Entity\Browser\Menu\Quit $quit;
public function __construct(
\Yggverse\Yoda\Entity\Browser\Header\Navigation $navigation
\Yggverse\Yoda\Entity\Browser $browser
) {
// Init dependencies
$this->navigation = $navigation;
$this->browser = $browser;
// Init menu
$this->gtk = new \GtkMenu;

8
src/Entity/Browser/Header/Navigation/Menu/History.php → src/Entity/Browser/Menu/History.php

@ -2,20 +2,20 @@ @@ -2,20 +2,20 @@
declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu;
namespace Yggverse\Yoda\Entity\Browser\Menu;
class History
{
public \GtkMenuItem $gtk;
// Dependencies
public \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu $menu;
public \Yggverse\Yoda\Entity\Browser\Menu $menu;
// Defaults
private string $_label = 'History';
public function __construct(
\Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu $menu
\Yggverse\Yoda\Entity\Browser\Menu $menu
) {
// Init dependencies
$this->menu = $menu;
@ -31,7 +31,7 @@ class History @@ -31,7 +31,7 @@ class History
function()
{
$history = new \Yggverse\Yoda\Entity\Browser\History(
$this->menu->navigation->header->browser
$this->menu->browser
);
$history->gtk->show_all();

6
src/Entity/Browser/Header/Navigation/Menu/Quit.php → src/Entity/Browser/Menu/Quit.php

@ -2,20 +2,20 @@ @@ -2,20 +2,20 @@
declare(strict_types=1);
namespace Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu;
namespace Yggverse\Yoda\Entity\Browser\Menu;
class Quit
{
public \GtkMenuItem $gtk;
// Dependencies
public \Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu $menu;
public \Yggverse\Yoda\Entity\Browser\Menu $menu;
// Defaults
private string $_label = 'Quit';
public function __construct(
\Yggverse\Yoda\Entity\Browser\Header\Navigation\Menu $menu
\Yggverse\Yoda\Entity\Browser\Menu $menu
) {
// Init dependencies
$this->menu = $menu;
Loading…
Cancel
Save