mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-19 11:09:59 +00:00
rename methods
This commit is contained in:
parent
0abc4e8932
commit
64143c9c50
@ -182,7 +182,7 @@ impl Page {
|
|||||||
self.window_action.find.simple_action.set_enabled(false);
|
self.window_action.find.simple_action.set_enabled(false);
|
||||||
|
|
||||||
// Reset widgets
|
// Reset widgets
|
||||||
self.search.update(None);
|
self.search.unset();
|
||||||
self.input.unset();
|
self.input.unset();
|
||||||
|
|
||||||
// Prevent infinitive redirection
|
// Prevent infinitive redirection
|
||||||
@ -570,8 +570,8 @@ impl Page {
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update `find` model with new buffer
|
// Connect `TextView` widget, update `search` model
|
||||||
search.update(Some(text_widget.text_view));
|
search.set(Some(text_widget.text_view));
|
||||||
|
|
||||||
// Update page meta
|
// Update page meta
|
||||||
meta.set_status(Status::Success)
|
meta.set_status(Status::Success)
|
||||||
|
@ -82,7 +82,12 @@ impl Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// * currently supports [TextView](https://docs.gtk.org/gtk4/class.TextView.html) only
|
/// * currently supports [TextView](https://docs.gtk.org/gtk4/class.TextView.html) only
|
||||||
pub fn update(&self, text_view: Option<TextView>) {
|
pub fn set(&self, text_view: Option<TextView>) {
|
||||||
self.subject.replace(text_view.map(Subject::new));
|
self.subject.replace(text_view.map(Subject::new));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn unset(&self) {
|
||||||
|
self.subject.replace(None);
|
||||||
|
self.hide() // make sure widget not visible anymore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user