[virt-tools-list] [PATCH virt-manager] virtManager: always save "do not show again" setting

Giuseppe Scrivano gscrivan at redhat.com
Thu Jul 24 15:50:03 UTC 2014


Any other message box performs different than "Unapplied changes",
which stores this information regardless of the user choice of
Yes/No.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1047874

Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---

a followup patch for a related issue.

 virtManager/details.py | 1 -
 virtManager/error.py   | 7 ++-----
 virtManager/host.py    | 1 -
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index d3826e5..9fae87a 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -1190,7 +1190,6 @@ class vmmDetails(vmmGObjectUI):
             text1=(_("There are unapplied changes. Would you like to apply "
                      "them now?")),
             chktext=_("Don't warn me again."),
-            alwaysrecord=True,
             default=False):
             return False
 
diff --git a/virtManager/error.py b/virtManager/error.py
index 50f7199..f22a7cb 100644
--- a/virtManager/error.py
+++ b/virtManager/error.py
@@ -1,6 +1,6 @@
 # Error dialog with extensible "details" button.
 #
-# Copyright (C) 2007, 2013 Red Hat, Inc.
+# Copyright (C) 2007, 2013-2014 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -180,14 +180,12 @@ class vmmErrorDialog(vmmGObject):
                                   chktext=chktext)
 
     def chkbox_helper(self, getcb, setcb, text1, text2=None,
-                      alwaysrecord=False,
                       default=True,
                       chktext=_("Don't ask me again")):
         """
         Helper to prompt user about proceeding with an operation
         Returns True if the 'yes' or 'ok' button was selected, False otherwise
 
-        @alwaysrecord: Don't require user to select 'yes' to record chkbox value
         @default: What value to return if getcb tells us not to prompt
         """
         do_prompt = getcb()
@@ -199,8 +197,7 @@ class vmmErrorDialog(vmmGObject):
                                chktext=chktext,
                                buttons=Gtk.ButtonsType.YES_NO)
         response, skip_prompt = res
-        if alwaysrecord or response:
-            setcb(not skip_prompt)
+        setcb(not skip_prompt)
 
         return response
 
diff --git a/virtManager/host.py b/virtManager/host.py
index efcabd1..f86c976 100644
--- a/virtManager/host.py
+++ b/virtManager/host.py
@@ -1380,7 +1380,6 @@ class vmmHost(vmmGObjectUI):
                 text1=(_("There are unapplied changes. "
                          "Would you like to apply them now?")),
                 chktext=_("Don't warn me again."),
-                alwaysrecord=True,
                 default=False):
             self.pool_apply()
             self.net_apply()
-- 
1.9.3




More information about the virt-tools-list mailing list