[PATCH 1/2] Use a method to reset current_selector (#959707)
Vratislav Podzimek
vpodzime at redhat.com
Mon May 13 11:36:42 UTC 2013
On Fri, 2013-05-10 at 12:11 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
>
> ---
> pyanaconda/ui/gui/spokes/custom.py | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> index a8ac173..88e89b7 100644
> --- a/pyanaconda/ui/gui/spokes/custom.py
> +++ b/pyanaconda/ui/gui/spokes/custom.py
> @@ -847,13 +847,18 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>
> return None
>
> - def _do_refresh(self, mountpointToShow=None):
> - # block mountpoint selector signal handler for now
> - self._initialized = False
> + def _clear_current_selector(self):
> + """ If something is selected, deselect it
> + """
> if self._current_selector:
> self._current_selector.set_chosen(False)
> self._current_selector = None
>
> + def _do_refresh(self, mountpointToShow=None):
> + # block mountpoint selector signal handler for now
> + self._initialized = False
> + self._clear_current_selector()
> +
> # Make sure we start with a clean slate.
> self._accordion.removeAllPages()
>
> @@ -2052,7 +2057,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>
> log.debug("show first mountpoint: %s" % page.pageTitle)
> if not page.members:
> - self._current_selector = None
> + self._clear_current_selector()
> return
>
> if not mountpoint:
> @@ -2321,7 +2326,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
> if nb_page == NOTEBOOK_DETAILS_PAGE:
> self._save_right_side(self._current_selector)
>
> - self._current_selector.set_chosen(False)
> + self._clear_current_selector()
>
> def on_selector_clicked(self, selector):
> if not self._initialized:
> @@ -2397,7 +2402,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
> log.debug("page clicked: %s" % page.pageTitle)
> if self._current_selector:
> self._save_current_selector()
> - self._current_selector = None
>
> self._show_mountpoint(page=page, mountpoint=mountpointToShow)
>
> @@ -2748,7 +2752,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>
> self._devices = self.__storage.devices
> self._unused_devices = None # why do we cache this?
> - self._current_selector = None
> + self._clear_current_selector()
> self._do_refresh()
>
> def on_value_changed(self, *args):
ACK to both of these.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list