discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DBus Menu in Gtk theme


From: Ivan Vučica
Subject: Re: DBus Menu in Gtk theme
Date: Wed, 1 Jan 2014 20:12:20 +0000

Niels,

You're my hero.

Looking forward to studying how this works. :-)

On 1 Jan 2014 20:10, "Niels Grewe" <niels.grewe@halbordnung.de> wrote:
Happy new year everybody!

I’ll just do my own bit of ‘thread necromancy’, as Ivan adequately put it. I finally found the time to hack a bit more on this D-Bus menu thing. I originally started working on this back in the summer at the Cambridge hackathon. It took me a while to find enough time to get all the bits and pieces in order, but I finally have a partially working implementation of Canonical’s global menu protocol. Please see [0] for a screenshot of Ink running with a theme that delegates displaying the menu to the Ubuntu menu server. 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. Still, it’s a pretty good start (and resulted in quite a few improvements and bugfixes to DBusKit!) and I intend to add the few missing parts soon, so that it becomes actually usable.

If you want to check it out in the meantime, please update to the latest trunk version of -gui -back and dbuskit. The bundle that proxies the menu to D-Bus is located in ./Bundles/DBusMenu, and there is an example theme in ./Examples/GlobalMenu that shows you how to integrate the global menu into a theme.

Cheers,

Niels

[0] http://www.halbordnung.de/~thebeing/gnustep/global-menu-ink.png

Am 24.06.2013 um 15:15 schrieb Ivan Vučica <ivucica@gmail.com>:

> I've played a bit more with DBus Menu, and I've accidentally stumbled upon what's been causing my 'minimal' example of creating a 'global menu' not to work.
>
> The issue? Standalone items apparently cannot exist in the dbusmenu's root. They must be actual menus, with subitems, it seems.
>
> So, I'm happy that the little devil finally works. It's terribly ugly, but it works.
>     https://bitbucket.org/ivucica/mini-dbusmenu
>
> This doesn't, of course, help with GNUstep, considering the consensus is that DBusKit should be used instead of hacks with glib and its main loop.
>
> But the following code from Enlightenment might:
>     http://git.enlightenment.org/core/elementary.git/plain/src/lib/elm_dbus_menu.c?id=f13463da05b76d962c5b73f4706d137a3f76ef22
>
> Considering it seems to use their own DBus implementation, and does not seem to reuse any Canonical's components, or Gtk or Qt, it might be helpful in figuring out the protocol. On the other hand, someone who understands DBus better than I do (at the moment) might not need that, either; to me personally, Canonical's documentation about the protocol when talking over DBus was not extremely helpful.
>
> 'Java Swing Ayatana' project contained more useful code when it comes to integrating glib version of libdbusmenu.
>
> And Enlightenment seems to contain code useful when talking directly over DBus, without Canonical's wrapper.
>
> On Wednesday, November 14, 2012, Niels Grewe wrote:
> Hi Ivan,
>
> On 14.11.2012 19:17, Ivan Vučica wrote:
> > On Tue, May 22, 2012 at 3:57 PM, Niels Grewe <niels.grewe@halbordnung.de
> > <mailto:niels.grewe@halbordnung.de>> wrote:
> >
> >     The problem is that DBusKit does not support exposing objects right now,
> >     but since there is interest in this from somebody who is not me, I'm now
> >     officially motivated/coerced to finally finish that part of DBusKit.
> >     Most of the difficult parts are done, but I'm still lacking code that
> >     takes care of registering exported objects with the D-Bus daemon.
> >
> >
> > Just checking: was some work done here?
>
> Yes, quite a bit, though mostly under-the-hood stuff. Registration of
> objects is working and they can be messaged from other D-Bus peers. The
> problem is that at the moment, you kinda would have to hand-craft the
> information required by DBusKit to map Obj-C methods to D-Bus methods. I
> have bits of code here and there that automates this, but I didn't get
> to around to bringing it into a usable state.
>
> Also WIP are D-Bus property support and outgoing notifications/signals.
> IIrc, you need the latter for DBus menus. I hope that I'd be able to
> work more on that soon.
>
> Cheers,
>
> Niels
>
>
> --
> Ivan Vučica - ivan@vucica.net
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]