gobject

How do I initialize a GActionMap variable?

﹥>﹥吖頭↗ 提交于 2021-02-05 07:35:22
问题 I want to know how to initialize a GActionMap variable. I search here https://developer.gnome.org/gio/stable/GActionMap.html to find a function that instances a GActionMap, but I didn't find it there and anywhere. I was trying to insert some actions in my application, to use the function item = g_menu_item_new(labelItem, "sair"); where item is a menu item, labelItem is a menu item label and sair is the function name that I want to trigger when the item is clicked. But when I run the code, I

How to get the attachment values when a widget has been attached to a grid

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-05 20:40:33
问题 This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post) obj = [widget identifier] for pspec in obj.props: print(pspec.name) name = pspec.name.replace('-', '_') props = eval("button.props." + name) print(props) Unfortunately, I can't find the attachment values when the widget has been attached to a grid. Does anyone know how to do this? 回答1: The attachment and packing values are child properties, not properties, so you have to

How to get the attachment values when a widget has been attached to a grid

假如想象 提交于 2021-01-05 20:39:00
问题 This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post) obj = [widget identifier] for pspec in obj.props: print(pspec.name) name = pspec.name.replace('-', '_') props = eval("button.props." + name) print(props) Unfortunately, I can't find the attachment values when the widget has been attached to a grid. Does anyone know how to do this? 回答1: The attachment and packing values are child properties, not properties, so you have to

How to get the attachment values when a widget has been attached to a grid

瘦欲@ 提交于 2021-01-05 20:38:17
问题 This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post) obj = [widget identifier] for pspec in obj.props: print(pspec.name) name = pspec.name.replace('-', '_') props = eval("button.props." + name) print(props) Unfortunately, I can't find the attachment values when the widget has been attached to a grid. Does anyone know how to do this? 回答1: The attachment and packing values are child properties, not properties, so you have to

pygobject-2.28.6 won't configure: No package 'gobject-introspection-1.0' found, how do I resolve?

大兔子大兔子 提交于 2020-06-06 06:05:21
问题 I'm trying to get pygobject-2.28.6 to compile in cygwin (version in repository is 2.28.4 which has some issues). Here is the tail of ./configure: checking for GLIB - version >= 2.24.0... yes (version 2.34.3) checking for ffi... checking for FFI... yes checking for GIO... yes checking for GIOUNIX... yes checking for GI... no configure: error: Package requirements (glib-2.0 >= 2.24.0 gobject-introspection-1.0 >= 0.10.2 ) were not met: No package 'gobject-introspection-1.0' found Consider

How do you set an enum property on a GLib object?

半腔热情 提交于 2020-02-16 05:50:08
问题 I am trying to set the "ellipsize" enum property on a GtkCellRendererText object. I am trying to use g_object_set_property as follows: GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); GValue val = G_VALUE_INIT; g_value_init (&val, G_TYPE_ENUM); g_value_set_enum (&val, PANGO_ELLIPSIZE_END); g_object_set_property (G_OBJECT(renderer), "ellipsize", &val); However, I get an error message at run time: (infog:27114): GLib-GObject-WARNING **: 12:24:29.848: ../../../../gobject/gvalue.c:188:

How do you set an enum property on a GLib object?

自闭症网瘾萝莉.ら 提交于 2020-02-16 05:49:28
问题 I am trying to set the "ellipsize" enum property on a GtkCellRendererText object. I am trying to use g_object_set_property as follows: GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); GValue val = G_VALUE_INIT; g_value_init (&val, G_TYPE_ENUM); g_value_set_enum (&val, PANGO_ELLIPSIZE_END); g_object_set_property (G_OBJECT(renderer), "ellipsize", &val); However, I get an error message at run time: (infog:27114): GLib-GObject-WARNING **: 12:24:29.848: ../../../../gobject/gvalue.c:188:

Sphinx can't run 'make html'

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-05 04:20:11
问题 I'm trying to create the documentation for my software by sphinx tool, so i've run sphinx-quickstart , and it's gone all ok. Then i have to run make html (inside doc folder just created) and i get an error . I don't know how to fix this error: Running Sphinx v1.2.2 loading pickled environment... not yet created building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index ** (sphinx-build:2390): WARNING **:

Getting list of contacts with Gnome-Shell JS interface

匆匆过客 提交于 2020-01-23 17:19:28
问题 I've just started fiddling with writing gnome-shell extensions, and would like to know how to get a list of contacts a user has. I've tracked down some likely files: gnome-shell/js/ui/contactDisplay.js and gnome-shell/src/shell_contact_system.c . Now I notice in shell_contact_system.c the following function: /** * shell_contact_system_get_all: * @self: A #ShellContactSystem * * Returns: (transfer none): All individuals */ GeeMap * shell_contact_system_get_all (ShellContactSystem *self) {

GObject Gtk, Gnome, Gtk+, Gl, Gtk2, Gtk3…I don't understand?

故事扮演 提交于 2020-01-21 10:58:07
问题 all I need some window to host webkit or/and cairo drwaing, but i have to deal with all that first to understand what I'm doing. now. I'm lost and no more understand what's all that about. and things get worse when I try working with binding or trying to figure what are dependencies for something. for example: in python, pyGtk deprecated and replaced by pyGObject(sometimes called pyGl!!) there are many sites, many downloads and versions, mixed outdated and new references, but not one