gnome-shell/js
Giovanni Campagna b0be6b8678 RemoteSearch: don't complete a search that was cancelled
This closes a race between setTerms and a slow GetInitialResultSet.
The bug manifests as follows:
- initial search for a short string
- previous results === undefined, call GetInitialResultSet
- user types more, cancel previous search in setTerms()
- mainloop, then _gotResults([])
- previous results === [], !!previous results === true
- therefore call GetSubsearchResultSet with an empty list of results
- _gotResults() from GetSubsearchResultSet is empty
- much later, return from GetInitialResultSet is discarded by
  cancellable
- user unhappy because what he searched for is not there

After this fix, the flow is:
- initial search for a short string
- previous results === undefined, call GetInitialResultSet
- user types more, cancel previous search in setTerms()
- mainloop, but no _gotResults
- previous results === undefined, call GetInitialResultSet again with
  longer string
- some time later, return from first GetInitialResultSet is discarded
  by cancellable
- soon after, return from second GetInitialResultSet comes with good
  results
- user happy

https://bugzilla.gnome.org/show_bug.cgi?id=745861
2015-03-11 13:47:48 -07:00
..
extensionPrefs extensionPrefs: Improve handling of OutOfDate extensions 2014-09-06 22:06:23 +02:00
gdm loginDialog: Pass-through UserWidget's label-actor 2015-03-06 17:24:13 +01:00
misc util: Add createTimeLabel() 2015-03-04 13:55:01 +01:00
perf Revert accidental commit "Test stuff" 2014-09-03 13:47:18 -04:00
portalHelper PortalHelper: Make translator comment appear 2015-01-28 13:47:56 +01:00
ui RemoteSearch: don't complete a search that was cancelled 2015-03-11 13:47:48 -07:00
js-resources.gresource.xml legacyTray: Add a hideable tray for legacy status icons 2015-03-03 19:14:49 +01:00
Makefile.am js/Makefile.am: Fix dependency generation with srcdir != builddir 2014-06-29 18:27:53 -04:00