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 786962 - GtkSpinButton: Don't show 'insert emoji' item in the context menu
GtkSpinButton: Don't show 'insert emoji' item in the context menu
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkSpinButton
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-08-29 08:24 UTC by Mohammed Sadiq
Modified: 2017-09-02 12:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mohammed Sadiq 2017-08-29 08:24:43 UTC
GtkSpinbutton allows insertion of numbers and floating points only. It may be better to hide 'insert Emoji' item in the context menu of GtkSpinButton
Comment 1 Daniel Boles 2017-08-29 16:09:27 UTC
(In reply to Mohammed Sadiq from comment #0)
> GtkSpinbutton allows insertion of numbers and floating points only.

This is not true if you override signal ::input and supply a conversion to numbers:
https://developer.gnome.org/gtk3/stable/GtkSpinButton.html#GtkSpinButton-input

That said, it's perhaps unlikely that anyone will want to do this from emoji*, so maybe it should be disabled anyway.

(* You could in theory have 'emoji spinner', which internally stores a numerical ID, but displays/accepts emoji as text input/output...)
Comment 2 Matthias Clasen 2017-08-30 11:53:13 UTC
That is not so clear-cut. spin buttons can be used more creatively, see gtk3-demo for examples. I dont think the context menu item does much harm...
Comment 3 Mohammed Sadiq 2017-08-30 12:37:17 UTC
(In reply to Matthias Clasen from comment #2)
> That is not so clear-cut. spin buttons can be used more creatively, see
> gtk3-demo for examples. I dont think the context menu item does much harm...

hm.. So is there any API that would allow devs to hide this menu item for some GtkEntry (or any Emoji enabled widgets) in case someone wish so? One case I can think of is bug 786963.
Comment 4 Daniel Boles 2017-08-30 12:46:38 UTC
It seems that right now there is not, and it would require another new property, e.g. :enable-emoji-chooser
Comment 5 Matthias Clasen 2017-09-02 12:50:05 UTC
i've added input hints for this now