GNOME Bugzilla – Bug 687081
Quick fix - additional function in status/bluetooth.js PinNotification
Last modified: 2012-12-23 12:33:36 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.
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)
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.
I checked this again, and indeed the grabFocus function is superfluous. I'll prepare a patch.
Created attachment 230555 [details] [review] Bluetooth: remove dead code Notification.grabFocus doesn't exist anymore.
*** Bug 690662 has been marked as a duplicate of this bug. ***
Review of attachment 230555 [details] [review]: LG
Attachment 230555 [details] pushed as 45c2e65 - Bluetooth: remove dead code