Questions tagged [pygobject]

GTK+ and other GObject bindings are provided by PyGObject through introspection.

Python library providing bindings for GObject based libraries through GObject-Introspection.

For more information:

817 questions
0
votes
2 answers

GTK+: How do I process RadioMenuItem choice without marking it chosen? And vise versa

In my program, I've got a menu with a group of RadioMenuItem entries. Choosing one of them should trigger a function which can either succeed or fail. If it fails, this RadioMenuItem shouldn't be marked chosen (the previous one should persist).…
Eugene Shatsky
  • 401
  • 4
  • 8
0
votes
1 answer

Create Gtk toolbar with buttons and text in PyGobject

I found a couple of tutorials (PyGTK) that use this code: from gi.repository import Gtk [...] self.toolbar = Gtk.Toolbar() self.toolbar.set_style(Gtk.TOOLBAR_BOTH) [...] but using Python3 and GTK3 (PyGobject) I get the…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

How can I expand a Gtk.Scale in a Gtk.ListBox

I would like to expand the Gtk.Scale widgets (they are inside a Gtk.ListBox) and get rid of the indentation of the bottom two. The indentation seems to be connected to the length of the text in the left column. #!/usr/bin/python3 from…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

How to create an empty row in GTKTreeView?

How can I create an empty row (2 floats) in GTKTreeView? I set up this: self.liststore = Gtk.ListStore(float, float) self.treeview = Gtk.TreeView(model=self.liststore) and then add 3 rows: self.liststore.append([2.35, 2.40]) …
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

GtkToolbar: How to add Toolitem to toolbar using PyGObject

How can I add icons to a GtkToolbar using PyGObject? I can create the toolbar and an icon without any problems: self.toolbar = Gtk.Toolbar() self.item = Gtk.ToolItem() But adding the item to the toolbar doesn't seem to work like this (Found…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

Float number in Gtk Treestore: i18n of decimal comma/point

Can anybody tell me why this example doesn't work when I try to add a float in one of the columns? It produces a type error (TypeError: Must be number, not str) in the line at the bottom (self.liststorepath = number). Edit: I narrowed it down. My…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

Button not getting styled in PyGI

I am trying to create a button that is red instead of the default colour. I am applying the style through a CssProvider() but the button's colour does not change. What am I doing wrong ? Here is the code: from gi.repository import Gtk, Gdk CSS =…
Apoorv
  • 373
  • 1
  • 5
  • 15
0
votes
1 answer

PyGObject and Glade, dynamically changing icon of a button

how could i dynamically change the icon of a button created with glade? ______________________ Last Edit _________________________________________ I'm trying this: self.button_waiting=self.builder.get_object('button_waiting') …
user3672754
0
votes
1 answer

PyGObject Problems with a ComboBoxEntry

I'm having a problem with a ComboBoxEntry and the function that populates it. This is the __init__ code on the GUI. self.combobox_category =…
user3672754
0
votes
1 answer

PyGObject Display csv on textview

I would like to find a way to display CSV files on a TextView GTK+3 with Python.. I've tested alot of stuff but i can't make it work def on_button_program_list2_clicked(self, button, data=None): self.window_list.show() # this is the window that…
user3672754
0
votes
2 answers

Rebuild interface to change the language (GTK)

I am beginning to work on a program in which i want multilingual support, but since it is pretty modular (and i want it to be even more in the future), a language change means "destroy what you had of interface and build again with the content which…
SOMN
  • 351
  • 1
  • 3
  • 15
0
votes
1 answer

GtkMenuButton popups

after adding menu to GtkMenuButton it is not showing,tried different box to contain it(no use),anyone can say what i amdoing wrong? from gi.repository import Gtk class Window(Gtk.Window): def __init__(self): …
Sam
  • 41
  • 1
  • 6
0
votes
1 answer

Drawing in a Gtk.DrawingArea

I'd like to draw inside my Gtk.DrawingArea objects. I have to connect the drawing function to the "draw" event, not to the "expose-event", because i'm working with gtk3. But this doesn't work. Here is my code: def draw(widget, context, args=()): …
FrancescoN
  • 2,146
  • 12
  • 34
  • 45
0
votes
1 answer

webkit (webkitgtk3) function prototype as seen in python from pywebkit

pywebkit makes calls from python into webkit by introspection. The prototype of called functions are bound at runtime. A little problem for developers is that you will not see the prototype in source code. How do you find the function prototype?…
minghua
  • 5,981
  • 6
  • 45
  • 71
0
votes
1 answer

webkit could not resolve primary font and causes segmentation fault on fedora 20

How webkit3 resolve its primary font on Linux? (Got a segmentation fault in libwebkitgtk-3.0. Anybody has seen similar problem? Is there a way to work-around it? How to debug or fix it with minimal change to the system?) The gdb prints: Program…
minghua
  • 5,981
  • 6
  • 45
  • 71