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

Glade, pygobject - closing and opening a window - Gtk-CRITICAL error and crash

I have created a two-window app with Glade and pygobject. I have a window with an open-window-button that opens the second window. The second window has a close button. When I click the close-button it prints something to the terminal and triggers a…
casualcoder
  • 231
  • 2
  • 11
0
votes
0 answers

Emit g_signal from thread to main in Python

So I found this gist on how to create a "thread pooling" system and my issue is: when the executed function finished in the thread the "completed" signal must be emitted from (or to) the main thread. The solution presented on the gist was to…
Paulo Queiroz
  • 123
  • 2
  • 9
0
votes
2 answers

Spinner in a PyGObject Gtk.TreeView does not spin

It is not clear for me how to use Gtk.SpinnerCellRenderer in a Gtk.TreeView with a Gtk.ListStore as model. In this example the spinner is shown but it is inactive. It doesn't spin. #!/usr/bin/env python3 import random import…
buhtz
  • 10,774
  • 18
  • 76
  • 149
0
votes
2 answers

Handle "add child to Gtk.Box" event

As I am aware, I can subscribe to Gtk.Box signal "add child": box.connect("add", self.__add_to_switch_list) which will be called when I add child by box.add(child), and it's working. But how I would do the same with box.pack_start() method?
likern
  • 3,744
  • 5
  • 36
  • 47
0
votes
0 answers

python3 gtk3 GUI only partially updating despite using GObject.idle_add

I am using Gtk3 together with the threading module, because the program is receiving messages from another program in unknown intervals. Updating the GUI is done upon receiving a message from the other program, but for some reason not everything…
Shelyo
  • 3
  • 1
0
votes
0 answers

Python audio player module who can use 2 sound card

( i am French, excuse my english :p ) I use Python 3 and GTK3 I would like to do in Python, a music player that could use 2 sound card. For example playing a music on the speaker and another on my screen. (or a music played by mixer track) Do you…
0
votes
0 answers

Gtk.Builder.get_objects() not returning cell renderers?

I'm using PyGObject with GTK 3.22.25. I've built a UI in Glade and am loading it using Gtk.Builder. My UI includes a Gtk.TreeView with Gtk.TreeViewColumn children, each with a Gtk.CellRendererText renderer. One of these is called…
Tom
  • 7,269
  • 1
  • 42
  • 69
0
votes
1 answer

Calling xkbcomp from python script, fails to apply when called via signal

I have a method that is basically doing the following: command = 'xkbcomp -i {id} {file} $DISPLAY'.format(id=id, file=self.xkb) subprocess.Popen(command, shell=True) When I directly call the method the keyboard map is applied correctly to the…
strag
  • 1
  • 3
0
votes
2 answers

webkit2 webview: how to store cookies and reuse it again?

I am trying to get cookies to work. It says cookies are enable if I load a cookie test page, but it won't remember logins. I am posting my code below, thanks in advance. context = WebKit2.WebContext.get_default() sm =…
codesardine
  • 35
  • 10
0
votes
1 answer

How to change/switch windows using Gtk.Application Gtk+3 Glade Python?

I read this tutorial- https://python-gtk-3-tutorial.readthedocs.io/en/latest/application.html It says in the first para - Gtk.Application encompasses many repetitive tasks that a modern application needs such as handling multiple instances,…
Rohit S
  • 518
  • 5
  • 16
0
votes
1 answer

How to transition from one window to other in Gtk.Application with Pygobject Gtk+3?

I am a beginner in Gtk and Python both. I am using Python 2.7.14 and Pygobject(pygi-aio-3.24.1_rev1-setup). I have a working program that can call other window, show that window and close the original window. Which is as follows: This is the main…
Rohit S
  • 518
  • 5
  • 16
0
votes
1 answer

How to install and use python PyGObject "Notify" (or equivalent) on a RPi3

I'm trying to install a Python based package from a github repo originally meant for another (probably Debian based) Linux distribution. The program seem to use Python2, and the imports are given as follows: import argparse import logging import…
not2qubit
  • 14,531
  • 8
  • 95
  • 135
0
votes
1 answer

PyGObject label issue

in my application i'm trying to change the label text when i get new data from an api. My problem is after some time my gui hangs up. And its not always at the same time that its hanging up somtimes its right after start running the aplication…
user2468067
  • 11
  • 1
  • 3
0
votes
0 answers

Toggle buttons toggled, but do not -look- toggled

I have some Python + PYGobject code I've been using for years. Today it's having problems, and I don't know why. If I run it, it looks fine. But if I click a toggle button, the button doesn't look clicked. But if I continue clicking as though the…
dstromberg
  • 6,954
  • 1
  • 26
  • 27
0
votes
2 answers

PyGObject GtkFileChooserDialog default button

When I create a GtkFileChooserDialog in Glade and then connect that to a Python class using Gtk.Builder, how do I tell it which is the default button? Currently, my 'Open' button is the stock gtk-open button and when it's clicked, run() returns 0. …
Tom
  • 7,269
  • 1
  • 42
  • 69