mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
rename setText to setValue
This commit is contained in:
parent
23ac5f4e0d
commit
a48e4d87ed
3 changed files with 19 additions and 19 deletions
|
|
@ -69,7 +69,7 @@ class Address
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update title
|
// Update title
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
$address->getHost()
|
$address->getHost()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -125,7 +125,7 @@ class Address
|
||||||
|
|
||||||
if ($title) // detect title by document h1
|
if ($title) // detect title by document h1
|
||||||
{
|
{
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +138,7 @@ class Address
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
'Oops!'
|
'Oops!'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -154,7 +154,7 @@ class Address
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
'Failure'
|
'Failure'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -200,7 +200,7 @@ class Address
|
||||||
|
|
||||||
if ($title) // detect title by document h1
|
if ($title) // detect title by document h1
|
||||||
{
|
{
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +221,7 @@ class Address
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
'Failure'
|
'Failure'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -282,7 +282,7 @@ class Address
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
$this->title->setText(
|
$this->title->setValue(
|
||||||
'Oops!'
|
'Oops!'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class Title
|
||||||
// Defaults
|
// Defaults
|
||||||
private int $_ellipsize = 3;
|
private int $_ellipsize = 3;
|
||||||
private int $_length = 12;
|
private int $_length = 12;
|
||||||
private string $_text = 'New address';
|
private string $_value = 'New address';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
\Yggverse\Yoda\Entity\Window\Tab\Address $address,
|
\Yggverse\Yoda\Entity\Window\Tab\Address $address,
|
||||||
|
|
@ -21,7 +21,7 @@ class Title
|
||||||
$this->address = $address;
|
$this->address = $address;
|
||||||
|
|
||||||
$this->gtk = new \GtkLabel(
|
$this->gtk = new \GtkLabel(
|
||||||
$this->_text
|
$this->_value
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_width_chars(
|
$this->gtk->set_width_chars(
|
||||||
|
|
@ -33,13 +33,13 @@ class Title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setText(
|
public function setValue(
|
||||||
?string $text = null
|
?string $value = null
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_text(
|
$this->gtk->set_text(
|
||||||
is_null($text) ? $this->_text : trim(
|
is_null($value) ? $this->_value : trim(
|
||||||
$text
|
$value
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class Title
|
||||||
// Defaults
|
// Defaults
|
||||||
private int $_ellipsize = 0;
|
private int $_ellipsize = 0;
|
||||||
private int $_length = 12;
|
private int $_length = 12;
|
||||||
private string $_text = 'History';
|
private string $_value = 'History';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
\Yggverse\Yoda\Entity\Window\Tab\History $history
|
\Yggverse\Yoda\Entity\Window\Tab\History $history
|
||||||
|
|
@ -21,7 +21,7 @@ class Title
|
||||||
$this->history = $history;
|
$this->history = $history;
|
||||||
|
|
||||||
$this->gtk = new \GtkLabel(
|
$this->gtk = new \GtkLabel(
|
||||||
$this->_text
|
$this->_value
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->gtk->set_width_chars(
|
$this->gtk->set_width_chars(
|
||||||
|
|
@ -33,13 +33,13 @@ class Title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setText(
|
public function setValue(
|
||||||
?string $text = null
|
?string $value = null
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_text(
|
$this->gtk->set_text(
|
||||||
is_null($text) ? $this->_text : trim(
|
is_null($value) ? $this->_value : trim(
|
||||||
$text
|
$value
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue