mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-09-09 13:31:58 +00:00
return legacy bookmark update feature
This commit is contained in:
parent
4b2a0a7660
commit
c6d24565fd
@ -71,6 +71,8 @@ impl Navigation {
|
|||||||
let request = self.request.strip_prefix();
|
let request = self.request.strip_prefix();
|
||||||
|
|
||||||
// update children components
|
// update children components
|
||||||
|
self.bookmark
|
||||||
|
.update(self.profile.bookmark.get(&request).is_ok());
|
||||||
self.reload.set_sensitive(!request.is_empty());
|
self.reload.set_sensitive(!request.is_empty());
|
||||||
self.request.update(
|
self.request.update(
|
||||||
self.profile
|
self.profile
|
||||||
|
@ -10,7 +10,7 @@ const ICON_NON: &str = "non-starred-symbolic";
|
|||||||
|
|
||||||
pub trait Bookmark {
|
pub trait Bookmark {
|
||||||
fn bookmark(action: &Rc<WindowAction>) -> Self;
|
fn bookmark(action: &Rc<WindowAction>) -> Self;
|
||||||
fn _update(&self, has_bookmark: bool); // @TODO
|
fn update(&self, has_bookmark: bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Bookmark for Button {
|
impl Bookmark for Button {
|
||||||
@ -26,7 +26,7 @@ impl Bookmark for Button {
|
|||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _update(&self, has_bookmark: bool) {
|
fn update(&self, has_bookmark: bool) {
|
||||||
self.set_icon_name(if has_bookmark { ICON_YES } else { ICON_NON });
|
self.set_icon_name(if has_bookmark { ICON_YES } else { ICON_NON });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user