mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-27 14:54:14 +00:00
src: correctly set display state when cancelling quit request
When the last window is closed we optionally show a confirmation dialog to check if user wants to quit. If the user cancels, we need to ensure the display menu state gets set back to checked. We called g_action_change_state correctly, but a later call to g_simple_action_set_state used the "visible" variable which was not correctly reset back to TRUE upon cancel. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
73f567ea94
commit
4820d05c82
@ -2347,10 +2347,12 @@ virt_viewer_app_action_window(VirtViewerApp *self,
|
||||
virt_viewer_window_hide(win);
|
||||
} else {
|
||||
virt_viewer_app_maybe_quit(self, win);
|
||||
if (!priv->quitting)
|
||||
if (!priv->quitting) {
|
||||
/* the last item remains active, doesn't matter if we quit */
|
||||
visible = TRUE;
|
||||
g_action_change_state(G_ACTION(act),
|
||||
g_variant_new_boolean(TRUE));
|
||||
g_variant_new_boolean(visible));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user