window: Use GSignalGroup to watch zoom levels

This allows us to git rid of more expression code.
This commit is contained in:
Christopher Davis 2023-03-02 23:14:14 -05:00 • committed by Sophie Herold
parent aab50af31a
commit 3d445f25fe
2 changed files with 58 additions and 42 deletions

View file

@ -433,6 +433,13 @@ impl LpImageView {
self.imp().sliding_view.current_page().map(|x| x.image())
}
pub fn current_image_signals(&self) -> &glib::SignalGroup {
self.imp()
.current_image_signals
.get()
.expect("Signal group should be set up during construction")
}
pub fn current_page(&self) -> Option<LpImagePage> {
self.imp().sliding_view.current_page()
}