GNOME Bugzilla – Bug 754338
Inactive time when creating the first collection
Last modified: 2015-10-07 13:24:11 UTC
When you enter the name of your first collection (ie. in the "empty state"), it takes a moment before the database gets updated. Meanwhile, the dialog looks strangely greyed out.
Created attachment 310331 [details] [review] selections: Load spinner while creating first collection
Created attachment 310371 [details] proposed solution
Looks good to me, surelly an improvement wrt the previous behaviour
Looks great!
Review of attachment 310331 [details] [review]: Nice patch, Alessandro. One small thing: ::: data/ui/organize-collection-dialog.ui @@ +93,3 @@ + <property name="halign">center</property> + <property name="valign">center</property> + <property name="active">True</property> Instead of having it active all the time, I would make the extra effort to start it only when it is shown and then stopping it. Otherwise it will needlessly keep the CPU busy.
Created attachment 312821 [details] [review] selections: Load spinner while creating first collection Start/stop the spinner when needed.
Some updates from #gtk+: 13:06 <rishi> What happens to a GtkSpinner (active=TRUE) that is in a GtkStack but is not the visible widget? Is it still spinning and eating CPU? 13:08 * kalev had the same question the other day. 13:13 <rishi> kalev: I think it does because cosimoc said so in 2012, unless gtk+ got smarter in the last 3 years. 13:13 <ebassi> Unless the style system is using child visibility to decide if an animation should progress, then no: the spinner will continue spinning 13:14 <rishi> ebassi: Ok. 13:15 <mclasen> we're certainly not drawing it 13:16 <mclasen> the expensive part is where it invalidates size and that propagates all the way up to the toplevel 13:16 <ebassi> Yeah, the widget won't be drawn, but the style will be invalidated, AFAIR 13:16 <mclasen> but we're fixing that 13:16 <mclasen> any day now, I hope It's not a lot of effort to start/stop it, so let's take the defensive approach. Plus we need this in 3.18.x.
Comment on attachment 312821 [details] [review] selections: Load spinner while creating first collection Pushed to master and gnome-3-18.