Browse Source

append app prefix to window title

PHP-GTK3
yggverse 7 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 @@ @@ -12,13 +12,6 @@
"header":
{
"enabled":true,
"title":
{
"length":
{
"max":64
}
},
"button":
{
"close":true
@ -32,11 +25,7 @@ @@ -32,11 +25,7 @@
{
"title":
{
"default":"New page",
"length":
{
"max":32
}
"default":"New page"
},
"redirect":
{

18
src/Entity/App.php

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

19
src/Entity/Tab/Page.php

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

Loading…
Cancel
Save