Codebase list virt-viewer / 4820d05
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> Daniel P. Berrangé authored 2 years ago Daniel P. Berrangé committed 2 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
23462346 virt_viewer_window_hide(win);
23472347 } else {
23482348 virt_viewer_app_maybe_quit(self, win);
2349 if (!priv->quitting)
2349 if (!priv->quitting) {
23502350 /* the last item remains active, doesn't matter if we quit */
2351 visible = TRUE;
23512352 g_action_change_state(G_ACTION(act),
2352 g_variant_new_boolean(TRUE));
2353 g_variant_new_boolean(visible));
2354 }
23532355 }
23542356 }
23552357