separate update implementation

This commit is contained in:
yggverse 2025-01-28 15:13:11 +02:00
parent ab6375a746
commit 4203b91e84
2 changed files with 46 additions and 33 deletions

View file

@ -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) {