mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
separate update implementation
This commit is contained in:
parent
ab6375a746
commit
4203b91e84
2 changed files with 46 additions and 33 deletions
|
|
@ -23,9 +23,10 @@ const MARGIN: i32 = 6;
|
|||
const SPACING: i32 = 6;
|
||||
|
||||
pub struct Navigation {
|
||||
profile: Rc<Profile>,
|
||||
//home: Button,
|
||||
//reload: Button,
|
||||
//bookmark: Button,
|
||||
bookmark: Button,
|
||||
request: Entry,
|
||||
pub g_box: Box,
|
||||
}
|
||||
|
|
@ -62,10 +63,11 @@ impl Navigation {
|
|||
g_box.append(&bookmark);
|
||||
|
||||
Self {
|
||||
profile: profile.clone(),
|
||||
//home,
|
||||
request,
|
||||
//reload,
|
||||
//bookmark,
|
||||
bookmark,
|
||||
g_box,
|
||||
}
|
||||
}
|
||||
|
|
@ -135,6 +137,11 @@ impl Navigation {
|
|||
self.request.grab_focus()
|
||||
}
|
||||
|
||||
pub fn update(&self) {
|
||||
self.bookmark.update(&self.profile, &self.request);
|
||||
self.request.update(&self.profile);
|
||||
}
|
||||
|
||||
// Setters
|
||||
|
||||
pub fn set_request(&self, value: &str) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue