Toolbar Editor: reorder items feature is broken
I'm having issues with the GtkToolbar editor in Glade 3.38.1 on Mac OS Catalina 10.15.6.
When I open the toolbar editor and drag around items to reorder them, weird things happen:
- re-orders generate ghost duplicates of items that appear in the item list in the editor, but are not visible in the actual toolbar UI
- re-ordering is only effective when moving items top to bottom (down the list). When moving them up nothing happens.
Screen_Recording_2020-10-18_at_12.22.59
My guess is that the toolbar editor has a list of references to actual toolbar items, and when moving them around by dragndrop, it creates a new reference at the target location without remoing the item reference in the original location. Because the original reference is not removed, that causes item indices to be 'off', because the orignal reference is still occupying an index in the list, which the code thinks that that index now belongs to another item.
See my attached screen recording an observe what happens in the editor. As it stands, this renders the toolbar editor fairly unusable in my eyes.
I noticed that after recording this video, Glade SEGFAULTed on me, and the log was quite full of warnings. Here's what was printed before it terminated:
...
(glade:4020): GLib-GObject-CRITICAL **: 12:11:40.855: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(glade:4020): GLib-GObject-WARNING **: 12:11:40.855: invalid (NULL) pointer instance
(glade:4020): GLib-GObject-CRITICAL **: 12:11:40.855: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(glade:4020): GladeUI-CRITICAL **: 12:11:42.099: glade_widget_get_object: assertion 'GLADE_IS_WIDGET (widget)' failed
(glade:4020): GladeUI-CRITICAL **: 12:11:42.099: glade_base_editor_add_default_properties: assertion 'GLADE_IS_WIDGET (glade_widget_get_parent (gchild))' failed
(glade:4020): GLib-GObject-WARNING **: 12:11:42.102: invalid (NULL) pointer instance
...
(glade:4020): GLib-GObject-CRITICAL **: 12:11:42.115: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(glade:4020): GLib-GObject-WARNING **: 12:11:42.115: invalid (NULL) pointer instance
(glade:4020): GLib-GObject-CRITICAL **: 12:11:42.115: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(glade:4020): GLib-GObject-WARNING **: 12:11:42.116: invalid (NULL) pointer instance
(glade:4020): GLib-GObject-CRITICAL **: 12:11:42.116: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(glade:4020): GLib-GObject-WARNING **: 12:11:42.116: invalid (NULL) pointer instance
(glade:4020): GLib-GObject-CRITICAL **: 12:11:42.116: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(glade:4020): Gtk-CRITICAL **: 12:11:43.082: gtk_tree_store_get_path: assertion 'iter->stamp == priv->stamp' failed
Segmentation fault: 11
In the run after that, I didn't see ghosting any more, but re-orders still either didn't have an effect at all, or placed items in the wrong spot (so the item list in the editor and the item positions in the toolbar were different up until I closed and re-opened the editor).
I also attached the glade file in the hope that this will help to fix the issue:
Cheers,
Uwe