From 92de2db42ba27c99208d179feec6fcfee8b2c4f8 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 24 Jul 2014 17:41:11 +0200 Subject: [PATCH] virtManager: always save "do not show again" setting 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 --- 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 d3826e57..9fae87a0 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 50f71990..f22a7cb0 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 38d47373..7fb6f239 100644 --- a/virtManager/host.py +++ b/virtManager/host.py @@ -1386,7 +1386,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()