Notice in particular that "child-added" has a check which produces a different result depending on gtk2/gtk3, but "child-removed" was simple replaced by "remove".
If I change "child-added" to "something-else", the error message produced changes:
./test-indicator.py:15: Warning: /build/buildd/glib2.0-2.38.1/./gobject/gsignal.c:2475: signal 'something-else' is invalid for instance '0x23b70c0' of type 'GtkMenu'
However, if I change "child-added" to "insert" (so that it matches the GTK3 version, as with the "remove" signal) then the test case segfaults.
Some progress:
In libdbusmenu/ libdbusmenu- gtk/parser. c the following change was made:
http:// bazaar. launchpad. net/~dbusmenu- team/libdbusmen u/trunk. 14.04/revision/ 355
- "child-added",
- G_CALLBACK (child_added_cb),
+#ifdef HAVE_GTK3
+ "insert",
+#else
+ "child-added"
+#endif
+ G_CALLBACK (item_inserted_cb),
- "child-removed",
- G_CALLBACK (child_removed_cb),
+ "remove",
+ G_CALLBACK (item_removed_cb),
Notice in particular that "child-added" has a check which produces a different result depending on gtk2/gtk3, but "child-removed" was simple replaced by "remove".
If I change "child-added" to "something-else", the error message produced changes:
./test- indicator. py:15: Warning: /build/ buildd/ glib2.0- 2.38.1/ ./gobject/ gsignal. c:2475: signal 'something-else' is invalid for instance '0x23b70c0' of type 'GtkMenu'
However, if I change "child-added" to "insert" (so that it matches the GTK3 version, as with the "remove" signal) then the test case segfaults.