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 687081 - Quick fix - additional function in status/bluetooth.js PinNotification
Quick fix - additional function in status/bluetooth.js PinNotification
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.6.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 690662 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-29 02:01 UTC by mathematical.coffee
Modified: 2012-12-23 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bluetooth: remove dead code (851 bytes, patch)
2012-12-03 18:16 UTC, Giovanni Campagna
committed Details | Review

Description mathematical.coffee 2012-10-29 02:01:15 UTC
Hi,

Just noticed in ui/status/bluetooth.js, class PinNotification:

    grabFocus: function(lockTray) {                                             
        this.parent(lockTray);                                                  
        global.stage.set_key_focus(this._entry);                                
    }

However MessageTray.Notification doesn't have a grabFocus method, and this function is not called anywhere either (it'd result in an error anyway).

I guess it's a leftover stub from some previous version, and should just be deleted.
Comment 1 Giovanni Campagna 2012-10-29 16:01:18 UTC
That method used to be called to have the PIN entry focused automatically when expanding the notification, and it was copy-pasted from TelepathyClient.
Given that the telepathy code doesn't have it in 3.6, it's probably useless now, but I'd be happier if someone could test it and confirm we didn't regress from 3.4.

(I don't have a device that does pairing that way, I only get a "confirm that the pin matches" notification)
Comment 2 mathematical.coffee 2012-10-29 22:49:33 UTC
It's been there (and Notification hasn't had a grabFocus method) since 3.2 (I discovered it on 3.2 and have verified that the code is still in 3.4 & Notification has no grabFocus method in 3.4/the grabFocus method is not called anywhere).

That being said, I don't have a device that does pairing like that either - I also always get the confirm notification rather than the pin notification.
Comment 3 Giovanni Campagna 2012-12-03 18:15:06 UTC
I checked this again, and indeed the grabFocus function is superfluous.
I'll prepare a patch.
Comment 4 Giovanni Campagna 2012-12-03 18:16:02 UTC
Created attachment 230555 [details] [review]
Bluetooth: remove dead code

Notification.grabFocus doesn't exist anymore.
Comment 5 Florian Müllner 2012-12-23 08:26:11 UTC
*** Bug 690662 has been marked as a duplicate of this bug. ***
Comment 6 Florian Müllner 2012-12-23 08:29:49 UTC
Review of attachment 230555 [details] [review]:

LG
Comment 7 Giovanni Campagna 2012-12-23 12:33:32 UTC
Attachment 230555 [details] pushed as 45c2e65 - Bluetooth: remove dead code