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 782190 - No St.Entry 'primary-icon-clicked' event anymore
No St.Entry 'primary-icon-clicked' event anymore
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
3.24.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-05-04 22:10 UTC by konkor
Modified: 2017-05-05 08:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
entry: Fix *-icon-clicked handler (1.09 KB, patch)
2017-05-04 22:39 UTC, Florian Müllner
committed Details | Review

Description konkor 2017-05-04 22:10:09 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.
Comment 1 konkor 2017-05-04 22:19:15 UTC
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.
Comment 2 Florian Müllner 2017-05-04 22:38:55 UTC
The following fix has been pushed:
94a0ae1 entry: Fix *-icon-clicked handler
Comment 3 Florian Müllner 2017-05-04 22:39:01 UTC
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 ...
Comment 4 konkor 2017-05-05 08:23:48 UTC
Thank you very much. Good job.