Merge lp://staging/~pitti/libdbusmenu/fix-annotations into lp://staging/libdbusmenu/0.5

Proposed by Martin Pitt
Status: Merged
Merged at revision: 216
Proposed branch: lp://staging/~pitti/libdbusmenu/fix-annotations
Merge into: lp://staging/libdbusmenu/0.5
Diff against target: 2031 lines (+757/-656)
17 files modified
libdbusmenu-glib/Makefile.am (+3/-3)
libdbusmenu-glib/client.c (+68/-68)
libdbusmenu-glib/client.h (+1/-1)
libdbusmenu-glib/menuitem-proxy.c (+17/-17)
libdbusmenu-glib/menuitem.c (+363/-360)
libdbusmenu-glib/menuitem.h (+2/-2)
libdbusmenu-gtk/Makefile.am (+3/-3)
libdbusmenu-gtk/client.c (+55/-55)
libdbusmenu-gtk/genericmenuitem.c (+26/-26)
libdbusmenu-gtk/menu.c (+17/-17)
libdbusmenu-gtk/menuitem.c (+60/-60)
libdbusmenu-gtk/menuitem.h (+1/-1)
libdbusmenu-gtk/parser.c (+10/-10)
libdbusmenu-gtk/serializablemenuitem.c (+31/-31)
tests/Makefile.am (+13/-2)
tests/test-glib-simple-items.py (+35/-0)
tests/test-gtk-shortcut-client.py (+52/-0)
To merge this branch: bzr merge lp://staging/~pitti/libdbusmenu/fix-annotations
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+50578@code.staging.launchpad.net

Description of the change

This branch fixes the GI/gtk-doc annotations. They need to be reformatted to be recognized by g-ir-scanner/gtk-doc, I added the necessary annotations, and also added a simple test case (Python port of test-glib-simple-items.c).

Now DbusmenuGtk-0.4.gir is fully introspectable. The two functions in Dbusmenu-0.4.gir which aren't are dbusmenu_client_add_type_handler{,_full}. They take a callback function (which isn't "async" or "call" scope) and a ClientTypeDestroyHandler, but GI can only handle such "notify" scope callbacks if the method takes a standard GDestroyNotify. Thus these two can't be made introspectable without an API/ABI change. Are these vitally important to write clients?

I also started working on a Python port of the "test-gtk-shortcut" test case [1]. This runs, but once the server comes alive, I get an error:

(test-gtk-shortcut-client.py:10192): LIBDBUSMENU-GLIB-WARNING **: Getting layout failed: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Type of message, `(iias)', does not match expected type `(i)'

and the menu with the shortcut isn't visible. I currently have no idea why this happens, this doesn't seem to be immediately related to the Python bits. Does that ring a bell for you?

[1] http://people.canonical.com/~pitti/tmp/dbusmenu-shortcut-python-test.patch

To post a comment you must log in.
217. By Martin Pitt

merge trunk

Revision history for this message
Martin Pitt (pitti) wrote :

I now merged to the new version from trunk. It seems the xml -> variant change magically fixed this, and the test-gtk-shortcut-client.py test case now works perfectly; so I pushed this as well.

218. By Martin Pitt

add test-gtk-shortcut-client.py Python GI test

This replicates tests/test-gtk-shortcut-client.c using Python and GI.

Revision history for this message
Ted Gould (ted) wrote :

In the parser the annotation should be transfer full. I'll fix that and
merge it in. Thanks!

  review approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches