mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 07:54:14 +00:00
draft request update actions
This commit is contained in:
parent
e89a1ae31c
commit
5650d3db10
@ -48,9 +48,6 @@ impl Navigation {
|
||||
widget.append(request.widget());
|
||||
widget.append(bookmark.widget());
|
||||
|
||||
// Connect events
|
||||
// request.widget().connect_changed({ |_, _, _| {} });
|
||||
|
||||
// Result
|
||||
Self {
|
||||
widget,
|
||||
|
@ -1,4 +1,7 @@
|
||||
use gtk::{prelude::EntryExt, Entry};
|
||||
use gtk::{
|
||||
prelude::{EditableExt, EntryExt, WidgetExt},
|
||||
Entry,
|
||||
};
|
||||
|
||||
pub struct Request {
|
||||
widget: Entry,
|
||||
@ -7,19 +10,28 @@ pub struct Request {
|
||||
impl Request {
|
||||
// Construct
|
||||
pub fn new() -> Request {
|
||||
Self {
|
||||
widget: Entry::builder()
|
||||
.placeholder_text("URL or search term...")
|
||||
.hexpand(true)
|
||||
.progress_pulse_step(0.1)
|
||||
.build(),
|
||||
}
|
||||
// GTK
|
||||
let widget = Entry::builder()
|
||||
.placeholder_text("URL or search term...")
|
||||
.hexpand(true)
|
||||
.progress_pulse_step(0.1)
|
||||
.build();
|
||||
|
||||
// Connect events
|
||||
widget.connect_changed(|entry| {
|
||||
let _ = entry.activate_action("win.update", None); // @TODO
|
||||
});
|
||||
|
||||
widget.connect_activate(|entry| {
|
||||
// @TODO
|
||||
});
|
||||
|
||||
// Result
|
||||
Self { widget }
|
||||
}
|
||||
|
||||
// Actions
|
||||
pub fn update(&self) {
|
||||
// @TODO
|
||||
}
|
||||
pub fn update(&self) {}
|
||||
|
||||
// Getters
|
||||
pub fn widget(&self) -> &Entry {
|
||||
|
Loading…
x
Reference in New Issue
Block a user