src: update action sensitivity when creating window
If we don't explicitly set action sensitivity after associating a
display with the window, the actions will end up with the wrong
state. This exhibits itself as send key actions being marked
disabled despite being connected,
Related: https://gitlab.com/virt-viewer/virt-viewer/-/issues/37
Closes: https://gitlab.com/virt-viewer/virt-viewer/-/issues/41
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé
2 years ago
1230 | 1230 | g_object_set_data(G_OBJECT(display), "virt-viewer-window", win); |
1231 | 1231 | g_object_weak_ref(G_OBJECT(win), window_weak_notify, display); |
1232 | 1232 | } |
1233 | ||
1234 | virt_viewer_window_set_actions_sensitive(win, priv->connected); | |
1233 | 1235 | } |
1234 | 1236 | virt_viewer_app_set_window_subtitle(self, win, nth); |
1235 | 1237 |