[anaconda][rhel7-branch/master][PATCH] Allow to search specialized and network devices after pressing Enter (#1058364)

Vratislav Podzimek vpodzime at redhat.com
Wed Sep 10 15:12:13 UTC 2014


On Wed, 2014-09-10 at 16:57 +0200, Martin Kolman wrote:
> Done by emitting the 'clicked' signal from the find button as that appears to be the easiest
> way to get the information that a search should be done to the filtering machinery.
> 
> Resolves: rhbz#1058364
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
>  pyanaconda/ui/gui/spokes/filter.py | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
> index cdd0e6d..4c87f12 100644
> --- a/pyanaconda/ui/gui/spokes/filter.py
> +++ b/pyanaconda/ui/gui/spokes/filter.py
> @@ -157,6 +157,11 @@ class FilterPage(object):
>  
>          return disk.name
>  
> +    def _on_entry_activated(self, _entry, find_button):
> +        # User pressed enter on a search related entry box, trigger search by emitting
> +        # the "clicked" signal from the corresponding find button
> +        find_button.emit("clicked")
> +
>  class SearchPage(FilterPage):
>      def __init__(self, storage, builder):
>          FilterPage.__init__(self, storage, builder)
> @@ -171,6 +176,11 @@ class SearchPage(FilterPage):
>  
>          self._combo = self.builder.get_object("searchTypeCombo")
>  
> +        find_button = self.builder.get_object("searchFindButton")
Please make it 'self._findButton' and pull it just once from the
builder. Otherwise this looks good to me.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list