GNOME Bugzilla – Bug 120656
consider UI merging for GtkPlug/GtkSocket
Last modified: 2013-08-14 01:02:09 UTC
In http://mail.gnome.org/archives/gtk-devel-list/2003-August/msg00110.html Havoc asked: - Say I have one GtkPlug inside another GtkPlug inside a toplevel, for example nested Bonobo components. So I would imagine each plug and the toplevel have a GtkMenuMerge. How does the UI from the innermost plug get propagated to the toplevel? It seems like the plug in the middle would have to merge in the UI from the innermost plug, then propagate the merged XML and actions list to the toplevel. I don't see API right now to convert GtkMenuMerge into a serialized form that could then be merged into another GtkMenuMerge. I would expect maybe gtk_menu_merge_get_actions() (gets a flattened view of all actions) and gtk_menu_merge_get_ui() (gets XML representing merged UI). Also, a signal emitted when these change. - But another problem: the GtkMenuMerge that does the merge logic always creates widgets. So it can only be on a toplevel, not on a GtkPlug. Perhaps the merging and the widgeting need to be split apart? Or gtk_menu_merge_set_no_widgets()? The serialization aspect of this has been tackled by adding gtk_menu_merge_get_ui(). What is missing is a) a way to serialize the actions b) a protocol for sending the serialized actions + ui definition from plug to socket (plus the necessary logic in the socket to create proxy actions) c) a way to send the verbs of activated proxy actions back from socket to plug and have them trigger the original actions ...and it just occurred to me that the proxy actions need to monitor the original actions for state and property changes.
*** Bug 120657 has been marked as a duplicate of this bug. ***
Another random thing to think about is that "mac-style menubar" is exactly the same problem, more or less. I'm not personally sure it's useful but it's perhaps trivial enough that we could just humor people.
I think this might be "out of the realm of GTK+"; but we do need some way to monitor the merged UI, which should be simple (A simple "changed" is probably good enough) and possible to do for 2.4.
I've added a "changed" signal now. Moving 2.4 API -> future.
As long as bug #58541 isn't reconsidered this in an "All but Windows" bug, changing OS not the nearest possible approximation ...
not going to happen