[PATCH] Really hide and show passphrase warnings (#1162828)
David Shea
dshea at redhat.com
Tue Dec 16 15:14:56 UTC 2014
On 12/16/2014 03:27 AM, Vratislav Podzimek wrote:
> On Mon, 2014-12-15 at 14:10 -0500, David Shea wrote:
>> This prevents the failure image and message from being displayed if the
>> checks pass before show_all is called on the dialog.
>> ---
>> pyanaconda/ui/gui/spokes/lib/passphrase.py | 9 +++++----
>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py
>> index 064d0a5..89c2c64 100644
>> --- a/pyanaconda/ui/gui/spokes/lib/passphrase.py
>> +++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py
>> @@ -28,6 +28,7 @@ from pyanaconda.ui.gui import GUIObject
>> from pyanaconda.ui.gui.helpers import GUIInputCheckHandler
>> from pyanaconda.constants import PW_ASCII_CHARS
>> from pyanaconda.i18n import _, N_
>> +from pyanaconda.ui.gui.utils import really_hide, really_show
>>
>> __all__ = ["PassphraseDialog"]
>>
>> @@ -137,11 +138,11 @@ class PassphraseDialog(GUIObject, GUIInputCheckHandler):
>> result_icon, result_message = failed_check.check_status
>> self._passphrase_warning_image.set_from_icon_name(result_icon, Gtk.IconSize.BUTTON)
>> self._passphrase_warning_label.set_text(result_message)
>> - self._passphrase_warning_image.set_visible(True)
>> - self._passphrase_warning_label.set_visible(True)
>> + really_show(self._passphrase_warning_image)
>> + really_show(self._passphrase_warning_label)
>> else:
>> - self._passphrase_warning_image.set_visible(False)
>> - self._passphrase_warning_label.set_visible(False)
>> + really_hide(self._passphrase_warning_image)
>> + really_hide(self._passphrase_warning_label)
>>
>> # The save button should only be sensitive if the match check passes
>> if self._passphrase_match_check.check_status == InputCheck.CHECK_OK and \
> ACK. It may even be useful to do some 'git grep set_visible' and check
> all the appearances if there are some.
>
Might even be worth a pylint module, since I think
set_visible+set_no_show_all is always what we want when we call set_visible
More information about the anaconda-patches
mailing list