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

Porting pygtk code to pygobject Gtk3: What is the equivalent of pango.SCALE_XX_SMALL

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…
jnvilo
  • 157
  • 1
  • 10
0
votes
2 answers

Track changes in folder

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…
imslavko
  • 6,596
  • 2
  • 34
  • 43
0
votes
2 answers

GStreamer properties only available locally

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',…
Mike
  • 400
  • 2
  • 12
0
votes
1 answer

PyGI emulating set_attribute / appropriate signal to emit?

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…
Pat
  • 1,882
  • 2
  • 15
  • 22
0
votes
2 answers

Python2/Pygobject/Gtk3/Glade3 check TextView focus

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…
Nick Hu
  • 43
  • 3
0
votes
1 answer

How to disable 'button focus' in several buttons in PyGTK?

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…
omar
  • 1,541
  • 3
  • 21
  • 36
0
votes
1 answer

How to send commands to pygobject virtual terminal?

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): …
Quentin Engles
  • 2,744
  • 1
  • 20
  • 33
0
votes
1 answer

PyGObject Gtk.Entry Changing progress bar color

I want to change the color of the progress bar of the Gtk.Entry widget but am unable to do so by using Gtk.Widget.override_color(). How can I do this?
0
votes
1 answer

How do you remove a Gdl.DockItem from Gdl.Dock?

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…
Micah Carrick
  • 9,967
  • 3
  • 31
  • 43
0
votes
1 answer

Multiple items are (wrongly) selected in a menu consisting of RadioMenuItems

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): …
gnirx
  • 197
  • 1
  • 1
  • 8
-1
votes
1 answer

Memory leak in my PyGObject project - but seems to be outside of Python

(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…
grimmel
  • 23
  • 3
-1
votes
1 answer

installing pyGObject in pycharm has an error

while i'm trying to install pyGObject in my Pycharm. it does not work. and has an error : and the output command : Collecting PyGObject Using cached…
inaz
  • 1,755
  • 4
  • 20
  • 41
-1
votes
2 answers

Create combo box in python GTK 3.0 where the input of the first box changes the possible input choices for the second box

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,…
Connor
  • 3
  • 1
-1
votes
1 answer

Python Gtk3 : widget type

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

Can't attach widget to my grid

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'],…
Louis Etienne
  • 1,302
  • 3
  • 20
  • 37
1 2 3
54
55