Your message dated Sat, 1 Oct 2016 03:53:16 +0200
with message-id <[email protected]>
and subject line Re: gir1.2-gtk-3.0: No way to get a style property in python
has caused the Debian Bug report #636620,
regarding gir1.2-gtk-3.0: No way to get a style property in python
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
636620: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636620
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gir1.2-gtk-3.0
Version: 3.0.12-1
Severity: normal
If I try to use Gtk.Widget.style_get_property() in python I get the
error:
TypeError: style_get_property() takes exactly 3 argument(s) (2 given)
The C prototype is:
void gtk_widget_style_get_property (GtkWidget *widget,
const gchar *property_name, GValue *value);
gir must have overlooked that the value should be returned in python,
not have its address passed as a 3rd argument.
There is no style_get() method so I don't seem to be able to read style
properties at all in python.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gir1.2-gtk-3.0 depends on:
ii gir1.2-atk-1.0 2.0.1-2 ATK accessibility toolkit (GObject
ii gir1.2-freedesktop 0.10.8-2 Introspection data for some FreeDe
ii gir1.2-gdkpixbuf-2.0 2.23.5-3 GDK Pixbuf library - GObject-Intro
ii gir1.2-glib-2.0 0.10.8-2 Introspection data for GLib, GObje
ii gir1.2-pango-1.0 1.28.4-2 Layout and rendering of internatio
ii libgtk-3-0 3.0.12-1 GTK+ graphical user interface libr
ii libgtk-3-common 3.0.12-1 common files for the GTK+ graphica
gir1.2-gtk-3.0 recommends no packages.
gir1.2-gtk-3.0 suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Thu, 26 Jan 2012 14:47:56 -0500 Daniel Trebbien <[email protected]>
wrote:
> To get a style property, you now need to pass in a Value object (which
> wraps a GValue). Here, for example, is PyGObject code to access the
> "shadow-type" style property of `widget`:
>
> shadow_type_val = GObject.Value()
> shadow_type_val.init(Gtk.ShadowType)
> widget.style_get_property("shadow-type", shadow_type_val)
> self.frame.set_shadow_type(shadow_type_val.get_enum())
>
> There are more examples of accessing Gtk.Widget style properties at:
> http://consciouslyusing.blogspot.com/2012/01/coding-aligning-widgets-with.html
Thanks for the detailed answer. That should address Tony's issue, so
closing the bug report.
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
--- End Message ---