Hi guys, Am 01.01.2014 um 21:09 schrieb Niels Grewe <niels.gr...@halbordnung.de>:
> Unfortunately, it’s not very useful at the moment, because I haven’t > implemented sending signals/notifications from DBusKit out to other D-Bus > objects. This is required to keep the menu server updated about the current > status of the menu, so by the time you start interacting with the menu, the > structure is out of date and ends up getting a bit messed up, so many of the > menu items won’t work properly. Well, about this. I’ve implemented the signal stuff, and it turns out that not properly updating the menu wasn’t the entire problem. The other problem was that D-Bus has a type called ‘variant’, which basically means ‘whatever we agreed upon in some obscure comment in the interface description file that really should be backed by a proper specification’ The existing approach was to make an educated guess about what D-Bus type most closely matches the Objective-C type of the object you’re passing, and assume that the other side, e.g. promote integers to the larger type if required, etc. That was of course a bit fragile, and as it turns out, fails for a number of D-Bus implementations (for example the one used in libdbusmenu). As a result, I have extended DBusKit with an interface for explicitly indicating the type as which an object should be passed over the bus. Using these changes, our D-Bus menu implementation is now working to the point where it is just as usable as the native menu. It even passes icons along to the global menu. That’s so cool! The one remaining problem that I can’t figure out right now is that the menu is not being restored when you minimise and re-maximise the window. But I’m sure that we’ll figure that out eventually. Another thing I’ve been thinking about is whether we’d want to propose an extension to the D-Bus menu interface that allows us to request a surface for drawing a custom view from an NSMenuItem (because that’s the one obviously unsupported functionality of our native menus). I’m not sure how that would work exactly, but I think Unity is already doing something similar for indicators. I would be grateful for any pointers on what would be required to make something like that work. Cheers, Niels _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev