GNOME Bugzilla – Bug 706891
Add spinner to search popup
Last modified: 2013-08-29 13:25:44 UTC
We should use GtkStack to have a spinner in the search popup that spins while searching.
Created attachment 253246 [details] [review] Add spinner to search popup
The patch is based on a repo where bug#706715 is applied.
Review of attachment 253246 [details] [review]: Looks good otherwise. ::: src/search-popup.ui @@ +31,3 @@ + </child> + <child> + <object class="GtkGrid" id="spin-grid"> Why do we need a grid here? ::: src/searchPopup.js @@ +122,3 @@ + this._stack.set_visible_child(this._treeView); + + if (this.get_visible() !== true) No need to check for equality of booleans :)
Review of attachment 253246 [details] [review]: ::: src/search-popup.ui @@ +31,3 @@ + </child> + <child> + <object class="GtkGrid" id="spin-grid"> I have it because without it the window jumps while going from a search were the popup has been resized to be larget to a search that fits in 500. Having the grid helps with the resizing. I think we could also do a this._scrolledWindow.queue_draw() in showSpinner if you prefer. ::: src/searchPopup.js @@ +122,3 @@ + this._stack.set_visible_child(this._treeView); + + if (this.get_visible() !== true) I agree :)
Created attachment 253342 [details] [review] Add spinner to search popup v2
Review of attachment 253246 [details] [review]: ::: src/search-popup.ui @@ +31,3 @@ + </child> + <child> + <object class="GtkGrid" id="spin-grid"> Seems very much like a work around then. Its fine for now as long as you add a FIXME comment explaining this.
Created attachment 253469 [details] [review] Add spinner to search popup v3 * Do not use a GtkGrid to house the spinner
Created attachment 253470 [details] [review] SearchPopup: Call columns autosize on show Call treeView.columns_autosize in a show vfunc and not only for showing results. This makes sure the search popup with a spinner on top does not stay large after a search that forced the search popup to grow.
Review of attachment 253470 [details] [review]: ACK if it works.
Review of attachment 253469 [details] [review]: ACK side-note: Would be nice to move all these search handling away from MainWindow at some point (to perhaps a separate new class).
The following fixes have been pushed: b4aa85b SearchPopup: Call columns_autosize on show 7980928 Add spinner to search popup
Created attachment 253496 [details] [review] SearchPopup: Call columns_autosize on show We want to make sure that the search popup only exceeds its standard width when it has to. To avoid a larger popup for the spinner.
Created attachment 253497 [details] [review] Add spinner to search popup
Review of attachment 253496 [details] [review]: Commited.
Review of attachment 253497 [details] [review]: Commited.
Review of attachment 253469 [details] [review]: Commited
Review of attachment 253470 [details] [review]: Commited.