libunity support gobject-introspected languages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
Fix Released
|
Medium
|
Mikkel Kamstrup Erlandsen | ||
Vala |
New
|
Medium
|
|||
dee |
Fix Released
|
High
|
Mikkel Kamstrup Erlandsen | ||
libunity |
Fix Released
|
High
|
Mikkel Kamstrup Erlandsen | ||
dee (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
libunity (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
unity (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
libunity should support other languages than C and Vala via GObject Introspection. It already compiles a typelib that takes it a long part of the way, now we just have to make it work. This is a meta bug to track the related tasks.
Core tasks:
1) Don't leak Gee in the public API. Gee does not support GI (DONE in libunity-3.4.2)
2) Make sure Dee-1.0 works well with GI:
- Partially blocked by https:/
3) Make sure Dbusmenu-Glib-0.4 supports GI:
- Broken. See https:/
4) Don't use nested namespaces in libunity. GIR doesn't support this. Done in libunity revno 37 (to be released on 3.4.4)
Optional tasks to add a bit of finesse to the APIs:
P1) Python overrides for libunity, dee, and dbusmenu-glib (dee has some already)
M1) Check Mono status of GI support
S1) Seed support
G1) GJS support
Related branches
- Ted Gould (community): Approve
-
Diff: 2031 lines (+757/-656)17 files modifiedlibdbusmenu-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)
Changed in unity: | |
assignee: | nobody → Mikkel Kamstrup Erlandsen (kamstrup) |
importance: | Undecided → Medium |
status: | New → Triaged |
description: | updated |
description: | updated |
Changed in libunity: | |
assignee: | nobody → Mikkel Kamstrup Erlandsen (kamstrup) |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: developer-portal-api-docs |
description: | updated |
Changed in vala: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in libunity (Ubuntu): | |
status: | New → Triaged |
Changed in dee: | |
assignee: | nobody → Mikkel Kamstrup Erlandsen (kamstrup) |
importance: | Undecided → High |
milestone: | none → 0.5.10 |
status: | New → Fix Committed |
Changed in libunity: | |
milestone: | none → 3.4.6 |
Changed in libunity: | |
status: | Triaged → Fix Released |
Changed in dee: | |
status: | Fix Committed → Fix Released |
Changed in unity: | |
milestone: | none → 3.4.6 |
status: | Triaged → Fix Released |
no longer affects: | libunity (Ubuntu Quantal) |
Changed in unity (Ubuntu): | |
status: | New → Fix Released |
With the latest round of Dbusmenu fixes and libunity-3.4.2 I can actually do in python:
from gi.repository import Unity
dir(Unity)
But whenever I try and use any of the classes there I get some odd errors. Eg.
>>> appman = Unity.AppInfoMa nager.get_ instance( ) pymodules/ python2. 7/gi/module. py", line 263, in __getattr__ self._introspec tion_module, name) pymodules/ python2. 7/gi/module. py", line 160, in __getattr__ pymodules/ python2. 7/gi/types. py", line 226, in __init__ object_ has_new_ constructor( cls.__info_ _.get_g_ type())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return getattr(
File "/usr/lib/
wrapper = metaclass(name, bases, dict_)
File "/usr/lib/
set_
TypeError: must be a subtype of GObject
or
>>> dir(Unity. LauncherEntry) pymodules/ python2. 7/gi/module. py", line 263, in __getattr__ self._introspec tion_module, name) pymodules/ python2. 7/gi/module. py", line 136, in __getattr__ for_object( info) pymodules/ python2. 7/gi/module. py", line 76, in get_interfaces_ for_object append( getattr( module, name)) pymodules/ python2. 7/gi/module. py", line 263, in __getattr__ self._introspec tion_module, name) pymodules/ python2. 7/gi/module. py", line 160, in __getattr__ pymodules/ python2. 7/gi/types. py", line 228, in __init__ interface_ info(cls. __info_ _.get_g_ type())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return getattr(
File "/usr/lib/
interfaces = tuple(interface for interface in get_interfaces_
File "/usr/lib/
interfaces.
File "/usr/lib/
return getattr(
File "/usr/lib/
wrapper = metaclass(name, bases, dict_)
File "/usr/lib/
register_
TypeError: must be an interface
I will look into it