GNOME Bugzilla – Bug 782190
No St.Entry 'primary-icon-clicked' event anymore
Last modified: 2017-05-05 08:23:48 UTC
this.entry = new St.Entry ({ text: 'Name' }); this.actor.add_child (this.entry); this.entry.set_primary_icon (new St.Icon({ icon_name: 'emblem-ok-symbolic', icon_size: 14 })); this.entry.connect ('primary-icon-clicked', Lang.bind(this, function (actor, event) { //CAN'T GET HERE! WHY? })); this.entry.connect ('secondary-icon-clicked', Lang.bind(this, function (actor, event) { //Works but for both icons primary and secondary!!! })); PS: On Debian Gnome Shell 3.14 this is working just fine.
You can easy check it. Gnome-shell has only one St.Entry with 2 icons it's the main search entry in Activities overview. 1. Type some text... 2. Press primary icon (find) and if it does reset like a click on secondary button (cancel) you have broken version too.
The following fix has been pushed: 94a0ae1 entry: Fix *-icon-clicked handler
Created attachment 351139 [details] [review] entry: Fix *-icon-clicked handler Commit ffe4eaf00d8 broke the handler by fetching the instance private from the wrong actor - as we don't use the ::primary-icon-clicked signal, and the ::secondary-icon-clicked signal still works by accident, nobody noticed until now ...
Thank you very much. Good job.