mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
add request text argument for new tab action
This commit is contained in:
parent
404da1fa74
commit
5ce6090d7a
6 changed files with 18 additions and 10 deletions
|
|
@ -10,13 +10,17 @@ pub struct Request {
|
|||
|
||||
impl Request {
|
||||
// Construct
|
||||
pub fn new() -> Self {
|
||||
pub fn new(text: Option<GString>) -> Self {
|
||||
// GTK
|
||||
let widget = Entry::builder()
|
||||
.placeholder_text("URL or search term...")
|
||||
.hexpand(true)
|
||||
.progress_fraction(0.0)
|
||||
.progress_pulse_step(0.1)
|
||||
.text(match text {
|
||||
Some(text) => text,
|
||||
None => GString::new(),
|
||||
})
|
||||
.build();
|
||||
|
||||
// Connect events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue