mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
rename request entry
This commit is contained in:
parent
3a7dcea23f
commit
5a4fba93f1
2 changed files with 20 additions and 17 deletions
11
config.json
11
config.json
|
|
@ -121,12 +121,15 @@
|
|||
"label":"Go"
|
||||
}
|
||||
},
|
||||
"address":
|
||||
"entry":
|
||||
{
|
||||
"placeholder":"URL or any search term...",
|
||||
"length":
|
||||
"request":
|
||||
{
|
||||
"max":1024
|
||||
"placeholder":"URL or any search term...",
|
||||
"length":
|
||||
{
|
||||
"max":1024
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Page
|
|||
$forward,
|
||||
$go;
|
||||
|
||||
public \GtkEntry $address;
|
||||
public \GtkEntry $request;
|
||||
|
||||
public \GtkLabel $content,
|
||||
$status;
|
||||
|
|
@ -174,18 +174,18 @@ class Page
|
|||
);
|
||||
}
|
||||
|
||||
// Address field
|
||||
$this->address = new \GtkEntry;
|
||||
// Request field
|
||||
$this->request = new \GtkEntry;
|
||||
|
||||
$this->address->set_placeholder_text(
|
||||
$this->config->header->address->placeholder
|
||||
$this->request->set_placeholder_text(
|
||||
$this->config->header->entry->request->placeholder
|
||||
);
|
||||
|
||||
$this->address->set_max_length(
|
||||
$this->config->header->address->length->max
|
||||
$this->request->set_max_length(
|
||||
$this->config->header->entry->request->length->max
|
||||
);
|
||||
|
||||
$this->address->connect(
|
||||
$this->request->connect(
|
||||
'activate',
|
||||
function ($entry)
|
||||
{
|
||||
|
|
@ -196,7 +196,7 @@ class Page
|
|||
);
|
||||
|
||||
$this->header->pack_start(
|
||||
$this->address,
|
||||
$this->request,
|
||||
true,
|
||||
true,
|
||||
0
|
||||
|
|
@ -212,7 +212,7 @@ class Page
|
|||
function ($entry)
|
||||
{
|
||||
$this->open(
|
||||
$this->address->get_text()
|
||||
$this->request->get_text()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
@ -280,7 +280,7 @@ class Page
|
|||
if ($address->isRelative())
|
||||
{
|
||||
$base = new \Yggverse\Net\Address(
|
||||
$this->address->get_text()
|
||||
$this->request->get_text()
|
||||
);
|
||||
|
||||
if ($absolute = $address->getAbsolute($base))
|
||||
|
|
@ -389,8 +389,8 @@ class Page
|
|||
$url
|
||||
);
|
||||
|
||||
// Update address field by requested
|
||||
$this->address->set_text(
|
||||
// Update request field by requested
|
||||
$this->request->set_text(
|
||||
$url
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue