Cannot make modal popover appear by clicking an entry icon within a CellRendererText
Steps to reproduce
-
Create a TreeView with a TreeViewColumn that contains a CellRendererText.
-
In the "edited" callback for the CellRendererText:
a: Call gtk_entry_set_icon_from_icon_name to set the icon in the Editable.
b: Attach a popover to the Editable.
c: Connect the "icon-press" signal to a function that calls gtk_popover_popup.
Current behavior
The text entry icon appears when editing starts. However when the icon is clicked the Popover does not appear. Instead the following messages are generated:
(editable_cells:24711): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(editable_cells:24711): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(editable_cells:24711): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(editable_cells:24711): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(editable_cells:24711): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(editable_cells:24711): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Expected outcome
Popover appears when text entry icon is clicked.
Version information
gtk3.x86_64 3.22.26-2.fc27 Linux Fedora 27
Additional information
If the popover is made non-modal then it works. However in my application I want to be able to select a date from a calendar, and this is not possible when the popover is non-modal.
Attachment contains a modified version of the "editable_cells" demo that exhibits the problem.editable_cells.c