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
|
// action win.previous status
|
||||||
self.image_view.connect_notify_local(
|
self.image_view.connect_is_previous_available_notify(
|
||||||
Some("is-previous-available"),
|
glib::clone!(@weak obj => move |_| {
|
||||||
glib::clone!(@weak obj => move |_, _| {
|
|
||||||
obj.action_set_enabled(
|
obj.action_set_enabled(
|
||||||
"win.previous",
|
"win.previous",
|
||||||
obj.imp().image_view.is_previous_available(),
|
obj.imp().image_view.is_previous_available(),
|
||||||
|
|
@ -370,15 +369,13 @@ mod imp {
|
||||||
);
|
);
|
||||||
|
|
||||||
// action win.next status
|
// action win.next status
|
||||||
self.image_view.connect_notify_local(
|
self.image_view
|
||||||
Some("is-next-available"),
|
.connect_is_next_available_notify(glib::clone!(@weak obj => move |_| {
|
||||||
glib::clone!(@weak obj => move |_, _| {
|
|
||||||
obj.action_set_enabled(
|
obj.action_set_enabled(
|
||||||
"win.next",
|
"win.next",
|
||||||
obj.imp().image_view.is_next_available(),
|
obj.imp().image_view.is_next_available(),
|
||||||
);
|
);
|
||||||
}),
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
// Make widgets visible when the focus moves
|
// Make widgets visible when the focus moves
|
||||||
obj.connect_move_focus(|obj, _| {
|
obj.connect_move_focus(|obj, _| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue