[PATCH rhel7-branch] gui: add Refresh button to network storage UI (#1065716)

Vratislav Podzimek vpodzime at redhat.com
Wed Sep 10 07:13:33 UTC 2014


On Tue, 2014-09-09 at 10:44 -0400, Chris Lumens wrote:
> > So ... the Refresh button.
> > Should we add a tooltip?
> 
> I think the refresh label alone is probably good enough to explain what
> the button is for.
> 
> > Should we make it less prominent?
> 
> I think the position's fine.  It's down with all the rest of the
> buttons.
> 
> > diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
> > index 97b07ca..af2662c 100644
> > --- a/pyanaconda/ui/gui/spokes/filter.py
> > +++ b/pyanaconda/ui/gui/spokes/filter.py
> > @@ -644,6 +644,10 @@ class FilterSpoke(NormalSpoke):
> >  
> >          self._update_summary()
> >  
> > +    def on_refresh_clicked(self, widget, *args):
> > +        self.storage.devicetree.populate()
> > +        self.refresh()
> > +
> >      def on_add_iscsi_clicked(self, widget, *args):
> >          dialog = ISCSIDialog(self.data, self.storage)
> 
> Is devicetree.populate expected to take a significant amount of time?
> If it can, we will need to add some more code here to make sure the
> screen stays usable and the user knows what is going on.  This could
> involve setting the spinning cursor or something else.
Same point here. Try using the @timed_action trick I've used in the
Custom spoke:

@timed_action(delay=50, threshold=100)
def on_refresh_clicked(...

That makes the callback run after ~50-100 miliseconds giving Gtk chance
to show the busy cursor in the meantime. 

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list