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…
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…
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…
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?
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…
( 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…
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…
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…
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 =…
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,…
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…
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…
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…
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…
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. …