I am trying to port a python gtk2 program which uses pango. I am stuck at trying to find the equavalent of pango.SCALE_XX_SMALL. The other pango constants translate for example from pango.WEIGHT_ULTRALIGHT to Pango.Weight.ULTRALIGHT but it seems…
I am pretty new to programming and one of first things I tried is writing my own file manager (for learning purposes). I use python2.7 and GTK+ 3 library.
While writing my file manager I faced problem: how to react to changes in current folder's…
The code below is a test case to allow me to set and get the location of a GStreamer URI property, but it seems to only work within the method that it's set to. Can anyone see what I'm doing wrong here?
import gi
gi.require_version('Gst',…
I have an existing project that I'm trying to build a GUI around (using PyGI + Gtk3). There are some native objects that I need to extend slightly to make them renderable. I've boiled the problem down to the simplified code here:
# Simplified…
I'm designing a text editor-esque application using Python2.7 and Gtk3, and I'm not very sure on how to set up a handler to check if the main TextView is currently in focus, so I can disable menu items (e.g. Edit -> Copy etc.) accordingly.
In order…
I'd would like disable the focus in all the buttons of my window. I can disable one button with widget.set_can_focus(False) but I'd like to know the canonical way to apply this feature to all buttons in my window.
FYI, I am using HBox and VBox…
Right now I can make a terminal but the output is not used as a command.
It just prints a string to the virtual terminal.
from gi.repository import Gtk, GObject, Vte
class TheWindow(Gtk.Window):
def __init__(self):
…
I'm using the libgdl in Python using GObject introspection. Does anybody know how to remove a Gdl.DockItem from a Gdl.Dock? I've tried:
dock.remove(dockitem)
and
dock.master.remove(dockitem)
And I've also tried destroying the dockitem and it's…
In my small PyGObject/GTK3 application I try to create a (sub-)menu that consists of RadioMenuItems.
I create the menu as follows in the main window's __init__:
menu_item = None
self.menu = Gtk.Menu()
self.menu_items = {}
for i in range(1,5):
…
(rewritten after new findings)
I'm having a memory leak in a piece of PyGObject code that I try to understand.
It's reproducible, at least here (Debian stable), with the following code:
import gi
gi.require_version("Gtk", "3.0")
from gi.repository…
I am looking to create a combo box in GTK where the user selected choice in the first box changes the choices available in the next boxes; ie if the first box contained manufacturers names, the next box would contain products of that manufacture,…
I'm a newbie in pyGobject (Gtk3). I'm trying to build my GUI, but I couldn't identify the highlighted areas showing in the picture below.
What is the name of that widget?
I'm trying to create widgets with a loop. This is what I tried :
def set_runways(self, airfield):
i = 0
for rwy in airfield['Runways']:
frame = Gtk.Frame()
frame.set_label('-'.join([rwy['Runway_1'],…