Browse Source

append app prefix to window title

PHP-GTK3
yggverse 8 months ago
parent
commit
bdb586144c
  1. 13
      config.json
  2. 18
      src/Entity/App.php
  3. 19
      src/Entity/Tab/Page.php

13
config.json

@ -12,13 +12,6 @@
"header": "header":
{ {
"enabled":true, "enabled":true,
"title":
{
"length":
{
"max":64
}
},
"button": "button":
{ {
"close":true "close":true
@ -32,11 +25,7 @@
{ {
"title": "title":
{ {
"default":"New page", "default":"New page"
"length":
{
"max":32
}
}, },
"redirect": "redirect":
{ {

18
src/Entity/App.php

@ -191,13 +191,19 @@ class App
{ {
if ($value) if ($value)
{ {
if ($value == 'Welcome to Yoda!')
{
$title = $value;
}
/* @TODO else
$title = urldecode( {
mb_strlen($value) > $this->config->header->title->length->max ? mb_substr($value, 0, $this->config->header->title->length->max) . '...' $title = sprintf(
: $value '%s - %s',
); $value,
*/ $title = $value; $this->config->name
);
}
} }
else else

19
src/Entity/Tab/Page.php

@ -664,10 +664,6 @@ class Page
$title = $origin->getHost(); $title = $origin->getHost();
} }
$this->app->setTitle(
$title
);
$this->setTitle( $this->setTitle(
$title $title
); );
@ -757,10 +753,6 @@ class Page
$h1 $h1
); );
$this->app->setTitle(
$title
);
$this->setTitle( $this->setTitle(
$title $title
); );
@ -773,12 +765,7 @@ class Page
{ {
if ($value) if ($value)
{ {
/* @TODO $title = $value;
$title = urldecode(
mb_strlen($value) > $this->config->title->length->max ? mb_substr($value, 0, $this->config->title->length->max) . '...'
: $value
);
*/ $title = $value;
} }
else else
@ -790,6 +777,10 @@ class Page
$this->box, $this->box,
$title $title
); );
$this->app->setTitle(
$title
);
} }
public function setProgress( public function setProgress(

Loading…
Cancel
Save