New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Python introspection and MatePanelApplet.set_size_hints #727
Comments
Congrats on finding Mate University!
How about using just one number at a time? I'll look more into it later... I though first that gi.repository has the class MatePanelApplet. But that is not really true. It is added by the gir1.2-mate-panel package, if I'm correct. mate-panel/libmate-panel-applet/Makefile.am Line 105 in 6af0787
quick way to test python applet: use /var/log/syslog to see the problems / exceptions https://stackoverflow.com/questions/4145775/how-do-i-convert-a-python-list-into-a-c-array-by-using-ctypes https://wiki.gnome.org/action/show/Projects/GObjectIntrospection?action=show&redirect=GObjectIntrospection |
I took /usr/lib/x86_64-linux-gnu/girepository-1.0/MatePanelApplet-4.0.typelib. Here is the output:
The interesting part:
As you can see, the size_hints parameter is a gint32, which is obviously wrong. https://wiki.gnome.org/Projects/GObjectIntrospection/Architecture Note to self: the marshal stuff in mate-panel/libmate-panel-applet is for signals in mate-panel-applet.c g_object_class_install_property (gobject_class,
PROP_SIZE_HINTS,
/* FIXME: value_array? */
g_param_spec_pointer ("size-hints",
"SizeHints",
"Panel Applet Size Hints",
G_PARAM_READWRITE)); https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations/ |
OOOkaaayyy |
Good news, thanks for looking into this!
…On Mon, Feb 5, 2018 at 7:35 PM, info-cppsp ***@***.***> wrote:
OOOkaaayyy
So after a lot of research I have found that I can manipulate the
generated API with annotations.
https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations/
I have tried doing that and now the modded mu applet works on my dev
system.
Added new PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#727 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJkZ5atHXN8kJAGIGyitJnIy9YoLspgTks5tR1fwgaJpZM4R4GU7>
.
|
No worries, mate! Forgot sg very important: |
I'm not sure if this is the right place or not to report this, but I'm having a problem with MatePanelApplet python introspection. I'm trying to call MatePanelApplet.set_size_hints() but keep getting "TypeError: Must be number, not list" exceptions.
I've looked at the code in applets/wncklet/window_list.c and it seems that I'm passing the right parameters in the right order. I've even tried changing them around but no joy - I get the same TypeError no matter what I do.
This happens on both mate-panel 1.18.4 (Ubuntu Mate 17.10) and mate-panel 1.18.7 (Arch), but seems to have been around at least a year or so. I found this while googling for a solution.
To reproduce the error, I've adapted the the Mate University python applet and attached the code
university-python-applet.tar.gz
The text was updated successfully, but these errors were encountered: