After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673233 - Tries to launch gnome-contacts on empty search resuts
Tries to launch gnome-contacts on empty search resuts
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-31 11:33 UTC by Bastien Nocera
Modified: 2012-04-07 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The new gnome-documents search provider wasn't being picked up on my (1.13 KB, patch)
2012-04-05 14:07 UTC, Rui Matos
committed Details | Review

Description Bastien Nocera 2012-03-31 11:33:40 UTC
gnome-shell-3.4.0-1.fc17.x86_64

1. In the overview, start typing a number
2. See contacts appear in the search results (matching the phone numbers I would guess)
3. Type digits until no more search results appear
4. Press Enter

What happens:
- Tries to launch gnome-contacts with the last matched contact (even though it's already been removed from the list of search results)

What should happen:
- Nothing, there's no results matching
Comment 1 Rui Matos 2012-03-31 17:49:39 UTC
Can you reproduce this consistently?

BTW, what should happen isn't nothing[1], it should actually launch a wikipedia or google search since the default target for activation should be one of those buttons.

[1] Though you can argue that that's what should happen and I'd agree...
Comment 2 Bastien Nocera 2012-04-01 11:51:50 UTC
(In reply to comment #1)
> Can you reproduce this consistently?

Yep. I'll let you decide what the good behaviour is, the bad one if definitely there though.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-04-01 13:59:55 UTC
This happens not just for contacts, but any app. Typing "fooooooo" and pressing enter brings me Swell Foop.
Comment 4 Rui Matos 2012-04-05 14:07:44 UTC
Created attachment 211385 [details] [review]
The new gnome-documents search provider wasn't being picked up on my

environment and that's why I couldn't reproduce this.

--

searchDisplay: Update the selection for async searches without results

This ensures that the initial selection is always set correctly. We
were missing the empty async search results case.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-04-05 16:57:49 UTC
Review of attachment 211385 [details] [review]:

::: js/ui/searchDisplay.js
@@ -434,3 @@
         }
 
-        this._maybeSetInitialSelection();

Why this removal? If the user doesn't have any async search providers, or we never get a reply back from gnome-documents even while we're showing other items, we will fail to set the initial selection, won't we?
Comment 6 Rui Matos 2012-04-05 17:08:08 UTC
(In reply to comment #5)
> ::: js/ui/searchDisplay.js
> @@ -434,3 @@
>          }
> 
> -        this._maybeSetInitialSelection();
> 
> Why this removal? If the user doesn't have any async search providers, or we
> never get a reply back from gnome-documents even while we're showing other
> items, we will fail to set the initial selection, won't we?

We can certainly leave it there but it seems pointless to me since the for loop right before it is calling _updateProviderResults() which now calls _maybeSetInitialSelection unconditionally.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-04-05 17:15:49 UTC
Review of attachment 211385 [details] [review]:

Oh, whoops, I misread the patch, then... I thought _maybeSetInitialResults was still inside the if (provider.async) branch.