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
1 answer

Python PyGObject pixbuf memory leak

I'm retrieving a JPEG from gphoto2, creating a Gio stream from the data and then creating a Pixbuf from the stream: import gphoto2 as gp from gi.repository import Gio, GdkPixbuf camera = gp.Camera() context = gp.Context camera.init(context) file =…
Tom
  • 7,269
  • 1
  • 42
  • 69
0
votes
1 answer

TreeView drag and drop: Sending string receiving bytes

I am trying to implement drag-and-drop in a Gtk TreeView using a JSON string to serialize (am I using that word right?) the information. But when I use the standard approach I get an error message. Also the string I send arrives as bytes for some…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

Gtk TreeView paste after and below a selected item

Is there a good way of pasting items after or below an item in a Gtk TreeView. Is it even possible to do that with one function? I made this self-contained example, but I am not sure what best-practices for this behavior should be. Is there maybe a…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

Pygobjects RenderToggle in filtered model selects wrong column

I'm trying to add a toggle field in an filtered model for pygobjects. I used the code from the tutorial and enhanced to add toggle renderer, but as soon as I click in a filtered list the toggles are rendered wrong. Assume you have a unfiltered…
evildead
  • 4,607
  • 4
  • 25
  • 49
0
votes
2 answers

Cannot run python on windows. What am I missing?

I am pretty new to python. Please correct me if I show stupidity. So I am trying to run the following code: from gi.repository import Gtk class LisaMainWindow: def on_LisaMainWindow_destroy(self, object, data=None): print ("quit with…
Ali Nahid
  • 867
  • 11
  • 26
0
votes
1 answer

Popup menu doesn't appear when clicking on StatusIcon

I found that code on the Internet : #!/usr/bin/env python3 from gi.repository import Gtk def popup_menu(icon, button, time): menu = Gtk.Menu() menuitemAbout = Gtk.MenuItem(label="About") menu.append(menuitemAbout) menuitemQuit =…
arthropode
  • 1,361
  • 2
  • 12
  • 19
0
votes
2 answers

Remove widget from Gtk viewport / scrolled window in dynamic GUI

I am building a GUI (Python binding of GTK3) where one Gtk Scrolled Window (from Glade) can contain different treeviews. The program launches with an empty window and the first time around everything works with: …
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
0
votes
1 answer

Why Gtk.TreeSelection.select_iter() is not working?

I want to implement a feature which will allow user to navigate in Gtk.TreeView widget by arrow keys, unfortunately select_iter() method is not doing what I was expecting from it, i. e. it fails to select parent node of selected node :P And now I…
BPS
  • 1,133
  • 1
  • 17
  • 38
0
votes
1 answer

gobject.io_add_watch continuous callback from pyalsaaudio

I'm trying to create a small custom mixer that suits my needs, using python 2.7 and pyalsaaudio 0.7, but I'm stuck with events got from alsamixer when another program changes the volume values. I tried to understand how other mixers work (for…
musicamante
  • 41,230
  • 6
  • 33
  • 58
0
votes
2 answers

PyGObject (Glade) Window Never Showing (Multithreaded)

I've been fighting for three hours now to get this process multithreaded, so that I can display a progress box. I finally got it working, insomuch as the process completes as expected, and all the functions call, including the ones to update the…
CodeMouse92
  • 6,840
  • 14
  • 73
  • 130
0
votes
1 answer

Dialog in thread freeze whole app despite Gdk.threads_enter/leave()

I've got an application which makes something in background. To inform the user it update some widgets with its progress. That works. But somethings there is an error or something else in this background operation so it has to display a dialog. This…
Chickenmarkus
  • 1,131
  • 11
  • 25
0
votes
1 answer

GTK+ 3 or PyGObject for Quickly

First answer on this question says that Quickly supports GObject introspection and GTK+ 3. Is this means that it USES GObject or it USES GTK+ 3? I ask this because I want to start learning GUI programming with Quickly and Python, so I'm not sure I…
0
votes
1 answer

How can I get a global mouse event in GTK?

I recently learning to use PyGObject. I can listening a "motion-notify-event" to get mouse move events with a Gtk.Widget. However, it can't work fine outside the window, I need the mouse event outside the window,.Maybe I should ask how a root…
jiffies
  • 23
  • 4
0
votes
1 answer

Get input from custom dialog with entry, ok, and cancel button and return - Python/GTK3

In Python with gobject, I am having immense issues getting input from the user. Here is my code: def get_network_pw(self, e): def okClicked(self): print(pwd.get_text()) return pwd.get_text() …
Cody Dostal
  • 311
  • 1
  • 3
  • 13
0
votes
1 answer

GTK+: Move tree element to another parent

I have a treeiter created with the treeiter = self.devices_treestore.append(parent_treeiter, column_values_list) call. How can I move it to another parent (with the whole subtree it holds)?
Eugene Shatsky
  • 401
  • 4
  • 8