window: Use generated connection functions
This commit is contained in:
parent
6c58f4cabd
commit
a2e2cb2336
1 changed files with 5 additions and 8 deletions
|
|
@ -359,9 +359,8 @@ mod imp {
|
|||
);
|
||||
|
||||
// action win.previous status
|
||||
self.image_view.connect_notify_local(
|
||||
Some("is-previous-available"),
|
||||
glib::clone!(@weak obj => move |_, _| {
|
||||
self.image_view.connect_is_previous_available_notify(
|
||||
glib::clone!(@weak obj => move |_| {
|
||||
obj.action_set_enabled(
|
||||
"win.previous",
|
||||
obj.imp().image_view.is_previous_available(),
|
||||
|
|
@ -370,15 +369,13 @@ mod imp {
|
|||
);
|
||||
|
||||
// action win.next status
|
||||
self.image_view.connect_notify_local(
|
||||
Some("is-next-available"),
|
||||
glib::clone!(@weak obj => move |_, _| {
|
||||
self.image_view
|
||||
.connect_is_next_available_notify(glib::clone!(@weak obj => move |_| {
|
||||
obj.action_set_enabled(
|
||||
"win.next",
|
||||
obj.imp().image_view.is_next_available(),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}));
|
||||
|
||||
// Make widgets visible when the focus moves
|
||||
obj.connect_move_focus(|obj, _| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue