[virt-tools-list] [PATCH virt-viewer] Always set ask-quit setting

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jul 11 15:06:37 UTC 2014


Avoid creating empty settings files, always set the ask-quit key.

https://bugzilla.redhat.com/show_bug.cgi?id=1006737
---
 src/virt-viewer-app.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 1c97121..89289a0 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -408,9 +408,8 @@ virt_viewer_app_maybe_quit(VirtViewerApp *self, VirtViewerWindow *window)
 
         gboolean dont_ask = FALSE;
         g_object_get(check, "active", &dont_ask, NULL);
-        if (dont_ask)
-            g_key_file_set_boolean(self->priv->config,
-                    "virt-viewer", "ask-quit", FALSE);
+        g_key_file_set_boolean(self->priv->config,
+                    "virt-viewer", "ask-quit", !dont_ask);
 
         gtk_widget_destroy(dialog);
         switch (result) {
-- 
1.9.3




More information about the virt-tools-list mailing list