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 786940 - ::icon-pressed handler stays connected when setting :show-emoji-icon to FALSE
::icon-pressed handler stays connected when setting :show-emoji-icon to FALSE
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-08-28 19:39 UTC by Daniel Boles
Modified: 2017-08-28 23:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Entry: Drop redundant typecasts (1.21 KB, patch)
2017-08-28 19:40 UTC, Daniel Boles
committed Details | Review
Entry: Handle :show-emoji-icon becoming false (1.05 KB, patch)
2017-08-28 19:40 UTC, Daniel Boles
committed Details | Review

Description Daniel Boles 2017-08-28 19:39:25 UTC
We should disconnect the handler and hide the icon.

Otherwise, a user seems to have no way to change their secondary icon to do something else, without it still firing pick_emoji() and bringing up the chooser.
Comment 1 Daniel Boles 2017-08-28 19:40:47 UTC
Created attachment 358627 [details] [review]
Entry: Drop redundant typecasts
Comment 2 Daniel Boles 2017-08-28 19:40:55 UTC
Created attachment 358628 [details] [review]
Entry: Handle :show-emoji-icon becoming false

Disconnect the now-unwanted signal handler, and hide the icon.
Comment 3 Daniel Boles 2017-08-28 19:48:12 UTC
Also, when setting the secondary icon from the outside world, :show-emoji-icon should be forced off, so that the handler gets disconnected if a user doesn't realise/remember that they need to set it to FALSE manually before setting their new icon.
Comment 4 Daniel Boles 2017-08-28 19:53:20 UTC
Attachment 358627 [details] pushed as cb21947 - Entry: Drop redundant typecasts
Attachment 358628 [details] pushed as 896f7c8 - Entry: Handle :show-emoji-icon becoming false
Comment 5 Daniel Boles 2017-08-28 23:43:14 UTC
(In reply to Daniel Boles from comment #3)
> Also, when setting the secondary icon from the outside world,
> :show-emoji-icon should be forced off, so that the handler gets disconnected
> if a user doesn't realise/remember that they need to set it to FALSE
> manually before setting their new icon.

I didn't bother with this; it seems too complex for little reward. (Plus, maybe someone wants to have the emoji picker but with a different icon than our default...) So, for now, anyone who wants to change from the emoji icon to a normal one - which is probably an unlikely scenario anyway - will need to set :show-emoji-icon to FALSE as an essential part of that process.